Skip to content

fix(onboarding): render user-typed skill names with the harness skill prefix - #1368

Merged
apackeer merged 2 commits into
awslabs:mainfrom
vnlebaoduy:fix/onboarding-skill-invoke
Sep 24, 2026
Merged

apackeer merged 2 commits into
awslabs:mainfrom
vnlebaoduy:fix/onboarding-skill-invoke

Conversation

@vnlebaoduy

@vnlebaoduy vnlebaoduy commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Rebased onto v2.10.0.

What is left of #1341

#1341 is closed by #1363, which corrected the three session skills' frontmatter descriptions and documented the {{INVOKE}} engine runtime summary --json fallback for harnesses that do not surface skills as slash commands. That did not touch core/templates/onboarding-harness.md, and the line an operator actually reads first is still wrong on main:

$ git show origin/main:core/templates/onboarding-harness.md | grep -o "{{INVOKE}}-[a-z<>-]*" | sort -u
{{INVOKE}}-<stage>  {{INVOKE}}-code-generation  {{INVOKE}}-domain-design  {{INVOKE}}-init
{{INVOKE}}-knowledge  {{INVOKE}}-outcomes-pack  {{INVOKE}}-replay  {{INVOKE}}-session-cost

{{INVOKE}} is a shell command — bun <harness-dir>/tools/aidlc.ts in the copy channel, aidlc in the native one. Glued to a skill suffix it renders bun .claude/tools/aidlc.ts-session-cost, which is not a command on any harness. It covers the three session skills, the document skill, the per-stage runners, and -init.

The token for this already existed, and 2.10.0 started using it

scripts/onboarding.ts declares {{SKILL_INVOKE}} and OnboardingFills.invoke ("The invoke command this harness uses, e.g. /aidlc or $aidlc"); renderOnboarding substitutes it and guards against a leftover marker. Every harness already declares its value.

#1262 landed in 2.10.0 and is the first use of that token — in this same file, for exactly this purpose: {{SKILL_INVOKE}} --guard-policy relaxed for what the person types, {{INVOKE}} engine config set guard-policy strict for what the engine runs. This change applies the same distinction to the eight remaining command names and leaves the five real shell invocations on {{INVOKE}}.

Before / after

Rendered through renderOnboarding with each harness's own fills:

harness before after
claude, copilot, cursor, kiro, kiro-ide, opencode bun <dir>/tools/aidlc.ts-session-cost /aidlc-session-cost
codex bun <dir>/tools/aidlc.ts-session-cost $aidlc-session-cost

Codex is why this uses the token rather than a literal /aidlc-…: it declares $aidlc, and hardcoding the slash form would be wrong there. A harness that needs a different prefix changes one line in its own onboarding.fills.ts.

Shipped-bytes consequence

Copilot's manifest sets onboarding: { dst: "AGENTS.md", projectRoot: true } with no harnessDst, so the harness skeleton is embedded in its root AGENTS.md and those bytes change. Its previously shipped hash moves into harness/copilot/manifest.ts so a copy-channel install still carrying it stays adoptable on refresh, and t243's inventory pins the new current hash — the handling #1131 needed.

The other five AGENTS.md harnesses project the skeleton to a separate file (steering/aidlc-onboarding.md, onboarding.md, rules/aidlc-onboarding.mdc), so their root bytes are unchanged and they need no entry. I checked that against the rebuilt projections rather than assuming the #1131 shape: the packager appended no new hash for those five.

Tests

t151 gains a pin with two halves. The class guard is expect(HARNESS).not.toMatch(/\{\{INVOKE\}\}-/) — {{INVOKE}} followed directly by a suffix is always this mistake, so a future line cannot reintroduce it. The behavioural half renders the skeleton under both a /aidlc and a $aidlc harness and asserts each skill name carries that prefix and that no aidlc.ts- survives.

Ablation: reverting the template to {{INVOKE}}- reddens it (7 pass / 1 fail). t243's legacy-signature inventory independently catches the copilot byte change.

Gates on 20008a5d: bun run check green, t151 8/8, t243 116/116.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 23, 2026
@vnlebaoduy
vnlebaoduy force-pushed the fix/onboarding-skill-invoke branch from d28f89c to d6a1804 Compare September 24, 2026 08:19
admin and others added 2 commits September 24, 2026 15:19
… prefix

`{{INVOKE}}` is a shell command — `bun <dir>/tools/aidlc.ts` on a bun install,
`aidlc` on a native one. The harness onboarding glued skill suffixes onto it, so
a bun install told the reader to type `bun .claude/tools/aidlc.ts-session-cost`,
which is not a command.

`{{SKILL_INVOKE}}` already exists for this: renderOnboarding substitutes each
harness's own `fills.invoke`, so the same line renders `/aidlc-session-cost` for
the six harnesses that declare `/aidlc` and `$aidlc-session-cost` for Codex. No
template used it. Move the eight command names onto it and leave the five real
shell invocations on `{{INVOKE}}`.

Copilot embeds the harness skeleton in its root AGENTS.md, so its shipped bytes
change; its previously shipped hash moves into the manifest so a copy-channel
install carrying it stays adoptable. The five harnesses that project the
skeleton to a separate file ship identical AGENTS.md bytes and need no entry.

Closes awslabs#1341
…hat route

Two more runtime examples in the harness skeleton rendered commands the CLI
rejects. `{{INVOKE}} --stage <slug> --single` became
`bun <dir>/tools/aidlc.ts --stage ...`, which fails with "unknown command
'--stage'": `--stage <slug> --single` is an orchestrator-skill flag, so it now
uses `{{SKILL_INVOKE}}`, matching the guide's `/aidlc --stage <slug> --single`.
`{{INVOKE}} knowledge <verb>` failed with "unknown command 'knowledge'":
knowledge is an engine noun, so it now reads `{{INVOKE}} engine knowledge
<verb>`, the form t293 and t326 drive.

t151 pinned the broken knowledge form. It now pins `engine knowledge <verb>`
and `<skill-invoke> --stage <slug> --single` for every harness in both
channels, and guards the skeleton against either `{{INVOKE}}` form returning.
Copilot's root AGENTS.md changes again; the previous current hash never
shipped, so t243 swaps it instead of adding a legacy signature.

@apackeer apackeer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this. The diagnosis is right, and the fix renders the correct skill prefix on all seven harnesses in both the copy and native channels. The copilot legacy-hash handling matches what #1262 did.

I pushed one follow-up commit (aba29e7) for two more examples in the same lines that rendered commands the CLI rejects:

  • {{INVOKE}} --stage <slug> --single rendered bun .claude/tools/aidlc.ts --stage ..., which fails with unknown command '--stage'. It's the skill flag, so it's now {{SKILL_INVOKE}} --stage <slug> --single, matching docs/guide/12-cli-commands.md.
  • {{INVOKE}} knowledge <verb> rendered bun .claude/tools/aidlc.ts knowledge ..., which fails with unknown command 'knowledge'. Knowledge is an engine noun, so it's now {{INVOKE}} engine knowledge <verb>.

t151 now pins both for every harness and channel, and copilot's new AGENTS.md hash replaces the unshipped one in t243 (no extra legacy entry needed).

Approving. We'll take it from here and merge.

@apackeer
apackeer added this pull request to the merge queue Sep 24, 2026
Merged via the queue into awslabs:main with commit c6aa2cc Sep 24, 2026
33 checks passed
apackeer added a commit to SaRedfiche/aidlc-workflows that referenced this pull request Sep 25, 2026
* origin/main:
  fix: always sort audit rows before deriving the stage run floor (awslabs#1314)
  fix(sensor): route a sensor's path argument from its declared input_schema (awslabs#1239)
  fix(onboarding): render user-typed skill names with the harness skill prefix (awslabs#1368)
  fix(dispatch): route the three team-mode state verbs the engine calls (awslabs#1309)
  test(kiro-ide): pin the legacy execute_pwsh populated-command approval flip (awslabs#1051)
  chore(release): prepare v2.10.0 (awslabs#1380)
  fix: normalize Windows drive letters so Kiro IDE artifact writes are audited (awslabs#1201)
  fix: make the guards a fence for the agents and a gate the human holds the key to (awslabs#1262)
apackeer added a commit to wowzoo/aidlc-workflows that referenced this pull request Sep 25, 2026
* origin/main: (77 commits)
  fix(onboarding): render user-typed skill names with the harness skill prefix (awslabs#1368)
  fix(dispatch): route the three team-mode state verbs the engine calls (awslabs#1309)
  test(kiro-ide): pin the legacy execute_pwsh populated-command approval flip (awslabs#1051)
  chore(release): prepare v2.10.0 (awslabs#1380)
  fix: normalize Windows drive letters so Kiro IDE artifact writes are audited (awslabs#1201)
  fix: make the guards a fence for the agents and a gate the human holds the key to (awslabs#1262)
  fix: correct session-skill command references and document CLI fallback (awslabs#1363)
  fix(ci): preload system modules for Windows Codex readiness (awslabs#1367)
  fix(ci): correct Codex readiness and composed scope checks (awslabs#1365)
  fix: name a working next step in the refusals operators actually hit (awslabs#1322)
  fix(ci): tolerate unsupported AIDA repository evidence (awslabs#1364)
  fix(ci): require live coverage and parallelize platform tests (awslabs#1311)
  fix(aida): a folded higher-severity duplicate publishes its own body; deferral rationale never stacks explanations (awslabs#1359)
  fix(doctor): read hook heartbeats left at the pre-engine-dir path (awslabs#1240)
  test: register retired flag classifier coverage (awslabs#1361)
  fix: consume retired --init/--force flags instead of leaking them into intent descriptions (awslabs#982)
  feat(aida): the next action follows finding severity alone; readiness and risk inform, never decide (awslabs#1319)
  feat(aida): judge dispositions bind restatements by id; security lenses emit structured evidence (awslabs#1316)
  feat(aida): incremental review scope per lens, deferred out-of-scope findings, /aida full (awslabs#1312)
  fix(aida): ledger identity via judge ledgerId, evaluable anchors, strict /aida batches, verdict refresh both ways (awslabs#1308)
  ...
apackeer added a commit to logesh4v/aidlc-workflows that referenced this pull request Sep 25, 2026
* origin/main: (41 commits)
  chore(ci): supersede Full Suite verification across branch heads (awslabs#1390)
  fix: never record an unreadable review findings table as no findings (awslabs#1163)
  fix(doctor): report Kiro IDE ignore sources that hide .kiro/ (awslabs#1161)
  chore(ci): run the cross-OS jobs in the merge queue, not on every PR push (awslabs#1389)
  feat(plan-approval): auto-resolve --session from the invoking conversation (awslabs#1379)
  fix: always sort audit rows before deriving the stage run floor (awslabs#1314)
  fix(sensor): route a sensor's path argument from its declared input_schema (awslabs#1239)
  fix(onboarding): render user-typed skill names with the harness skill prefix (awslabs#1368)
  fix(dispatch): route the three team-mode state verbs the engine calls (awslabs#1309)
  test(kiro-ide): pin the legacy execute_pwsh populated-command approval flip (awslabs#1051)
  chore(release): prepare v2.10.0 (awslabs#1380)
  fix: normalize Windows drive letters so Kiro IDE artifact writes are audited (awslabs#1201)
  fix: make the guards a fence for the agents and a gate the human holds the key to (awslabs#1262)
  fix: correct session-skill command references and document CLI fallback (awslabs#1363)
  fix(ci): preload system modules for Windows Codex readiness (awslabs#1367)
  fix(ci): correct Codex readiness and composed scope checks (awslabs#1365)
  fix: name a working next step in the refusals operators actually hit (awslabs#1322)
  fix(ci): tolerate unsupported AIDA repository evidence (awslabs#1364)
  fix(ci): require live coverage and parallelize platform tests (awslabs#1311)
  fix(aida): a folded higher-severity duplicate publishes its own body; deferral rationale never stacks explanations (awslabs#1359)
  ...
apackeer added a commit that referenced this pull request Sep 25, 2026
…k-json-output

* origin/main: (42 commits)
  fix(windows): repair the cross-OS test failures on Windows (#1393)
  fix(doctor): compare the audit against the per-stage checkboxes (#1272)
  fix(sensor): drop a superseded detail file when the sensor passes (#1266)
  chore(ci): supersede Full Suite verification across branch heads (#1390)
  fix: never record an unreadable review findings table as no findings (#1163)
  fix(doctor): report Kiro IDE ignore sources that hide .kiro/ (#1161)
  chore(ci): run the cross-OS jobs in the merge queue, not on every PR push (#1389)
  feat(plan-approval): auto-resolve --session from the invoking conversation (#1379)
  fix: always sort audit rows before deriving the stage run floor (#1314)
  fix(sensor): route a sensor's path argument from its declared input_schema (#1239)
  fix(onboarding): render user-typed skill names with the harness skill prefix (#1368)
  fix(dispatch): route the three team-mode state verbs the engine calls (#1309)
  test(kiro-ide): pin the legacy execute_pwsh populated-command approval flip (#1051)
  chore(release): prepare v2.10.0 (#1380)
  fix: normalize Windows drive letters so Kiro IDE artifact writes are audited (#1201)
  fix: make the guards a fence for the agents and a gate the human holds the key to (#1262)
  fix: correct session-skill command references and document CLI fallback (#1363)
  fix(ci): preload system modules for Windows Codex readiness (#1367)
  fix(ci): correct Codex readiness and composed scope checks (#1365)
  fix: name a working next step in the refusals operators actually hit (#1322)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants