docs: reconcile the phantom per-intent reverse-engineering record folder - #645
Conversation
|
Reviewed against the engine at the PR head (a580a3d) plus a full local gate run. The substance of this PR is right and verified: the phantom folder removal is correct, and nothing in production code reads or writes the removed surfaces. Two wording fixes are needed in the new prose before this is accurate, though - details below. Verified correct
Should fix: two overclaims in the new prose1. "Output is not in the record dir" / "never to the intent record" is too strong - the stage diary lands there every run. The stage's Learn ritual writes So after a brownfield run, users will see 2. "Reuse ... instead of regenerating it per intent" misstates the semantics - the stage reruns and overwrites. The stage condition is "Always rerun for freshness" ( Judgment call: version bumpThe PR body offers to add one; I'd take that offer. This changes shipped Nit
Out of scope but worth a follow-up issue: after this PR the entire Local gates (at the PR head)
|
a580a3d to
59e942e
Compare
|
Both overclaims were real and are fixed, the bump is in, and I folded the nit. New head is 1. "never to the intent record" — scoped to the nine deliverablesYou are right, and this is the more damaging of the two: the claim would have been falsified by the first brownfield run. I re-read the surfaces you named — the stage mandates the diary at Both places now scope the claim and name the diary explicitly. The guide paragraph is retitled "The 9 reverse-engineering deliverables are not in the record dir" and says the record dir does get the stage's own 2. "reuse instead of regenerating" — replaced with the real semanticsAlso correct, and this one mattered beyond wording: it is exactly the behavior reported in #632, so describing it as reuse would have documented away the bug the issue is about. Checked the three points — condition is "Always rerun for freshness", the timestamp artifact describes itself as the staleness marker that triggers a rerun, and there is no freshness short-circuit in the stage or the orchestrator. The guide now reads:
The stage-artifact table row and the scaffold note carry the same "overwritten by each brownfield rerun" phrasing, so the three surfaces agree. 3. Version bump — takenShipped as 2.5.14: 4. Nit — folded in
Follow-up you flagged as out of scopeFiled as #656 rather than widened into this PR: Gates at
|
|
Round 2, reviewed at the new head (59e942e) against the engine plus a fresh local gate run. All four round-1 items are genuinely fixed - verified against the code, not just read: Round-1 items: all verified fixed
I also re-verified the audit-breadcrumb sentence in the new prose: the codekb arm of the path gate is real ( Gates at 59e942e: Two wording fixes before approve, both in CHANGELOG.md1. [P2] The entry describes a runtime change that never existed.
So the folder could only appear via a pre-shell-era install, or via an agent conductor literally enacting the old Step 3 prose. The fix this PR makes is real and worth shipping: it removes stale packaged metadata (the dead 2. [P3] Optional, since you are touching the file
One logistics note: 2.5.14 is also claimed by two other open PRs (#661, #613), so whichever merges later re-bumps per the changelog policy; nothing for you to do now beyond being unsurprised if a rebase asks for a renumber. With the two CHANGELOG fixes in, this is an approve from me. |
Review round 2 on awslabs#645: the entry described a runtime behaviour change that never existed on v2. Nothing at runtime created inception/reverse-engineering/ inside an intent record — initialization stages never execute as run-stage directives (the orchestrator hard-errors on the attempt), intent birth's ensureWorkspaceDirs creates phase-level dirs only, and the shipped shell carries no intents skeleton at all. Reframe the summary around what the PR does change: the packaged scaffold data and the Workspace Scaffold prose stop advertising a per-intent folder that nothing writes. Scope the "can be deleted" upgrade note to installs that predate the shipped shell, which is the only way an empty one could exist. Also name the removed path (core/tools/data/scaffold/) so the bullet reads as packaged metadata rather than runtime behaviour, and fix the stage number: Workspace Scaffold is 0.1, 0.3 is State Initialization. While in the artifacts guide, close the loop on the generic lifecycle step, which still said every artifact lands in the intent record dir without naming the space-level exceptions documented above it.
|
Thank you for the second pass — and for tracing the runtime path yourself rather than taking the entry at its word. Both items are fixed at Before changing the text I re-walked your three anchors, because the reframe only holds if the runtime claim is genuinely absent:
So you are right: the folder could only come from a pre-shell-era install or from an agent literally enacting the old Step 3 prose, and the entry was describing a change to intent creation that never happened. That was my prose overreaching again, in the same direction as round 1 — I appreciate you catching it before it shipped rather than after. 1. [P2] Changelog entry reframedI took your suggested summary sentence nearly verbatim, since it says exactly what the diff does:
The upgrade note now scopes the deletion advice — "on installs that predate the shipped shell, an empty 2. [P3] Stage numberFixed: 0.1 Workspace Scaffold. Confirmed against both surfaces you cited ( 3. Optional item — taken
Gates at
|
Review round 2 on awslabs#645: the entry described a runtime behaviour change that never existed on v2. Nothing at runtime created inception/reverse-engineering/ inside an intent record — initialization stages never execute as run-stage directives (the orchestrator hard-errors on the attempt), intent birth's ensureWorkspaceDirs creates phase-level dirs only, and the shipped shell carries no intents skeleton at all. Reframe the summary around what the PR does change: the packaged scaffold data and the Workspace Scaffold prose stop advertising a per-intent folder that nothing writes. Scope the "can be deleted" upgrade note to installs that predate the shipped shell, which is the only way an empty one could exist. Also fix the stage number: Workspace Scaffold is 0.1, 0.3 is State Initialization. While in the artifacts guide, close the loop on the generic lifecycle step, which still said every artifact lands in the intent record dir without naming the space-level exceptions documented above it.
c056aa5 to
56f8083
Compare
apackeer
left a comment
There was a problem hiding this comment.
Approving. Round 3 verified at 56f8083f, which is a clean fast-forward from the round-2 head I verified (59e942e5), touching exactly the two files from my last comment.
Both blockers are fixed, plus the optional nit:
- [P2] Changelog reframe: the summary now attributes the change to the shipped scaffold data and the stage prose ("no longer advertise a per-intent
inception/reverse-engineering/folder that nothing writes") instead of claiming intent creation changed, and the upgrade note is correctly scoped to installs that predate the shipped shell. Matches the runtime reality we both traced (SINGLE_INIT_ERRORatcore/tools/aidlc-orchestrate.ts:2525-2526+ the initialization guard, andensureWorkspaceDirscreating phase dirs only). - [P3] Stage number: bullet now reads "Stage 0.1 Workspace Scaffold", matching the registry (
harness/claude/skills/aidlc/SKILL.md:172). - Optional guide nit taken: the lifecycle "Created" step in
docs/guide/14-artifacts-reference.md:139now carries the space-level-exceptions parenthetical, so it no longer reads as contradicting the codekb paragraph above it.
Re-verified at this head: t68-version-changelog-sync 7/7 green, bun scripts/package.ts --check green across all harness trees, and no test or prose pins the old wording.
One mechanical item before merge, not a review blocker: v2 has moved to 2.5.17 since this branch was cut, so the branch is currently conflicting and the 2.5.14 slot is taken. Per the changelog policy this needs a rebase onto v2 plus a re-bump of core/tools/aidlc-version.ts, the README badge, and the ## [2.5.14] heading to the next free patch number (regenerate dist afterwards so --check stays green). Happy to re-confirm after the rebase.
Thanks for the careful fixes across all three rounds - each one was verified against the engine rather than just reworded, and the entry now describes exactly what the diff does.
Review round 2 on awslabs#645: the entry described a runtime behaviour change that never existed on v2. Nothing at runtime created inception/reverse-engineering/ inside an intent record — initialization stages never execute as run-stage directives (the orchestrator hard-errors on the attempt), intent birth's ensureWorkspaceDirs creates phase-level dirs only, and the shipped shell carries no intents skeleton at all. Reframe the summary around what the PR does change: the packaged scaffold data and the Workspace Scaffold prose stop advertising a per-intent folder that nothing writes. Scope the "can be deleted" upgrade note to installs that predate the shipped shell, which is the only way an empty one could exist. Also fix the stage number: Workspace Scaffold is 0.1, 0.3 is State Initialization. While in the artifacts guide, close the loop on the generic lifecycle step, which still said every artifact lands in the intent record dir without naming the space-level exceptions documented above it.
56f8083 to
8d28de1
Compare
|
Thanks for the approve. Mechanical item done: rebased onto v2 Slot: 2.5.26. Reading each open PR's actual On merge order between my two branches: #644 = 2.5.25 and #645 = 2.5.26 are sequential on purpose. Merging #644 first keeps both trivial — #645 then needs at most a heading reposition. In the reverse order #644 lands below the latest heading and needs a re-bump past 2.5.26 for t68 to pass, so it's the more expensive direction. Happy to swap the two numbers if you'd rather merge this one first. What the re-bump touched: Everything you verified is unchanged. Comparing this PR's own diff before ( Gates at
CI still has never run on any head here either — the fork's runs sit in |
The engine writes reverse-engineering's 9 artifacts exclusively to the space-level per-repo codekb store (KNOWN_CODEKB_STAGES in aidlc-orchestrate.ts and aidlc-state.ts), but three surfaces still advertised a per-intent <record>/inception/reverse-engineering/ folder that nothing ever writes: the workspace-scaffold ensure-exists list, the scaffold data skeleton, and the artifacts-reference record tree. Remove the phantom folder from all three and document where the output actually lives - the confusion behind awslabs#632.
…6) (review response) Review response: * "never to the intent record" was too strong. The stage's Learn ritual writes <record>/inception/reverse-engineering/memory.md on every run (the stage file mandates it, and memoryPathFor resolves the diary path with no codekb carve-out), so after a brownfield run the folder reappears diary-shaped and the old prose would read as contradicted - recreating the confusion this change exists to remove. The Step 3 note and the artifacts guide now scope the claim to the nine deliverables and name the diary as the one thing the record dir does get, created on demand. * "reuses ... instead of regenerating it per intent" misstated the semantics. The condition is "Always rerun for freshness", the timestamp artifact is a rerun trigger rather than a skip mechanism, and no freshness short-circuit exists anywhere in the stage or the orchestrator: each applicable brownfield intent reruns the scan and overwrites the shared nine files, last write wins. The guide states that plainly instead of implying a cached per-intent view. * Version bumped to 2.5.14 with a matching CHANGELOG entry and README badge. This changes shipped dist trees and removes an installed skeleton directory, which lands as user-visible rather than a pure doc sweep. * Folded in the flagged fixture drift: withReArtifacts documented itself as copying into inception/reverse-engineering/ while the code seeds codekb. package --check green on all five harnesses; typecheck and lint clean; t68, t182, t239, t134 and gen-coverage-registry green.
Review round 2 on awslabs#645: the entry described a runtime behaviour change that never existed on v2. Nothing at runtime created inception/reverse-engineering/ inside an intent record — initialization stages never execute as run-stage directives (the orchestrator hard-errors on the attempt), intent birth's ensureWorkspaceDirs creates phase-level dirs only, and the shipped shell carries no intents skeleton at all. Reframe the summary around what the PR does change: the packaged scaffold data and the Workspace Scaffold prose stop advertising a per-intent folder that nothing writes. Scope the "can be deleted" upgrade note to installs that predate the shipped shell, which is the only way an empty one could exist. Also fix the stage number: Workspace Scaffold is 0.1, 0.3 is State Initialization. While in the artifacts guide, close the loop on the generic lifecycle step, which still said every artifact lands in the intent record dir without naming the space-level exceptions documented above it.
8d28de1 to
54a9f2f
Compare
|
#644 merged, so this branch hit exactly the trivial reposition I flagged as the cheap direction. Rebased onto v2 Nothing changed but the block's position: 2.5.26 is still free and still correct above v2's 2.5.25, so the version file and the README badge are byte-identical to the head you approved, and the The seven files this PR touches are unchanged from Gates at
|
…lided t244 slot v2 merged awslabs#644 (2.5.25) and, earlier, awslabs#596's t244-scope-matrix-doc-sync.test.ts while this branch was in review, colliding on two fronts. Per the conflict-trap convention this branch, as the second to merge, rebases and re-bumps. - CHANGELOG heading renamed 2.5.12 -> 2.5.27, placed above v2's 2.5.25 entry; aidlc-version.ts and the README badge follow. 2.5.26 is claimed by awslabs#645, so 2.5.27 is the first free slot above v2. - t244-source-freshness-receipts.test.ts -> t259-source-freshness-receipts.test.ts. v2 now ships t244-scope-matrix-doc-sync.test.ts; two files sharing a t-number auto-merge cleanly while leaving `--filter t244` matching both forever, and nothing enforces t-number uniqueness. t248-t257 are claimed by open PRs and t258 shipped with awslabs#644, so t259 is the first free slot. The header comment, six describe() blocks, five mkdtemp prefixes and the gen-coverage-registry entry follow the filename. - Coverage registry and ratchet regenerated with bun tests/gen-coverage-registry.ts rather than hand-edited.
…lided t244 slot While this branch was in review v2 merged awslabs#644 (2.5.25) and awslabs#645 (2.5.26), and earlier awslabs#596's t244-scope-matrix-doc-sync.test.ts, colliding on two fronts. Per the conflict-trap convention this branch, as the later one, rebases and re-bumps. - CHANGELOG heading renamed 2.5.12 -> 2.5.27 and placed above v2's 2.5.26 entry; aidlc-version.ts and the README badge follow. 2.5.27 is the first free slot above v2, and no open PR claims it. - t244-source-freshness-receipts.test.ts -> t259-source-freshness-receipts.test.ts. v2 now ships t244-scope-matrix-doc-sync.test.ts; two files sharing a t-number auto-merge cleanly while leaving `--filter t244` matching both forever, and nothing enforces t-number uniqueness. t248-t257 are claimed by open PRs and t258 shipped with awslabs#644, so t259 is the first free slot. The header comment, six describe() blocks, five mkdtemp prefixes and the gen-coverage-registry entry follow the filename. - Coverage registry and ratchet regenerated with bun tests/gen-coverage-registry.ts rather than hand-edited. No behavior change: every source, doc and test file is byte-identical to the reviewed head modulo the t244 -> t259 rename.
…lided t244 slot While this branch was in review v2 merged awslabs#644 (2.5.25) and awslabs#645 (2.5.26), and earlier awslabs#596's t244-scope-matrix-doc-sync.test.ts, colliding on two fronts. Per the conflict-trap convention this branch, as the later one, rebases and re-bumps. - CHANGELOG heading renamed 2.5.12 -> 2.5.27 and placed above v2's 2.5.26 entry; aidlc-version.ts and the README badge follow. 2.5.27 is the first free slot above v2, and no open PR claims it. - t244-source-freshness-receipts.test.ts -> t259-source-freshness-receipts.test.ts. v2 now ships t244-scope-matrix-doc-sync.test.ts; two files sharing a t-number auto-merge cleanly while leaving `--filter t244` matching both forever, and nothing enforces t-number uniqueness. t248-t257 are claimed by open PRs and t258 shipped with awslabs#644, so t259 is the first free slot. The header comment, six describe() blocks, five mkdtemp prefixes and the gen-coverage-registry entry follow the filename. - Coverage registry and ratchet regenerated with bun tests/gen-coverage-registry.ts rather than hand-edited. No behavior change: every source, doc and test file is byte-identical to the reviewed head modulo the t244 -> t259 rename.
…lided t244 slot While this branch was in review v2 merged awslabs#644 (2.5.25) and awslabs#645 (2.5.26), and earlier awslabs#596's t244-scope-matrix-doc-sync.test.ts, colliding on two fronts. Per the conflict-trap convention this branch, as the later one, rebases and re-bumps. - CHANGELOG heading renamed 2.5.12 -> 2.5.27 and placed above v2's 2.5.26 entry; aidlc-version.ts and the README badge follow. 2.5.27 is the first free slot above v2, and no open PR claims it. - t244-source-freshness-receipts.test.ts -> t259-source-freshness-receipts.test.ts. v2 now ships t244-scope-matrix-doc-sync.test.ts; two files sharing a t-number auto-merge cleanly while leaving `--filter t244` matching both forever, and nothing enforces t-number uniqueness. t248-t257 are claimed by open PRs and t258 shipped with awslabs#644, so t259 is the first free slot. The header comment, six describe() blocks, five mkdtemp prefixes and the gen-coverage-registry entry follow the filename. - Coverage registry and ratchet regenerated with bun tests/gen-coverage-registry.ts rather than hand-edited. No behavior change: every source, doc and test file is byte-identical to the reviewed head modulo the t244 -> t259 rename.
…lided t244 slot While this branch was in review v2 merged awslabs#644 (2.5.25) and awslabs#645 (2.5.26), and earlier awslabs#596's t244-scope-matrix-doc-sync.test.ts, colliding on two fronts. Per the conflict-trap convention this branch, as the later one, rebases and re-bumps. - CHANGELOG heading renamed 2.5.12 -> 2.5.27 and placed above v2's 2.5.26 entry; aidlc-version.ts and the README badge follow. 2.5.27 is the first free slot above v2, and no open PR claims it. - t244-source-freshness-receipts.test.ts -> t259-source-freshness-receipts.test.ts. v2 now ships t244-scope-matrix-doc-sync.test.ts; two files sharing a t-number auto-merge cleanly while leaving `--filter t244` matching both forever, and nothing enforces t-number uniqueness. t248-t257 are claimed by open PRs and t258 shipped with awslabs#644, so t259 is the first free slot. The header comment, six describe() blocks, five mkdtemp prefixes and the gen-coverage-registry entry follow the filename. - Coverage registry and ratchet regenerated with bun tests/gen-coverage-registry.ts rather than hand-edited. No behavior change: every source, doc and test file is byte-identical to the reviewed head modulo the t244 -> t259 rename.
Summary
Removes a phantom per-intent
<record>/inception/reverse-engineering/folder that three surfaces still advertise but nothing ever writes, and documents where reverse-engineering output actually lives (the space-level per-repo CodeKB). This is the documentation drift behind the confusion in #632 — the empty per-intent folder tells users the artifacts belong there, while the engine deliberately writes them toaidlc/spaces/<space>/codekb/<repo>/.Not marked
Closes #632: whether the space-level placement itself should change is a design call for maintainers — this PR only reconciles the documented tree with the implemented one.Changes
The engine treats reverse-engineering exclusively as a codekb stage —
KNOWN_CODEKB_STAGESinaidlc-orchestrate.tsandaidlc-state.ts, and the stage frontmatter declaresoutputs: aidlc/spaces/<active-space>/codekb/<repo>/. Three surfaces still said otherwise:core/aidlc-common/stages/initialization/workspace-scaffold.md— the Step 3 ensure-exists list scaffolded an emptyreverse-engineering/under<record>/inception/. Removed, with a short note explaining the deliberate absence (so it doesn't get "fixed" back).core/tools/data/scaffold/inception/reverse-engineering/.gitkeep— the matching empty skeleton dir in the scaffold data. Removed.docs/guide/14-artifacts-reference.md— the record tree listedreverse-engineering/ (conditional: brownfield)and the guide never mentioned codekb at all. Removed the tree line, annotated the stage-artifact table row with the real location, and added a "The 9 reverse-engineering deliverables are not in the record dir" paragraph mirroring the existing "Team knowledge is not in the record dir" one. It states the semantics as implemented: one store per repo that each brownfield rerun overwrites (last write wins — the condition is "Always rerun for freshness" and no short-circuit exists), the record dir receiving only the stage's ownmemory.mddiary on demand, and codekb writes carrying thecodekb > <repo> > <name>audit breadcrumb.tests/harness/fixtures.ts— thewithReArtifactsoption documented itself as copying intoinception/reverse-engineering/while the code seeds codekb. Same drift class, one comment line.No engine code changes and no command or flag changes, but the shipped
dist/trees do change (installed stage prose, plus an installed skeleton directory that goes away), so this ships as 2.5.14 with a CHANGELOG entry and the README badge.User experience
Before: a brownfield user finds an empty
intents/<intent>/inception/reverse-engineering/folder in their record tree (and in the artifacts guide) while the actual artifacts appear incodekb/<repo>/— which reads as a bug (#632). After: the scaffold pre-creates only folders that stages actually write, and both the scaffold prose and the user guide say where the nine deliverables live, that each brownfield rerun overwrites that shared store rather than snapshotting it per intent, and that the one thing landing in the record dir is the stage's ownmemory.mddiary (so the folder can still appear there, diary-only, and that is now documented rather than surprising).Checklist
If your change doesn't seem to apply, please leave them unchecked.
Test Plan
bun scripts/package.ts+bun scripts/package.ts --check→ green for all 5 harnesses (the scaffold skeleton and stage prose ship in every dist).bun run typecheckandbun run lint→ clean.t68(version/CHANGELOG/badge sync at 2.5.14),t182(codekb placement),t239(documentation parity),t134andgen-coverage-registry→ 63 tests, 0 failures.t72andt183are SDK-tier and assert on write paths rather than prose, which this change does not touch.core/,docs/andtests/to confirm no production code writes to or reads from<record>/inception/reverse-engineering/for the deliverables; the remaining references are the two new sentences documenting the stage diary, plus thewithReArtifactsfixture option whose comment this PR now corrects.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.