Skip to content

fix: onboarding record dir shape #1009 - #1037

Closed
fsatsuki wants to merge 2 commits into
awslabs:mainfrom
fsatsuki:fix/issue-1009-onboarding-record-dir-shape
Closed

fsatsuki wants to merge 2 commits into
awslabs:mainfrom
fsatsuki:fix/issue-1009-onboarding-record-dir-shape

Conversation

@fsatsuki

@fsatsuki fsatsuki commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the stale record-dir shape in the onboarding template reported in #1009.

core/templates/onboarding.md:47 (under ## Conventions) documented the active intent's record dir as aidlc/spaces/<active-space>/intents/<slug>-<id8>/, but the engine actually writes the date-prefixed <YYMMDD>-<label> form (e.g. 260903-novos-harness). core/tools/aidlc-lib.ts itself calls <slug>-<id8> the legacy fallback (recordDirMatches()), and every other doc — stage-definition.md, docs/reference/*, docs/guide/* — already states <YYMMDD>-<label>. This template was the only outlier, and because it renders into all seven onboarding files, every session was told the wrong shape on startup, contradicting the instruction files it later loads.

Change

One token in core/templates/onboarding.md:

-- All artifacts go under the active intent's record dir — `aidlc/spaces/<active-space>/intents/<slug>-<id8>/` (shorthand `<record>/`) — …
+- All artifacts go under the active intent's record dir — `aidlc/spaces/<active-space>/intents/<YYMMDD>-<label>/` (shorthand `<record>/`) — …

bun scripts/package.ts regenerates the seven onboarding files, which carry the same one-line change:

  • dist/claude/.claude/CLAUDE.md
  • dist/codex/AGENTS.md
  • dist/copilot/AGENTS.md
  • dist/cursor/AGENTS.md
  • dist/kiro-ide/AGENTS.md
  • dist/kiro/AGENTS.md
  • dist/opencode/AGENTS.md

Verification

  • bun scripts/package.ts --check → all seven harness trees report OK / in sync.
  • git diff --stat: 8 files changed, 8 insertions(+), 8 deletions(-) — the template token plus the seven regenerated files, nothing else.

Scope notes

  • The remaining <slug>-<id8> occurrences in authored sources are all inside TypeScript comments (several explicitly marking it the legacy form); the issue scopes those out, so this PR does not touch them.
  • The issue additionally suggests hardening the t174 legacy-ref gate with a <slug>-<id8> predicate to catch future regressions. That is deliberately left out of this minimal fix and can follow as a separate change.

Closes #1009


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

fsatsuki and others added 2 commits September 7, 2026 06:25
core/templates/onboarding.md documented the intent record dir as
<slug>-<id8>, but the engine writes the date-prefixed <YYMMDD>-<label>
form (aidlc-lib.ts calls <slug>-<id8> the legacy fallback). The template
rendered that stale shape into all seven onboarding files, contradicting
stage-definition.md and the rest of the docs. Fix the single token and
regenerate; bun scripts/package.ts --check stays green on all seven trees.
The onboarding drift fixed in the previous commit survived because t174 --
the docs legacy-ref allowlist gate that scans docs/**/*.md plus
core/templates/*.md and each harness SKILL.md -- had no lane for the retired
record-dir shape. Its four predicates covered aidlc-docs, bare --init,
dotted rules dirs, and *-learnings.md filenames, so a template stating
<slug>-<id8> as the current shape passed clean.

Add a fifth lane, /<slug>-<id\d*>/, which also catches the <slug>-<id10>
longer-prefix variants the pre-spike collision scheme used. Verified by
reintroducing the exact issue awslabs#1009 line into core/templates/onboarding.md
(the gate reds and names the file:line) and by injecting <slug>-<id10> into
docs/guide/14-artifacts-reference.md (also caught). No allowlist entry was
needed: the scanned set holds zero occurrences, so the pinned count stays at
15 of the ceiling 15.

The fixture's own _comment described lane (1) using <slug>-<id8> as the
current shape -- the gate that polices retired tokens carried the retired
token. Rewritten to <YYMMDD>-<label>, with lane (5) documented.

Test-tier only: no engine or dist change, so no version bump per the
changelog policy.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 7, 2026
@fsatsuki fsatsuki changed the title Fix/issue 1009 onboarding record dir shape fix: onboarding record dir shape #1009 Sep 7, 2026
@apackeer

Copy link
Copy Markdown
Contributor

Thank you, @fsatsuki, for picking up #1009 first — the one-token diagnosis here is exactly right, and it matches what has now been verified against current main.

This branch has drifted, though: it commits regenerated dist/** files, which were removed from the repository in #756 (dist/ is now an ignored local build output), so the PR is conflicting against main and would need a rebase that drops those seven files. In the meantime #1131 landed the same template fix plus the t174 <slug>-<id8> lane on a rebased branch, and it has been reviewed and merged (59105b319).

Closing this as superseded by #1131 so #1009 has a single path to closure. If you spot anything the merged change missed, please open a follow-up issue and tag me — happy to look.

@apackeer apackeer closed this Sep 20, 2026
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