Project-specific bootstrap gap. codev init does not create codev/resources/, so fresh projects have no arch.md or lessons-learned.md files. PIR / SPIR / ASPIR / MAINTAIN review prompts then fail on their first Read the current codev/resources/arch.md step. This is a separate concern from the framework-file resolution work in #1011 — these files are project-specific (each workspace's own architecture and lessons), not framework defaults the resolver should fall back to.
Bug
In a fresh codev init project:
codev/specs/, codev/plans/, codev/reviews/, codev/projects/ exist (created by createUserDirs in packages/codev/src/lib/scaffold.ts:23-44).
.codev/config.json exists.
CLAUDE.md / AGENTS.md exist.
codev/resources/ does not exist.
codev/resources/arch.md does not exist.
codev/resources/lessons-learned.md does not exist.
These files are referenced by review prompts across multiple protocols:
codev-skeleton/protocols/pir/prompts/review.md:61, :67, :88, :97, :98
codev-skeleton/protocols/spir/prompts/review.md:151, :152, :157, :158
codev-skeleton/protocols/aspir/prompts/review.md:151, :152, :157, :158
codev-skeleton/protocols/maintain/protocol.md (heavy — MAINTAIN's primary write targets)
codev-skeleton/protocols/maintain/prompts/maintain.md:35, :54, :64
codev-skeleton/protocols/maintain/prompts/review.md:22
In particular, spir/prompts/review.md:152 says "Read the current codev/resources/arch.md" with no existence-conditional. In a fresh project, the first PIR / SPIR / ASPIR review phase hits this read, the file doesn't exist, the read errors. The protocol's graceful-degradation language ("if no changes needed, write 'no changes'") covers the no-content-to-update case but not the file-not-present-at-all case.
Why this is not the same bug class as #1011
arch.md and lessons-learned.md are project-specific. Each Codev workspace's architecture and lessons-learned content is unique to that project — that's the whole point. The skeleton should NOT provide a default arch.md for the resolver to fall back to (every workspace would inherit the same generic content, which defeats the purpose).
The correct fix is bootstrap on init, not resolver-fallback. codev init should create empty (or minimally-templated) starter files in codev/resources/ so the first review phase's read succeeds against a real, locally-owned file.
Fix
Extend createUserDirs (or add a sibling createResourcesDir) in packages/codev/src/lib/scaffold.ts to also create:
-
codev/resources/ directory
-
codev/resources/arch.md with a minimal starter:
# Architecture
This document evolves as the project grows. Update it during the review phase of any work that introduces or changes architectural patterns.
_No architecture documented yet._
-
codev/resources/lessons-learned.md with a minimal starter:
# Lessons Learned
Durable engineering wisdom captured across the project's work. Update it during the review phase of any work that surfaces a generally-applicable pattern, gotcha, or constraint.
_No lessons captured yet._
The starter content is intentionally trivial — enough to make the file exist and be readable, with a one-line invitation to grow it. The first review phase that does have something meaningful to record replaces the placeholder.
codev init updated to call the new bootstrap; the existing init.ts output already lists each created file with a + prefix, so the new files surface in the output naturally.
Acceptance criteria
Out of scope
Suggested protocol
BUGFIX. Mechanically small (~10-20 LOC across scaffold.ts and init.ts, plus one or two test updates), no design discussion needed, no plan-gate value. The starter content is the only judgment call and it's a one-time write.
Related
Bug
In a fresh
codev initproject:codev/specs/,codev/plans/,codev/reviews/,codev/projects/exist (created bycreateUserDirsinpackages/codev/src/lib/scaffold.ts:23-44)..codev/config.jsonexists.CLAUDE.md/AGENTS.mdexist.codev/resources/does not exist.codev/resources/arch.mddoes not exist.codev/resources/lessons-learned.mddoes not exist.These files are referenced by review prompts across multiple protocols:
In particular,
spir/prompts/review.md:152says "Read the currentcodev/resources/arch.md" with no existence-conditional. In a fresh project, the first PIR / SPIR / ASPIR review phase hits this read, the file doesn't exist, the read errors. The protocol's graceful-degradation language ("if no changes needed, write 'no changes'") covers the no-content-to-update case but not the file-not-present-at-all case.Why this is not the same bug class as #1011
arch.mdandlessons-learned.mdare project-specific. Each Codev workspace's architecture and lessons-learned content is unique to that project — that's the whole point. The skeleton should NOT provide a defaultarch.mdfor the resolver to fall back to (every workspace would inherit the same generic content, which defeats the purpose).The correct fix is bootstrap on init, not resolver-fallback.
codev initshould create empty (or minimally-templated) starter files incodev/resources/so the first review phase's read succeeds against a real, locally-owned file.Fix
Extend
createUserDirs(or add a siblingcreateResourcesDir) inpackages/codev/src/lib/scaffold.tsto also create:codev/resources/directorycodev/resources/arch.mdwith a minimal starter:codev/resources/lessons-learned.mdwith a minimal starter:The starter content is intentionally trivial — enough to make the file exist and be readable, with a one-line invitation to grow it. The first review phase that does have something meaningful to record replaces the placeholder.
codev initupdated to call the new bootstrap; the existinginit.tsoutput already lists each created file with a+prefix, so the new files surface in the output naturally.Acceptance criteria
codev initcreatescodev/resources/,codev/resources/arch.md,codev/resources/lessons-learned.md.codev adopt(existing-project flow) does NOT clobber existingresources/*files — preserve customizations. Create only what's missing.codev update(existing-project flow) does NOT touchresources/*— these are project-owned files.initproduces a workingcodev/resources/layout.codev initproject, the first PIR / SPIR review phase that hitsRead the current codev/resources/arch.mdsucceeds and reads the starter content.Out of scope
protocol.md, templates, workflow-reference). Tracked in scaffold: deliver framework files (protocol.md, templates, workflow-ref) via resolver-aware channels (fresh-install class fix) #1011.codev init/codev update— Spec 618 left builders without local protocol files in fresh installs #738.codev/resources/shape. The bootstrap only runs oninit; adopt and update are no-ops for resources.Suggested protocol
BUGFIX. Mechanically small (~10-20 LOC across
scaffold.tsandinit.ts, plus one or two test updates), no design discussion needed, no plan-gate value. The starter content is the only judgment call and it's a one-time write.Related
codev init/codev update— Spec 618 left builders without local protocol files in fresh installs #738 — framework file copying strategic question. Tangentially related; this is the project-specific corollary.