You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On any iteration over an existing workspace/intent, AI-DLC re-runs a cold Initialization scan and re-interrogates the user with questions they already answered. A customer reported a 45-minute re-scan that re-asked answered questions for what was ultimately an 11-line fix. This is the "reuse prior workspace understanding" half of the last-30% iteration gap.
What already exists (verified against source)
The code-understanding side is largely built and should be reused, not rebuilt:
Durable space-level CodeKB store aidlc/spaces/<space>/codekb/<repo>/ (core/tools/aidlc-lib.tscodekbDir).
Git-tree-hash freshness fingerprint (codekbScopeFingerprint / codekbSourceFingerprint) and a scope_version:1 freshness block in reverse-engineering-timestamp.md.
A CURRENT/STALE/... verdict (codekb-scope-diff) + a reuse gate in the reverse-engineering stage (Reuse / Full rescan / Focused scan), so the --rescan full escape hatch effectively exists already as "Full rescan".
propagateStageInvalidation (core/tools/aidlc-validity.ts) already marks downstream artifacts stale/needs-revalidationwithout resetting completed stages (feat: project and propagate stale stage results #716 mechanism).
The two real gaps
Per-file delta, not store-wide. The freshness verdict today is whole-scope CURRENT/STALE — one changed file flips the entire store STALE with no changed-file set, so there is no "re-scan only what changed". Add a delta computation (git diff of the store's recorded generation vs HEAD, on the existing fingerprint seam) that returns the changed-file set, and make the reverse-engineering developer brief accept it.
Answered questions are not persisted as reusable Q→A pairs at all.QUESTION_ANSWERED events are write-only audit rows read back only for within-attempt authorization — never to pre-fill a later run. A durable, provenance-stamped answer store + a pre-fill reader (invoked before a stage's question fences) is a from-scratch component. Surface "reused N prior answers"; a changed question or changed code must re-ask rather than silently reuse.
Acceptance
A second workflow over the same repo/intent completes Initialization by scanning only changed files and reports the cache hit + delta.
Questions answered in the first run are not re-asked; the run reports how many prior answers were reused.
--rescan full bypasses the cache and re-scans everything.
Notes
Foundational: unblocks the amend scope and batch-ingestion work.
Problem
On any iteration over an existing workspace/intent, AI-DLC re-runs a cold Initialization scan and re-interrogates the user with questions they already answered. A customer reported a 45-minute re-scan that re-asked answered questions for what was ultimately an 11-line fix. This is the "reuse prior workspace understanding" half of the last-30% iteration gap.
What already exists (verified against source)
The code-understanding side is largely built and should be reused, not rebuilt:
aidlc/spaces/<space>/codekb/<repo>/(core/tools/aidlc-lib.tscodekbDir).codekbScopeFingerprint/codekbSourceFingerprint) and ascope_version:1freshness block inreverse-engineering-timestamp.md.CURRENT/STALE/...verdict (codekb-scope-diff) + a reuse gate in the reverse-engineering stage (Reuse / Full rescan / Focused scan), so the--rescan fullescape hatch effectively exists already as "Full rescan".propagateStageInvalidation(core/tools/aidlc-validity.ts) already marks downstream artifactsstale/needs-revalidationwithout resetting completed stages (feat: project and propagate stale stage results #716 mechanism).The two real gaps
CURRENT/STALE— one changed file flips the entire store STALE with no changed-file set, so there is no "re-scan only what changed". Add a delta computation (git diff of the store's recorded generation vs HEAD, on the existing fingerprint seam) that returns the changed-file set, and make the reverse-engineering developer brief accept it.QUESTION_ANSWEREDevents are write-only audit rows read back only for within-attempt authorization — never to pre-fill a later run. A durable, provenance-stamped answer store + a pre-fill reader (invoked before a stage's question fences) is a from-scratch component. Surface "reused N prior answers"; a changed question or changed code must re-ask rather than silently reuse.Acceptance
--rescan fullbypasses the cache and re-scans everything.Notes
amendscope and batch-ingestion work.core//harness/; keepdist/generated; add tests at the appropriate tiers.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.