Skip to content

fix: remove kapi runtime alias#225

Merged
devkade merged 1 commit into
devfrom
fix/issue-209-remove-kapi-runtime-alias
May 17, 2026
Merged

fix: remove kapi runtime alias#225
devkade merged 1 commit into
devfrom
fix/issue-209-remove-kapi-runtime-alias

Conversation

@devkade
Copy link
Copy Markdown
Owner

@devkade devkade commented May 17, 2026

Summary

  • Removes the obsolete kapi runtime CLI package/bin alias so the only public runtime bin is ilchul.
  • Deletes the old direct bin/kapi.mjs shim and refreshes package-lock metadata.
  • Extends CLI bin tests and the product-name audit so the alias retirement is guarded and documented.

Linked issue

Related issue: devkade/ilchul issue 209

Problem

Issue #209 requires the final product-name normalization boundary to avoid retaining kapi as a runtime CLI compatibility surface. The docs already state that the canonical public runtime command is ilchul, but package metadata still exposed a kapi bin and the repo still carried bin/kapi.mjs, which allowed the old runtime command path to keep working.

Invariant for this slice:

Runtime package bins expose `ilchul` for runtime control and `kapi-review` for the external review harness; they do not expose or retain a `kapi` runtime command.

Options considered

  1. Remove the runtime alias completely — update package metadata, lockfile, tests, and audit docs; delete the obsolete shim.
  2. Document kapi as a compatibility exception — keep the bin and classify it in the audit.
    • Pros: No behavior break for old local muscle memory.
    • Cons: Contradicts the issue text and keeps the old product name alive as a public runtime command.
  3. Leave package metadata only and remove docs/tests later — smallest code diff.
    • Pros: Less immediate churn.
    • Cons: Regression-prone; tests would still encode the wrong contract.

Selected approach

Selected option 1.

The old runtime alias is removed at the package/bin boundary and the direct shim is deleted, while intentionally preserved Kapi-named surfaces stay untouched: /kapi-* slash commands, kapi_* tools, serialized workflow IDs, and the external kapi-review / kapi-agent review integration.

Implementation

  • package.json / package-lock.json
    • Removed the kapi runtime bin entry.
    • Kept ilchul and kapi-review as the remaining package bins.
  • bin/kapi.mjs
    • Removed the obsolete runtime compatibility shim.
  • test/cli-bin.test.ts
    • Changed package-local test expectations so npm exec -- kapi --help must fail and must not render runtime help.
    • Changed isolated-prefix setup smoke so only ilchul is installed; the generated kapi shim path must be absent.
    • Kept production install smoke for ilchul.
  • docs/product-name-audit.md
    • Updated the package/runtime classification and final residual scan evidence for the alias retirement.

Why this fixes it

The old runtime command is no longer advertised by package metadata, no npm shim is generated for it, and the direct wrapper file that set RUNCTL_COMMAND_NAME=kapi no longer exists. The tests now prove both local package execution and prefix-installed CLI setup expose ilchul without retaining kapi runtime behavior.

Remaining kapi occurrences are still intentionally classified as compatibility/persisted/external-review surfaces rather than runtime CLI aliases.

QA / Verification

  • npm test -- test/cli-bin.test.ts — pass; package script ran the full test/*.test.ts suite plus the requested file, 523 tests / 512 pass / 11 skipped.
  • npm run verify — pass; 523 tests / 512 pass / 11 skipped, tsc --noEmit, tsc --noEmit --noUnusedLocals --noUnusedParameters, and quality:budgets completed. Quality budgets report one existing code_smells warning and no failing budget.
  • git diff --check — pass.
  • find src -iname '*kapi*' -print | sort — residuals limited to src/.kapi/** fixture state and src/cli/kapi-review-cli.ts external review integration.
  • rg -n '"kapi"\s*:|bin/kapi|npm exec -- kapi|kapi compatibility alias|kapi --help' package.json package-lock.json README.md docs test bin src scripts — no package/bin alias remains; hits are the updated guard/audit text.
  • node -e 'const p=require("./package.json"); console.log(JSON.stringify(p.bin,null,2)); if (Object.hasOwn(p.bin,"kapi")) process.exit(1)' — pass; package bins are ilchul and kapi-review only.

Manual smoke, if applicable:

  • n/a — package-local and prefix-install command behavior is covered by test/cli-bin.test.ts.

Anomalies observed

Symptom Evidence Impact Action
npm test -- test/cli-bin.test.ts runs the full suite because the package script expands test/*.test.ts before extra args. Command output reported 523 tests. No blocker; broader coverage than targeted. Reported accurately here.
Verification toggled src/cli/kapi-review-cli.ts executable mode locally. git diff --summary showed mode change 100644 => 100755. Unrelated churn would pollute the PR if staged. Reset with chmod 644 src/cli/kapi-review-cli.ts; final branch is clean except intended files.
quality:budgets reports existing code_smells warning. BUDGET code_smells value=52 target="<=20" status=warn. Non-failing existing quality budget warning. No action in this alias-retirement slice.

Risks / Follow-up

  • Remaining kapi literals in slash commands, tool names, workflow IDs, fixture state, and kapi-review / kapi-agent are intentional compatibility or external-integration surfaces, not runtime CLI aliases.
  • No destructive .kapi storage cleanup or serialized workflow migration was performed.

kapi-agent review

  • Expected reviewer-only bot behavior: automatic formal review after PR open; if absent after a short wait, request with @kapi-agent review.
  • Merge gate: latest kapi-agent approval/check must apply to the current head before merge.
  • Re-review rule: after stale approval, REQUEST_CHANGES, or COMMENT, request re-review with a same-comment current-head revision explanation:
    • @kapi-agent review
    • Revision explanation for current head 71ae062ebb9da05a2e15b1ea80dae711bf922fd6
    • What changed
    • Why this closes the prior feedback
    • Verification

@devkade
Copy link
Copy Markdown
Owner Author

devkade commented May 17, 2026

@kapi-agent review

Revision explanation for current head 71ae062ebb9da05a2e15b1ea80dae711bf922fd6:

What changed:

  • Removed the obsolete kapi runtime bin entry from package.json and package-lock.json.
  • Deleted the old bin/kapi.mjs runtime compatibility shim.
  • Updated test/cli-bin.test.ts so package-local and isolated-prefix installs prove kapi runtime invocation is absent.
  • Refreshed docs/product-name-audit.md with the runtime alias removal boundary and residual scan evidence.

Why this closes the prior feedback:

  • Issue Remove remaining kapi identifiers from internal codebase #209 requires the runtime CLI to avoid retaining kapi compatibility; package metadata now exposes only ilchul and the external kapi-review harness.
  • Remaining Kapi-named surfaces are documented compatibility/external-integration surfaces, not runtime CLI aliases.

Verification:

  • npm test -- test/cli-bin.test.ts — pass; package script ran 523 tests / 512 pass / 11 skipped.
  • npm run verify — pass; tests, typecheck, unused check, and quality budgets completed.
  • git diff --check — pass.
  • Residual scans confirm no package/bin kapi runtime alias remains.

Copy link
Copy Markdown

@kapi-agent kapi-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kapi-agent review

Verdict: APPROVE

Final approval summary

Review journey

This PR removes the obsolete kapi runtime CLI alias while preserving intentional Kapi-named review and compatibility surfaces. The semantic scope is narrow: package bin metadata, the deleted runtime shim, CLI-bin regression tests, lockfile metadata, and product-name audit documentation. There was no prior kapi-agent review on this PR, so no review/fix ping-pong was required.

What changed

  • Removed kapi from package.json and package-lock.json package bins.
  • Deleted bin/kapi.mjs.
  • Updated test/cli-bin.test.ts to assert:
    • ilchul --help still works.
    • npm exec -- kapi --help fails without rendering runtime help.
    • isolated prefix setup installs ilchul only and does not create a kapi shim.
  • Updated docs/product-name-audit.md to document the retired runtime alias and remaining intentional Kapi surfaces.

Why this is correct

The public runtime command contract now matches the stated invariant: runtime control is exposed as ilchul, while kapi-review remains for the external review harness. Removing both the package bin entry and direct shim prevents local package and installed-prefix invocation through the old kapi runtime path. The tests guard the relevant npm/package boundaries rather than only checking static metadata.

Evidence

  • Verifier gate: PASS — npm ci && npm run verify exited 0.
  • Size gate: PASS — 65 changed lines, under the 200-line semantic threshold.
  • Revision-explanation status: not required; found in the PR body.
  • Ilchul review harness gate: PASS — neutral/comment result, no blocking findings.
  • Inspected: package.json, package-lock.json, test/cli-bin.test.ts, docs/product-name-audit.md, and the deleted bin/kapi.mjs diff.

Remaining risks and approval rationale

Remaining risk is limited to users still invoking the removed kapi runtime command, which is an intentional breaking cleanup for issue #209 and is documented by the PR. No security, artifact-contract, or workflow-integrity regressions were found. Approval is justified because the implementation, tests, docs, and verification evidence align with the stated contract.

Blocking issues

None.

Warnings / risks

  • Removing kapi as a runtime bin is intentionally user-visible. Any external scripts still calling kapi --help or kapi start ... must migrate to ilchul.

Suggestions

  • If this change is included in a release, call out the CLI alias removal clearly in release notes or migration notes.

Looks good

  • The PR removes the alias at all relevant package surfaces: metadata, lockfile, and the direct shim.
  • Tests cover both package-local execution and isolated-prefix installation behavior.
  • The audit document clearly distinguishes retired runtime alias surfaces from intentional kapi-review, kapi-agent, slash command, and persisted workflow identifiers.

Verification notes

  • Verifier gate: PASS — npm ci && npm run verify completed successfully.
  • Size gate: PASS — 65 changed lines, with most change weight in tests/docs.
  • Revision-explanation status: not required for this first kapi-agent review; PR body provides a detailed explanation.
  • PR evidence includes full verify, targeted CLI-bin coverage, lock/package bin checks, residual kapi scans, and git diff --check.

Engine: pi

@devkade devkade mentioned this pull request May 17, 2026
6 tasks
@devkade devkade merged commit 28ca8a0 into dev May 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant