Skip to content

fix: state the minted record-dir shape in the onboarding template (#1009) - #1131

Merged
apackeer merged 2 commits into
awslabs:mainfrom
vnlebaoduy:fix/1009-onboarding-record-dir-shape
Sep 20, 2026
Merged

apackeer merged 2 commits into
awslabs:mainfrom
vnlebaoduy:fix/1009-onboarding-record-dir-shape

Conversation

@vnlebaoduy

@vnlebaoduy vnlebaoduy commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

core/templates/onboarding.md:47 told every session at startup that the active intent's record dir is aidlc/spaces/<active-space>/intents/<slug>-<id8>/. The engine mints <YYMMDD>-<label> (aidlc-utility.ts intent-create; aidlc-lib.ts keeps <slug>-<id8> only as recordDirMatches()'s back-compat fallback), and every other instruction surface already states the minted shape. The template was the one outlier, and the t174 docs legacy-ref gate could not catch it because its own fixture comment described <slug>-<id8> as the current shape.

Closes #1009.

Changes

  • core/templates/onboarding.md — the record-dir line now reads <YYMMDD>-<label>; renders into all seven CLAUDE.md / AGENTS.md onboarding files.
  • tests/unit/t174-docs-legacy-refs-gate.test.ts — fifth retired-token lane: any <slug>-<id8> occurrence in docs/**/*.md, core/templates/*.md, or a harness orchestrator SKILL.md must be pinned in the allowlist. Nothing is pinned, so the lane has zero survivors.
  • tests/fixtures/docs-legacy-refs.json — _comment states the correct shape and documents lane (5).

No version bump, badge, or CHANGELOG entry, per the Release Metadata Policy in AGENTS.md.

User experience

Before: a fresh session reads <slug>-<id8> from CLAUDE.md / AGENTS.md, then <YYMMDD>-<label> from stage-definition.md — two instruction files disagreeing about the same path.

After: every onboarding file states the shape the engine actually writes.

Checklist

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
  • If this change adds an input to any fingerprint, epoch, or receipt identity, the description names the human-visible change it detects

Test plan

On 355903d6 (2.8.2):

bun scripts/package.ts
bun test tests/unit/t174-docs-legacy-refs-gate.test.ts   # 3 pass
bun test tests/unit/t68-version-changelog-sync.test.ts   # 7 pass
bun run lint && bun run typecheck
bun scripts/package.ts --check                           # deterministic, 7 harnesses

The new lane fails without the template fix: git stash push -- core/templates/onboarding.md && bun test tests/unit/t174-docs-legacy-refs-gate.test.ts reports core/templates/onboarding.md:47 as an unpinned occurrence.

Rendered check: each of the seven dist/<harness>/.../{CLAUDE,AGENTS}.md contains one <YYMMDD>-<label> and zero <slug>-<id8>.

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 11, 2026
@vnlebaoduy
vnlebaoduy force-pushed the fix/1009-onboarding-record-dir-shape branch from c21fd0f to b794302 Compare September 11, 2026 09:36
…slabs#1009)

The onboarding template rendered `aidlc/spaces/<space>/intents/<slug>-<id8>/`
into every harness's CLAUDE.md / AGENTS.md while intent-create mints
`<YYMMDD>-<label>` and every other instruction surface already says so.
Correct the line, fix the same wording in the t174 fixture comment, and add
a fifth t174 lane so a `<slug>-<id8>` occurrence in docs/**,
core/templates/*.md, or a harness orchestrator SKILL.md fails the gate.

Closes awslabs#1009
@vnlebaoduy
vnlebaoduy force-pushed the fix/1009-onboarding-record-dir-shape branch from b794302 to 69522b4 Compare September 15, 2026 15:53
@vnlebaoduy

Copy link
Copy Markdown
Contributor Author

Rebased onto main @ 891669aa (post-2.9.0). The conflict was in t174's predicate, where main tightened the learnings-log regex; kept main's regex and added this PR's <slug>-<id8> lane beside it. t174 and t68 10 / 10; lint, typecheck, coverage registry, and packaging determinism green on 69522b4c.

…dir wording change

The onboarding template fix changes the shipped AGENTS.md bytes for the six
harnesses that project it as a managed-block root integration (codex, kiro,
kiro-ide, copilot, cursor, opencode). The packager appends only the current
rendered hash to `legacySignatures.wholeFileHashes`, so the previously shipped
variant must move into each manifest or a copy-channel install still carrying
the v2.9.0 unmarked AGENTS.md stops being adoptable on refresh. Add the 2.9.0
hash to each manifest and pin the new current hash in t243's inventory, which
is the test that caught this on CI.

@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.

Thank you, @vnlebaoduy — for the precise fix, the t174 lane that makes the next occurrence unshippable, and the clean rebase that kept main's tightened learnings-log regex.

I reviewed the current head 69e90e549 against main (c66c42223; trial merge is clean).

Alignment. #1009 is precise and verified on current main: aidlc-utility.ts intent-create mints <YYMMDD>-<label>, aidlc-lib.ts recordDirMatches() keeps <slug>-<id8> only as the pre-spike fallback, and every other authored surface already states the minted shape. The onboarding template was the sole outlier and renders into all seven CLAUDE.md/AGENTS.md files. Fixing it plus adding the fifth t174 lane the issue proposed is the right scope.

One follow-up I pushed (69e90e549). CI's unit shard 4 failed on t243 › legacy signature inventory covers every shipped unmarked root variant. Changing the template changes the shipped AGENTS.md bytes for codex, kiro, kiro-ide, copilot, cursor and opencode; the packager appends only the current hash to each manifest's legacySignatures.wholeFileHashes, so the previously shipped (v2.9.0) hash has to be added to the manifests or a copy-channel install still carrying that unmarked AGENTS.md is no longer recognized on refresh. I added the six v2.9.0 hashes (verified byte-identical against a fresh v2.9.0 build) and pinned the new current hashes in t243, following the rotation #1151 did. This is a repo-internal contract that isn't documented near the template, so it's an easy one to miss — nothing about your change was wrong.

Verified locally on the new head: t243 85/85, t174 3/3 (and it fails naming core/templates/onboarding.md:47 when the template fix is reverted), t68 7/7; bun scripts/package.ts --check deterministic across all seven harnesses; lint and typecheck clean; each rendered CLAUDE.md/AGENTS.md carries one <YYMMDD>-<label> and zero <slug>-<id8>; zero <slug>-<id8> survivors across docs/, core/templates/, the harness orchestrator skills and core/aidlc-common/. The literal <slug>-<id8> predicate is the right tightness — the live claim/<intent-id8>/<unit> ref shape in 12-cli-commands.md and workshop-mode.md would false-positive under anything looser.

Approving; merging now that CI is green on 69e90e549. #1037 targets the same issue but is conflicting and predates the dist/ removal; I'll leave a note there pointing here.

@apackeer
apackeer added this pull request to the merge queue Sep 20, 2026
Merged via the queue into awslabs:main with commit 59105b3 Sep 20, 2026
23 checks passed
wowzoo pushed a commit to wowzoo/aidlc-workflows that referenced this pull request Sep 20, 2026
…ess-v3

Base moved to 59105b3 (three commits past 2167de8: fa3c805, awslabs#1199 c66c422,
awslabs#1131 59105b3). Five conflicts, plus one upstream test that this branch has to
retarget - called out separately below because it is a judgment, not a mechanical
resolution.

- harness/kiro/manifest.ts - add/add inside the known-unmarked-root-hash list. Both
  additions are kept: this branch's retired-`kiro-ide` render block and awslabs#1131's
  2.9.0 kiro variant (9ad7daa0). awslabs#1199's `shared: "union"` merged cleanly and is
  present.
- harness/kiro-ide/manifest.ts (modify/delete) - stays deleted. Upstream added
  exactly two things to it, and neither is lost: `shared: "union"`, added
  identically to harness/kiro/manifest.ts which this branch keeps, and the 2.9.0
  render hash 94f27a88, which this branch already lists among the retired renders in
  the unified manifest.
- harness/kiro/hooks/aidlc-kiro-adapter.ts - the same shape as 503cc28: upstream
  added a name to the `../tools/aidlc-lib.ts` import list inside the block this
  branch had already replaced. The duplicate is dropped and
  `stripOrchestratorLauncherOptions` is added to the surviving list in alphabetical
  position; upstream's call site merged cleanly and now resolves.
- tests/fixtures/docs-legacy-refs.json - both sides edited the `_comment`, so both
  are composed: upstream's FIVE-lane text with its new `<slug>-<id8>` lane, and this
  branch's `\u2014` -> literal em-dash normalization applied to all five lanes
  including upstream's new one.
- tests/unit/t243-install-mechanism.test.ts, legacy-signature fixture (three hunks) -
  this fixture is compared with `toEqual` against the BUILT dist projection, whose
  list is the manifest's declared hashes plus the current render appended by the
  packager. The merged render is a new file, so neither side's value was correct and
  the hunks could not be composed by hand. Resolved to this branch's single-`kiro`
  shape (no `kiro-ide` key, matching `harnessDirs`) and then set from the built
  descriptor: codex 20 entries ending 87563548 + 12cb3589, kiro 28 ending 94f27a88 +
  9ad7daa0 + 60e6f7a8, claude unchanged at 6.

RETARGETED UPSTREAM TEST. awslabs#1199's new case "a harness that shares an engine directory
cannot coexist" merged cleanly but referenced `KIRO_IDE_RELEASE`, whose declaration
this branch removed - the merged tree did not typecheck. The guard it covers is
unchanged and worth keeping, and the feature names a second colliding pair, so the
case now exercises opencode + copilot, which both claim `.aidlc`, instead of the
kiro/kiro-ide pair this branch retires. `kiro-ide` is no longer a harness id the
engine knows (zero occurrences in aidlc-init.ts and aidlc-distribution.ts), and the
retired stamp's own migration path keeps its separate case.

Verified locally: `bun run typecheck` 0 errors across all three projects;
`bun tests/gen-coverage-registry.ts --check` OK (fresh, guards green, ratchet held);
and, because the retarget is a behavioural change rather than a transcription, three
targeted runs after `bun scripts/package.ts` - the retargeted coexistence case
(1 pass, 3 expect calls), the t243 signature group (4 pass), and the t174 docs
legacy-ref gate (3 pass). The full battery is deliberately not run here - CI is the
gate for this PR.
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.

[Docs]: onboarding template states the record dir is <slug>-<id8>; the engine writes <YYMMDD>-<label>

2 participants