From 0a00b5718084374ae5c5eb089ec48d5d5e00176f Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:29:54 +1100 Subject: [PATCH 01/11] chore(porch): bugfix-1910 init bugfix --- .../status.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml diff --git a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml new file mode 100644 index 000000000..262d3e1c1 --- /dev/null +++ b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml @@ -0,0 +1,14 @@ +id: bugfix-1910 +title: prompts-name-framework-paths-t +protocol: bugfix +phase: investigate +plan_phases: [] +current_plan_phase: null +gates: + pr: + status: pending +iteration: 1 +build_complete: false +history: [] +started_at: '2026-11-22T23:29:54.501Z' +updated_at: '2026-11-22T23:29:54.503Z' From c77002d0de5480cb6bab90b5da37173d63d9ccbb Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:30:30 +1100 Subject: [PATCH 02/11] chore(porch): bugfix-1910 fix phase-transition --- .../bugfix-1910-prompts-name-framework-paths-t/status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml index 262d3e1c1..1dc623eab 100644 --- a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml +++ b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml @@ -1,7 +1,7 @@ id: bugfix-1910 title: prompts-name-framework-paths-t protocol: bugfix -phase: investigate +phase: fix plan_phases: [] current_plan_phase: null gates: @@ -11,4 +11,4 @@ iteration: 1 build_complete: false history: [] started_at: '2026-11-22T23:29:54.501Z' -updated_at: '2026-11-22T23:29:54.503Z' +updated_at: '2026-11-22T23:30:30.758Z' From 13dcc06d76f76c9b928f06434705f0ac3d267e12 Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:34:05 +1100 Subject: [PATCH 03/11] [Bugfix #1910] Fix: stop naming framework files by on-disk paths adopters do not have Shipped prompts, protocol.json check descriptions, the CLAUDE.md/AGENTS.md templates and the workflow/command reference docs named protocols, templates and roles by location (codev/protocols//protocol.md, protocols/spir/templates/spec.md, codev/roles/.md). In adopter workspaces those resolve from the installed package, so agents searched the disk for them (find / on Windows). Reworded in both trees: content is delivered by includes, the spawn prompt and porch; codev/ paths appear only as where a customization goes. --- .../aspir/consult-types/spec-review.md | 2 +- codev-skeleton/protocols/aspir/protocol.json | 2 +- .../spir/consult-types/spec-review.md | 2 +- codev-skeleton/protocols/spir/protocol.json | 2 +- codev-skeleton/resources/commands/consult.md | 4 ++-- codev-skeleton/resources/commands/overview.md | 4 +--- codev-skeleton/resources/risk-triage.md | 2 +- .../resources/workflow-reference.md | 7 ++---- codev-skeleton/templates/AGENTS.md | 20 +++++++++-------- codev-skeleton/templates/CLAUDE.md | 20 +++++++++-------- .../aspir/consult-types/spec-review.md | 2 +- codev/protocols/aspir/protocol.json | 2 +- .../spir/consult-types/spec-review.md | 2 +- codev/protocols/spir/protocol.json | 2 +- codev/resources/commands/consult.md | 4 ++-- codev/resources/commands/overview.md | 4 +--- codev/resources/risk-triage.md | 2 +- codev/resources/workflow-reference.md | 7 ++---- codev/state/bugfix-1910_thread.md | 22 +++++++++++++++++++ codev/templates/AGENTS.md | 20 +++++++++-------- codev/templates/CLAUDE.md | 20 +++++++++-------- packages/codev/src/lib/framework-ref-audit.ts | 6 +++-- 22 files changed, 90 insertions(+), 68 deletions(-) create mode 100644 codev/state/bugfix-1910_thread.md diff --git a/codev-skeleton/protocols/aspir/consult-types/spec-review.md b/codev-skeleton/protocols/aspir/consult-types/spec-review.md index 4eba02a0d..0843a488d 100644 --- a/codev-skeleton/protocols/aspir/consult-types/spec-review.md +++ b/codev-skeleton/protocols/aspir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev-skeleton/protocols/aspir/protocol.json b/codev-skeleton/protocols/aspir/protocol.json index ccebd2eb3..93019edec 100644 --- a/codev-skeleton/protocols/aspir/protocol.json +++ b/codev-skeleton/protocols/aspir/protocol.json @@ -34,7 +34,7 @@ }, "spec_has_required_sections": { "command": "grep -qF '## Problem Statement' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Current State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Desired State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Success Criteria' codev/specs/${PROJECT_TITLE}.md", - "description": "Spec must follow the canonical template delivered by the specify prompt (protocols/spir/templates/spec.md). Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" + "description": "Spec must follow the canonical template the specify prompt inlines. Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" } }, "max_iterations": 3, diff --git a/codev-skeleton/protocols/spir/consult-types/spec-review.md b/codev-skeleton/protocols/spir/consult-types/spec-review.md index 48f0c495b..f9dc2f0a4 100644 --- a/codev-skeleton/protocols/spir/consult-types/spec-review.md +++ b/codev-skeleton/protocols/spir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev-skeleton/protocols/spir/protocol.json b/codev-skeleton/protocols/spir/protocol.json index 0e043aa70..758cc262a 100644 --- a/codev-skeleton/protocols/spir/protocol.json +++ b/codev-skeleton/protocols/spir/protocol.json @@ -35,7 +35,7 @@ }, "spec_has_required_sections": { "command": "grep -qF '## Problem Statement' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Current State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Desired State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Success Criteria' codev/specs/${PROJECT_TITLE}.md", - "description": "Spec must follow the canonical template delivered by the specify prompt (protocols/spir/templates/spec.md). Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" + "description": "Spec must follow the canonical template the specify prompt inlines. Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" } }, "max_iterations": 3, diff --git a/codev-skeleton/resources/commands/consult.md b/codev-skeleton/resources/commands/consult.md index f3622998f..3a323f28b 100644 --- a/codev-skeleton/resources/commands/consult.md +++ b/codev-skeleton/resources/commands/consult.md @@ -558,12 +558,12 @@ session. If the CLI denies any of the reviewer's tool calls, consult says so: ## The Consultant Role -The consultant role (`codev/roles/consultant.md`) defines behavior: +The consultant role, which `consult` delivers to each reviewer, defines behavior: - Provides second perspectives on decisions - Offers alternatives and considerations - Works constructively (not adversarial, not a rubber stamp) -Customize by editing your local `codev/roles/consultant.md`. +Customize by creating a local `codev/roles/consultant.md`; without one, the role resolves from the installed package. ## Query Logging diff --git a/codev-skeleton/resources/commands/overview.md b/codev-skeleton/resources/commands/overview.md index 397247c2d..3f8350550 100644 --- a/codev-skeleton/resources/commands/overview.md +++ b/codev-skeleton/resources/commands/overview.md @@ -106,6 +106,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## Related Documentation -- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow -- [Architect Role](../roles/architect.md) - Architect responsibilities -- [Builder Role](../roles/builder.md) - Builder responsibilities +- The SPIR protocol and the architect and builder roles are delivered to the agents that run them (by `afx spawn` and porch); they resolve from the installed package unless this project customizes them under `codev/protocols/` or `codev/roles/`. diff --git a/codev-skeleton/resources/risk-triage.md b/codev-skeleton/resources/risk-triage.md index fcfaee768..dfe2f7ecf 100644 --- a/codev-skeleton/resources/risk-triage.md +++ b/codev-skeleton/resources/risk-triage.md @@ -1,6 +1,6 @@ # PR Review Risk Triage Guide -Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see `codev/roles/architect.md` Section 4. +Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see Section 4 of the architect role, which `afx` delivers to the architect session. ## Risk Assessment diff --git a/codev-skeleton/resources/workflow-reference.md b/codev-skeleton/resources/workflow-reference.md index 1643a95cf..2bd8f381f 100644 --- a/codev-skeleton/resources/workflow-reference.md +++ b/codev-skeleton/resources/workflow-reference.md @@ -1,6 +1,6 @@ # Architect-Builder Workflow Reference -Quick reference for the 7-stage project workflow. For protocol details, see `codev/protocols/spir/protocol.md`. +Quick reference for the 7-stage project workflow. Protocol details arrive with the work: `afx spawn` inlines the protocol into the builder's prompt and porch delivers each phase's prompt. ## Workflow Overview @@ -243,8 +243,5 @@ afx cleanup -p --force ## Related Documentation -- Full SPIR protocol: `codev/protocols/spir/protocol.md` -- Builder role: `codev/roles/builder.md` -- Architect role: `codev/roles/architect.md` -- Consultant role: `codev/roles/consultant.md` +- The SPIR protocol and the builder, architect and consultant roles: delivered by `afx spawn`, porch and `consult`. They resolve from the installed package and exist under `codev/protocols/` and `codev/roles/` only when this project customizes them. - Risk triage guide: `codev/resources/risk-triage.md` diff --git a/codev-skeleton/templates/AGENTS.md b/codev-skeleton/templates/AGENTS.md index 4f0bd80dc..7ef2c3d6f 100644 --- a/codev-skeleton/templates/AGENTS.md +++ b/codev-skeleton/templates/AGENTS.md @@ -24,15 +24,17 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`) -- **ASPIR**: Autonomous SPIR — no human gates on spec/plan (`codev/protocols/aspir/protocol.md`) -- **AIR**: Autonomous Implement & Review for small features (`codev/protocols/air/protocol.md`) -- **BUGFIX**: Bug fixes from GitHub issues (`codev/protocols/bugfix/protocol.md`) -- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) (`codev/protocols/pir/protocol.md`) -- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`) -- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`) -- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique (`codev/protocols/research/protocol.md`) -- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code (`codev/protocols/spike/protocol.md`) +Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. + +- **SPIR**: Multi-phase development with consultation +- **ASPIR**: Autonomous SPIR — no human gates on spec/plan +- **AIR**: Autonomous Implement & Review for small features +- **BUGFIX**: Bug fixes from GitHub issues +- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) +- **EXPERIMENT**: Disciplined experimentation +- **MAINTAIN**: Codebase maintenance +- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique +- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code ## File Resolution (How Codev Finds Protocols and Templates) diff --git a/codev-skeleton/templates/CLAUDE.md b/codev-skeleton/templates/CLAUDE.md index 76bbf4ef2..c7769d374 100644 --- a/codev-skeleton/templates/CLAUDE.md +++ b/codev-skeleton/templates/CLAUDE.md @@ -22,15 +22,17 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`) -- **ASPIR**: Autonomous SPIR — no human gates on spec/plan (`codev/protocols/aspir/protocol.md`) -- **AIR**: Autonomous Implement & Review for small features (`codev/protocols/air/protocol.md`) -- **BUGFIX**: Bug fixes from GitHub issues (`codev/protocols/bugfix/protocol.md`) -- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) (`codev/protocols/pir/protocol.md`) -- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`) -- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`) -- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique (`codev/protocols/research/protocol.md`) -- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code (`codev/protocols/spike/protocol.md`) +Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. + +- **SPIR**: Multi-phase development with consultation +- **ASPIR**: Autonomous SPIR — no human gates on spec/plan +- **AIR**: Autonomous Implement & Review for small features +- **BUGFIX**: Bug fixes from GitHub issues +- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) +- **EXPERIMENT**: Disciplined experimentation +- **MAINTAIN**: Codebase maintenance +- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique +- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code ## File Resolution (How Codev Finds Protocols and Templates) diff --git a/codev/protocols/aspir/consult-types/spec-review.md b/codev/protocols/aspir/consult-types/spec-review.md index 4eba02a0d..0843a488d 100644 --- a/codev/protocols/aspir/consult-types/spec-review.md +++ b/codev/protocols/aspir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev/protocols/aspir/protocol.json b/codev/protocols/aspir/protocol.json index ccebd2eb3..93019edec 100644 --- a/codev/protocols/aspir/protocol.json +++ b/codev/protocols/aspir/protocol.json @@ -34,7 +34,7 @@ }, "spec_has_required_sections": { "command": "grep -qF '## Problem Statement' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Current State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Desired State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Success Criteria' codev/specs/${PROJECT_TITLE}.md", - "description": "Spec must follow the canonical template delivered by the specify prompt (protocols/spir/templates/spec.md). Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" + "description": "Spec must follow the canonical template the specify prompt inlines. Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" } }, "max_iterations": 3, diff --git a/codev/protocols/spir/consult-types/spec-review.md b/codev/protocols/spir/consult-types/spec-review.md index 48f0c495b..f9dc2f0a4 100644 --- a/codev/protocols/spir/consult-types/spec-review.md +++ b/codev/protocols/spir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev/protocols/spir/protocol.json b/codev/protocols/spir/protocol.json index 0e043aa70..758cc262a 100644 --- a/codev/protocols/spir/protocol.json +++ b/codev/protocols/spir/protocol.json @@ -35,7 +35,7 @@ }, "spec_has_required_sections": { "command": "grep -qF '## Problem Statement' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Current State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Desired State' codev/specs/${PROJECT_TITLE}.md && grep -qF '## Success Criteria' codev/specs/${PROJECT_TITLE}.md", - "description": "Spec must follow the canonical template delivered by the specify prompt (protocols/spir/templates/spec.md). Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" + "description": "Spec must follow the canonical template the specify prompt inlines. Required headings: ## Problem Statement, ## Current State, ## Desired State, ## Success Criteria" } }, "max_iterations": 3, diff --git a/codev/resources/commands/consult.md b/codev/resources/commands/consult.md index f3622998f..3a323f28b 100644 --- a/codev/resources/commands/consult.md +++ b/codev/resources/commands/consult.md @@ -558,12 +558,12 @@ session. If the CLI denies any of the reviewer's tool calls, consult says so: ## The Consultant Role -The consultant role (`codev/roles/consultant.md`) defines behavior: +The consultant role, which `consult` delivers to each reviewer, defines behavior: - Provides second perspectives on decisions - Offers alternatives and considerations - Works constructively (not adversarial, not a rubber stamp) -Customize by editing your local `codev/roles/consultant.md`. +Customize by creating a local `codev/roles/consultant.md`; without one, the role resolves from the installed package. ## Query Logging diff --git a/codev/resources/commands/overview.md b/codev/resources/commands/overview.md index 5c9f9455a..d5f4442ea 100644 --- a/codev/resources/commands/overview.md +++ b/codev/resources/commands/overview.md @@ -130,6 +130,4 @@ Customize agent-farm commands via `.codev/config.json` (project root): ## Related Documentation -- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow -- [Architect Role](../roles/architect.md) - Architect responsibilities -- [Builder Role](../roles/builder.md) - Builder responsibilities +- The SPIR protocol and the architect and builder roles are delivered to the agents that run them (by `afx spawn` and porch); they resolve from the installed package unless this project customizes them under `codev/protocols/` or `codev/roles/`. diff --git a/codev/resources/risk-triage.md b/codev/resources/risk-triage.md index fcfaee768..dfe2f7ecf 100644 --- a/codev/resources/risk-triage.md +++ b/codev/resources/risk-triage.md @@ -1,6 +1,6 @@ # PR Review Risk Triage Guide -Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see `codev/roles/architect.md` Section 4. +Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see Section 4 of the architect role, which `afx` delivers to the architect session. ## Risk Assessment diff --git a/codev/resources/workflow-reference.md b/codev/resources/workflow-reference.md index a3fdff14d..646f0fbd4 100644 --- a/codev/resources/workflow-reference.md +++ b/codev/resources/workflow-reference.md @@ -1,6 +1,6 @@ # Architect-Builder Workflow Reference -Quick reference for the 7-stage project workflow. For protocol details, see `codev/protocols/spir/protocol.md`. +Quick reference for the 7-stage project workflow. Protocol details arrive with the work: `afx spawn` inlines the protocol into the builder's prompt and porch delivers each phase's prompt. ## Workflow Overview @@ -271,7 +271,4 @@ afx cleanup -p --force ## Related Documentation -- Full SPIR protocol: `codev/protocols/spir/protocol.md` -- Builder role: `codev/roles/builder.md` -- Architect role: `codev/roles/architect.md` -- Consultant role: `codev/roles/consultant.md` +- The SPIR protocol and the builder, architect and consultant roles: delivered by `afx spawn`, porch and `consult`. They resolve from the installed package and exist under `codev/protocols/` and `codev/roles/` only when this project customizes them. diff --git a/codev/state/bugfix-1910_thread.md b/codev/state/bugfix-1910_thread.md new file mode 100644 index 000000000..01bc72af6 --- /dev/null +++ b/codev/state/bugfix-1910_thread.md @@ -0,0 +1,22 @@ +# bugfix-1910 thread + +## Investigate (2026-11-23) + +- Reproduced by grep: shipped text names framework files by location (`protocols/spir/templates/spec.md`, + `codev/protocols//protocol.md`, `../protocols/spir/protocol.md`, `codev/roles/.md`). In an + adopter workspace those resolve from the installed package and are not on disk, so an agent that + reads them literally searches for them (`find /` on Windows — Spec 1658 M14). +- Architect scope (2026-11-22): cause 1 only (wording); cause 2 (orphaned children on Windows) is #1915. + Re-grep both trees, not just the issue's list. +- Sites beyond the issue's list: `resources/workflow-reference.md`, `resources/commands/overview.md`, + `resources/commands/consult.md`, `resources/risk-triage.md` (both trees). They are framework + files `codev update` treats as updatable. + +## Fix + +- Reworded every site in both trees; CLAUDE.md/AGENTS.md templates keep their shared body and the + two trees stay byte-identical. +- The spec-review edit trips the Spec 1280 deletion guard by design: re-baselined the two + spec-review fixtures and logged R9 in `codev/resources/1280-retirements.md`. +- `framework-ref-audit.ts` comment called the protocol-path list "intentional"; corrected. +- New guard: `packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts`. diff --git a/codev/templates/AGENTS.md b/codev/templates/AGENTS.md index 4f0bd80dc..7ef2c3d6f 100644 --- a/codev/templates/AGENTS.md +++ b/codev/templates/AGENTS.md @@ -24,15 +24,17 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`) -- **ASPIR**: Autonomous SPIR — no human gates on spec/plan (`codev/protocols/aspir/protocol.md`) -- **AIR**: Autonomous Implement & Review for small features (`codev/protocols/air/protocol.md`) -- **BUGFIX**: Bug fixes from GitHub issues (`codev/protocols/bugfix/protocol.md`) -- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) (`codev/protocols/pir/protocol.md`) -- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`) -- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`) -- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique (`codev/protocols/research/protocol.md`) -- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code (`codev/protocols/spike/protocol.md`) +Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. + +- **SPIR**: Multi-phase development with consultation +- **ASPIR**: Autonomous SPIR — no human gates on spec/plan +- **AIR**: Autonomous Implement & Review for small features +- **BUGFIX**: Bug fixes from GitHub issues +- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) +- **EXPERIMENT**: Disciplined experimentation +- **MAINTAIN**: Codebase maintenance +- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique +- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code ## File Resolution (How Codev Finds Protocols and Templates) diff --git a/codev/templates/CLAUDE.md b/codev/templates/CLAUDE.md index 76bbf4ef2..c7769d374 100644 --- a/codev/templates/CLAUDE.md +++ b/codev/templates/CLAUDE.md @@ -22,15 +22,17 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -- **SPIR**: Multi-phase development with consultation (`codev/protocols/spir/protocol.md`) -- **ASPIR**: Autonomous SPIR — no human gates on spec/plan (`codev/protocols/aspir/protocol.md`) -- **AIR**: Autonomous Implement & Review for small features (`codev/protocols/air/protocol.md`) -- **BUGFIX**: Bug fixes from GitHub issues (`codev/protocols/bugfix/protocol.md`) -- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) (`codev/protocols/pir/protocol.md`) -- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`) -- **MAINTAIN**: Codebase maintenance (`codev/protocols/maintain/protocol.md`) -- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique (`codev/protocols/research/protocol.md`) -- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code (`codev/protocols/spike/protocol.md`) +Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. + +- **SPIR**: Multi-phase development with consultation +- **ASPIR**: Autonomous SPIR — no human gates on spec/plan +- **AIR**: Autonomous Implement & Review for small features +- **BUGFIX**: Bug fixes from GitHub issues +- **PIR**: Plan / Implement / Review — issue-driven with three human gates (plan-approval, dev-approval, pr) +- **EXPERIMENT**: Disciplined experimentation +- **MAINTAIN**: Codebase maintenance +- **RESEARCH**: Multi-agent research with 3-way investigation, synthesis, and critique +- **SPIKE**: Time-boxed feasibility investigation — findings, not shipped code ## File Resolution (How Codev Finds Protocols and Templates) diff --git a/packages/codev/src/lib/framework-ref-audit.ts b/packages/codev/src/lib/framework-ref-audit.ts index bb49557a3..2850420fc 100644 --- a/packages/codev/src/lib/framework-ref-audit.ts +++ b/packages/codev/src/lib/framework-ref-audit.ts @@ -23,8 +23,10 @@ * user-evolved files (`arch.md`, `lessons-learned.md`) that builders and * architects reference and write by path legitimately. * - Plain documentation references (backtick mentions, "see codev/…") are - * NOT flagged. The rule is about *fetching*, not *referencing* — the - * protocol list in CLAUDE.md/AGENTS.md, for example, is intentional. + * NOT flagged here. The rule is about *fetching*, not *referencing*. A + * reference that reads as "the file is at this path" still sends agents + * searching the disk for it (#1910); the framework's own test + * `bugfix-1910-framework-paths.test.ts` guards the shipped text for that. */ import { existsSync, readdirSync, readFileSync } from 'node:fs'; import { join, relative } from 'node:path'; From 64915bfb4e94e0823a45ead590091dbd8376766e Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:34:05 +1100 Subject: [PATCH 04/11] [Bugfix #1910] Test: no shipped text names a framework file by an on-disk path New guard scans both trees for framework paths outside resolver includes and customization pointers. Re-baselines the Spec 1280 deletion guard for the two spec-review.md lines (R9 in 1280-retirements.md). --- codev/resources/1280-retirements.md | 29 +++++ .../bugfix-1910-framework-paths.test.ts | 103 ++++++++++++++++++ .../aspir-spec-review.md.baseline | 2 +- .../spir-spec-review.md.baseline | 2 +- 4 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts diff --git a/codev/resources/1280-retirements.md b/codev/resources/1280-retirements.md index 1ceb2ad01..0730840d2 100644 --- a/codev/resources/1280-retirements.md +++ b/codev/resources/1280-retirements.md @@ -472,3 +472,32 @@ pre-existing flakiness". 2. **Guard kept, not retired.** Only the baselines move. 3. **Audit trail.** This entry and `bugfix-1902-prompt-sweep.test.ts`, which asserts no agent-facing file (PIR included) tells a builder to skip a flaky test. + +## R9 — re-baseline spir/aspir spec-review.md for Bugfix #1910 (framework paths named by location) + +**Status: applied in the #1910 PR, scope set by the architect (main) on 2026-11-22: reword every +shipped site that sends an agent looking for a framework file by path. The owner sees it at the +`pr` gate.** + +| | | +|---|---| +| **Assertion** | `spec-1280-prompt-deletion-guard.test.ts` → *"no baseline line has been deleted"* (kept, not retired) | +| **Files (2)** | `codev/protocols/{spir,aspir}/consult-types/spec-review.md` | +| **Originating issue** | #1910 (Spec 1658 finding M14) | +| **Baselines** | `fixtures/spec-1280-baselines/{spir,aspir}-spec-review.md.baseline`, re-captured | + +### What was removed + +One line per file, the Structure bullet, replaced in place: "the spec follows the delivered +template (`protocols/spir/templates/spec.md`)" now reads "the SPIR spec template, which the +specify prompt inlines (it is delivered content, not a file to look for in this workspace)". In +an adopter workspace that path exists only inside the installed package, so a reviewer that read +it literally searched the disk for it (`find /` on Windows). + +### Class-invariant compliance + +1. **Behaviour grep green.** Both keep `Baked Decisions` and `do not autonomously`; mirror parity + holds. +2. **Guard kept, not retired.** Only the baselines move. +3. **Audit trail.** This entry and `bugfix-1910-framework-paths.test.ts`, which asserts no shipped + file names a framework file by an on-disk path outside a resolver include. diff --git a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts new file mode 100644 index 000000000..bf4418980 --- /dev/null +++ b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts @@ -0,0 +1,103 @@ +/** + * Regression guard for cluesmith/codev#1910 — shipped text named framework files by an on-disk + * path that adopter workspaces do not have. + * + * Protocols, roles and templates resolve at runtime through the four-tier lookup; in an adopter + * workspace the standard ones live only inside the installed package. A prompt or template that + * says "the template is at `protocols/spir/templates/spec.md`" or lists a protocol as + * "(`codev/protocols/experiment/protocol.md`)" reads as a location, and agents went looking for it + * with `find /`. Content reaches agents through `{{> …}}` includes, the spawn prompt and porch. + * + * Allowed: resolver includes (`{{> protocols/…}}`), and lines that name a `codev/…` path as the + * place a project's own customization goes (they say "customiz…", "local" or "override"). + */ +import { describe, it, expect } from 'vitest'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +const repoRoot = path.resolve(import.meta.dirname, '../../../..'); + +/** What ships to adopters (the skeleton) and our instance's copies of the same framework files. */ +const ROOTS = [ + 'codev-skeleton', + 'codev/protocols', + 'codev/roles', + 'codev/templates', + 'codev/resources/commands', + 'codev/resources/workflow-reference.md', + 'codev/resources/risk-triage.md', +]; + +/** RELEASE is this repository's own protocol; it never ships, and its files exist here. */ +const EXCLUDED = [/^codev\/protocols\/release\//]; + +/** A framework file named by location: `codev/protocols/x/…`, `protocols/x/templates/…`, `../roles/x.md`. */ +const FRAMEWORK_PATH = + /(?:\bcodev\/|\.\.\/|`|\(|\s)(?:protocols\/[a-z-]+\/(?:protocol\.md|templates\/|prompts\/|consult-types\/)|roles\/[a-z-]+\.md)/; + +const ALLOWED = (line: string) => + /\{\{>\s*protocols\//.test(line) || /customi[sz]|\blocal\b|override/i.test(line); + +function walk(rel: string): string[] { + const full = path.join(repoRoot, rel); + if (!fs.existsSync(full)) return []; + if (fs.statSync(full).isFile()) return [rel]; + const out: string[] = []; + for (const entry of fs.readdirSync(full, { withFileTypes: true })) { + const child = path.posix.join(rel, entry.name); + if (entry.isDirectory()) out.push(...walk(child)); + else if (/\.(md|json)$/.test(entry.name)) out.push(child); + } + return out; +} + +const FILES = [...new Set(ROOTS.flatMap(walk))].filter((f) => !EXCLUDED.some((re) => re.test(f))); + +describe('#1910 — shipped text never names a framework file by an on-disk path', () => { + it('scans the files that carried the bug', () => { + for (const f of [ + 'codev-skeleton/protocols/spir/consult-types/spec-review.md', + 'codev-skeleton/protocols/aspir/protocol.json', + 'codev-skeleton/templates/CLAUDE.md', + 'codev-skeleton/templates/AGENTS.md', + 'codev-skeleton/resources/workflow-reference.md', + 'codev/templates/CLAUDE.md', + ]) { + expect(FILES).toContain(f); + } + }); + + it('every remaining framework path is a resolver include or a customization pointer', () => { + const hits: string[] = []; + for (const file of FILES) { + fs.readFileSync(path.join(repoRoot, file), 'utf-8').split('\n').forEach((text, i) => { + if (FRAMEWORK_PATH.test(text) && !ALLOWED(text)) hits.push(` ${file}:${i + 1} ${text.trim().slice(0, 160)}`); + }); + } + expect( + hits, + `These name a framework file by a path adopter workspaces do not have; agents search the disk for it. ` + + `Deliver the content (include, spawn prompt, porch) or name the path only as where a customization goes.\n` + + hits.join('\n'), + ).toEqual([]); + }); + + it('the guard bites on the shapes #1910 found', () => { + for (const line of [ + 'the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines.', + '"description": "canonical template delivered by the specify prompt (protocols/spir/templates/spec.md)."', + '- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`)', + '- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow', + '- Builder role: `codev/roles/builder.md`', + ]) { + expect(FRAMEWORK_PATH.test(line) && !ALLOWED(line), line).toBe(true); + } + expect(ALLOWED('{{> protocols/spir/templates/spec.md}}')).toBe(true); + }); + + it.each(['codev-skeleton', 'codev'])('%s CLAUDE.md/AGENTS.md templates say protocols are delivered, not opened', (tree) => { + for (const t of ['CLAUDE.md', 'AGENTS.md']) { + expect(fs.readFileSync(path.join(repoRoot, tree, 'templates', t), 'utf-8'), t).toContain('there is no protocol file to open'); + } + }); +}); diff --git a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline index 4eba02a0d..0843a488d 100644 --- a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline +++ b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline index 48f0c495b..f9dc2f0a4 100644 --- a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline +++ b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. From 2cee615738b01e7ea6544e732c6e5efb962cafaa Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:41:02 +1100 Subject: [PATCH 05/11] chore(porch): bugfix-1910 pr phase-transition --- .../bugfix-1910-prompts-name-framework-paths-t/status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml index 1dc623eab..2ecb35a6d 100644 --- a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml +++ b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml @@ -1,7 +1,7 @@ id: bugfix-1910 title: prompts-name-framework-paths-t protocol: bugfix -phase: fix +phase: pr plan_phases: [] current_plan_phase: null gates: @@ -11,4 +11,4 @@ iteration: 1 build_complete: false history: [] started_at: '2026-11-22T23:29:54.501Z' -updated_at: '2026-11-22T23:30:30.758Z' +updated_at: '2026-11-22T23:41:02.640Z' From 92667d2ac9245edacb0e8bc9a8076a6837f7254c Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:46:10 +1100 Subject: [PATCH 06/11] =?UTF-8?q?[Bugfix=20#1910]=20Fix:=20CMAP=20?= =?UTF-8?q?=E2=80=94=20remaining=20directory-level=20protocol=20references?= =?UTF-8?q?;=20guard=20catches=20them?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Templates and cheatsheets still pointed at `codev/protocols/` for the full protocol text; consult.md and the consult skill gave a fixed load path. Reworded in both trees and all skill copies. The guard now flags any codev/protocols|roles mention (directories and forms included) unless the line explains customization or resolution, and no longer exempts lines that merely contain "local". --- .claude/skills/consult/SKILL.md | 4 +-- .codex/skills/consult/SKILL.md | 4 +-- .../.claude/skills/consult/SKILL.md | 4 +-- codev-skeleton/.codex/skills/consult/SKILL.md | 4 +-- codev-skeleton/resources/commands/consult.md | 2 +- codev-skeleton/templates/AGENTS.md | 4 +-- codev-skeleton/templates/CLAUDE.md | 4 +-- codev-skeleton/templates/cheatsheet.md | 2 +- codev/resources/cheatsheet.md | 2 +- codev/resources/commands/consult.md | 2 +- codev/state/bugfix-1910_thread.md | 11 ++++++++ codev/templates/AGENTS.md | 4 +-- codev/templates/CLAUDE.md | 4 +-- codev/templates/cheatsheet.md | 2 +- .../bugfix-1910-framework-paths.test.ts | 25 +++++++++++++++---- 15 files changed, 52 insertions(+), 26 deletions(-) diff --git a/.claude/skills/consult/SKILL.md b/.claude/skills/consult/SKILL.md index 71b068335..d4321b50f 100644 --- a/.claude/skills/consult/SKILL.md +++ b/.claude/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under -`protocols//consult-types/`. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from +`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. ## Usage patterns diff --git a/.codex/skills/consult/SKILL.md b/.codex/skills/consult/SKILL.md index 71b068335..d4321b50f 100644 --- a/.codex/skills/consult/SKILL.md +++ b/.codex/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under -`protocols//consult-types/`. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from +`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. ## Usage patterns diff --git a/codev-skeleton/.claude/skills/consult/SKILL.md b/codev-skeleton/.claude/skills/consult/SKILL.md index 71b068335..d4321b50f 100644 --- a/codev-skeleton/.claude/skills/consult/SKILL.md +++ b/codev-skeleton/.claude/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under -`protocols//consult-types/`. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from +`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. ## Usage patterns diff --git a/codev-skeleton/.codex/skills/consult/SKILL.md b/codev-skeleton/.codex/skills/consult/SKILL.md index 71b068335..d4321b50f 100644 --- a/codev-skeleton/.codex/skills/consult/SKILL.md +++ b/codev-skeleton/.codex/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under -`protocols//consult-types/`. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from +`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. ## Usage patterns diff --git a/codev-skeleton/resources/commands/consult.md b/codev-skeleton/resources/commands/consult.md index 3a323f28b..394aa0ea2 100644 --- a/codev-skeleton/resources/commands/consult.md +++ b/codev-skeleton/resources/commands/consult.md @@ -337,7 +337,7 @@ consult -m codex --type integration --issue 42 --base ci - **Architect context** (cwd outside `.builders/` or `--issue` provided): requires `--issue ` to identify the project **Prompt templates:** -Protocol-specific prompts are loaded from `codev/protocols//consult-types/-review.md`. The `integration` type uses the shared `codev/consult-types/integration-review.md`. +Protocol-specific prompts (`protocols//consult-types/-review.md`) and the shared `integration` prompt (`consult-types/integration-review.md`) resolve through the four-tier lookup: a copy this project customizes under `codev/` overrides the one in the installed package. ### Stats Mode diff --git a/codev-skeleton/templates/AGENTS.md b/codev-skeleton/templates/AGENTS.md index 7ef2c3d6f..96cddb736 100644 --- a/codev-skeleton/templates/AGENTS.md +++ b/codev-skeleton/templates/AGENTS.md @@ -58,7 +58,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - Development protocols +- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) ## Working with Project Labels @@ -159,4 +159,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Read the full protocol documentation in `codev/protocols/`. +Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. diff --git a/codev-skeleton/templates/CLAUDE.md b/codev-skeleton/templates/CLAUDE.md index c7769d374..a31985685 100644 --- a/codev-skeleton/templates/CLAUDE.md +++ b/codev-skeleton/templates/CLAUDE.md @@ -56,7 +56,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - Development protocols +- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) ## Working with Project Labels @@ -157,4 +157,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Read the full protocol documentation in `codev/protocols/`. +Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. diff --git a/codev-skeleton/templates/cheatsheet.md b/codev-skeleton/templates/cheatsheet.md index b9ce9cf4d..6e0520a15 100644 --- a/codev-skeleton/templates/cheatsheet.md +++ b/codev-skeleton/templates/cheatsheet.md @@ -196,4 +196,4 @@ In strict mode porch hands builders these commands itself. --- -*For detailed documentation, see the full protocol files in `codev/protocols/`.* +*Porch and `afx spawn` deliver each protocol's full text; a protocol resolves from the installed package unless this project customizes it under `codev/protocols/`.* diff --git a/codev/resources/cheatsheet.md b/codev/resources/cheatsheet.md index 955f9ed50..cc3a7781e 100644 --- a/codev/resources/cheatsheet.md +++ b/codev/resources/cheatsheet.md @@ -198,4 +198,4 @@ In strict mode porch hands builders these commands itself. --- -*For detailed documentation, see the full protocol files in `codev/protocols/`.* +*Porch and `afx spawn` deliver each protocol's full text; a protocol resolves from the installed package unless this project customizes it under `codev/protocols/`.* diff --git a/codev/resources/commands/consult.md b/codev/resources/commands/consult.md index 3a323f28b..394aa0ea2 100644 --- a/codev/resources/commands/consult.md +++ b/codev/resources/commands/consult.md @@ -337,7 +337,7 @@ consult -m codex --type integration --issue 42 --base ci - **Architect context** (cwd outside `.builders/` or `--issue` provided): requires `--issue ` to identify the project **Prompt templates:** -Protocol-specific prompts are loaded from `codev/protocols//consult-types/-review.md`. The `integration` type uses the shared `codev/consult-types/integration-review.md`. +Protocol-specific prompts (`protocols//consult-types/-review.md`) and the shared `integration` prompt (`consult-types/integration-review.md`) resolve through the four-tier lookup: a copy this project customizes under `codev/` overrides the one in the installed package. ### Stats Mode diff --git a/codev/state/bugfix-1910_thread.md b/codev/state/bugfix-1910_thread.md index 01bc72af6..70ac762f2 100644 --- a/codev/state/bugfix-1910_thread.md +++ b/codev/state/bugfix-1910_thread.md @@ -20,3 +20,14 @@ spec-review fixtures and logged R9 in `codev/resources/1280-retirements.md`. - `framework-ref-audit.ts` comment called the protocol-path list "intentional"; corrected. - New guard: `packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts`. + +## PR #1949 — CMAP iter 1 + +- gemini: skipped (agy CLI not installed on this host, non-blocking). codex: APPROVE. +- claude: REQUEST_CHANGES, all valid. The templates still ended with "Read the full protocol + documentation in `codev/protocols/`" (and three cheatsheet copies), which contradicted the new + line. The guard missed directory and `` forms, and it allowed any line containing + the word "local". Fixed: reworded those sites, the templates' Key Locations line, consult.md's + prompt-load sentence and the consult SKILL line (all four copies). The guard now flags any + `codev/protocols|roles/` mention unless the line explains customization or resolution, or is a + risk-triage table row. diff --git a/codev/templates/AGENTS.md b/codev/templates/AGENTS.md index 7ef2c3d6f..96cddb736 100644 --- a/codev/templates/AGENTS.md +++ b/codev/templates/AGENTS.md @@ -58,7 +58,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - Development protocols +- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) ## Working with Project Labels @@ -159,4 +159,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Read the full protocol documentation in `codev/protocols/`. +Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. diff --git a/codev/templates/CLAUDE.md b/codev/templates/CLAUDE.md index c7769d374..a31985685 100644 --- a/codev/templates/CLAUDE.md +++ b/codev/templates/CLAUDE.md @@ -56,7 +56,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - Development protocols +- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) ## Working with Project Labels @@ -157,4 +157,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Read the full protocol documentation in `codev/protocols/`. +Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. diff --git a/codev/templates/cheatsheet.md b/codev/templates/cheatsheet.md index b9ce9cf4d..6e0520a15 100644 --- a/codev/templates/cheatsheet.md +++ b/codev/templates/cheatsheet.md @@ -196,4 +196,4 @@ In strict mode porch hands builders these commands itself. --- -*For detailed documentation, see the full protocol files in `codev/protocols/`.* +*Porch and `afx spawn` deliver each protocol's full text; a protocol resolves from the installed package unless this project customizes it under `codev/protocols/`.* diff --git a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts index bf4418980..5dc53ea91 100644 --- a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts +++ b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts @@ -8,8 +8,9 @@ * "(`codev/protocols/experiment/protocol.md`)" reads as a location, and agents went looking for it * with `find /`. Content reaches agents through `{{> …}}` includes, the spawn prompt and porch. * - * Allowed: resolver includes (`{{> protocols/…}}`), and lines that name a `codev/…` path as the - * place a project's own customization goes (they say "customiz…", "local" or "override"). + * Allowed: resolver includes (`{{> protocols/…}}`), lines that name a `codev/…` path as the place + * a project's own customization goes or that explain resolution, and markdown table rows (see + * ALLOWED below). */ import { describe, it, expect } from 'vitest'; import * as fs from 'node:fs'; @@ -31,12 +32,22 @@ const ROOTS = [ /** RELEASE is this repository's own protocol; it never ships, and its files exist here. */ const EXCLUDED = [/^codev\/protocols\/release\//]; -/** A framework file named by location: `codev/protocols/x/…`, `protocols/x/templates/…`, `../roles/x.md`. */ +/** + * A framework file or directory named by location: any `codev/protocols/…` or `codev/roles/…` + * (directories and `` forms included), and the bare or relative + * `protocols/x/templates/…`, `../roles/x.md` forms. + */ const FRAMEWORK_PATH = - /(?:\bcodev\/|\.\.\/|`|\(|\s)(?:protocols\/[a-z-]+\/(?:protocol\.md|templates\/|prompts\/|consult-types\/)|roles\/[a-z-]+\.md)/; + /\bcodev\/(?:protocols|roles)\/|(?:\.\.\/|`|\(|\s)(?:protocols\/[a-z<>-]+\/(?:protocol\.md|templates\/|prompts\/|consult-types\/)|roles\/[a-z-]+\.md)/; +/** + * Allowed: a resolver include; a line that frames the path as where a customization goes, or + * explains resolution/absence; a markdown table row (risk-triage lists paths a PR diff touches). + */ const ALLOWED = (line: string) => - /\{\{>\s*protocols\//.test(line) || /customi[sz]|\blocal\b|override/i.test(line); + /\{\{>\s*protocols\//.test(line) || + /customi[sz]|override|four-tier|resolves? via|is absent|add its own/i.test(line) || + /^\s*\|/.test(line); function walk(rel: string): string[] { const full = path.join(repoRoot, rel); @@ -89,6 +100,10 @@ describe('#1910 — shipped text never names a framework file by an on-disk path '- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`)', '- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow', '- Builder role: `codev/roles/builder.md`', + 'Read the full protocol documentation in `codev/protocols/`.', + 'Protocol-specific prompts are loaded from `codev/protocols//consult-types/-review.md`.', + '*For detailed documentation, see the full protocol files in `codev/protocols/`.*', + 'See your local `codev/roles/consultant.md`.', ]) { expect(FRAMEWORK_PATH.test(line) && !ALLOWED(line), line).toBe(true); } From e8ff6d3db53bdb0dc3d5e973f22f11ed38b2daf1 Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:50:34 +1100 Subject: [PATCH 07/11] [Bugfix #1910] Fix: roles and templates say never to search from the filesystem root Owner scope addition. Builder, architect and consultant roles and the CLAUDE.md/AGENTS.md templates (both trees) now say: search within the project or with built-in file search tools, never from the filesystem root; a framework file not in the project is delivered another way. Also regenerates the shipped-skill hash history for the consult skill edit in the previous commit. --- codev-skeleton/roles/architect.md | 1 + codev-skeleton/roles/builder.md | 4 ++++ codev-skeleton/roles/consultant.md | 1 + codev-skeleton/templates/AGENTS.md | 2 ++ codev-skeleton/templates/CLAUDE.md | 2 ++ codev/roles/architect.md | 1 + codev/roles/builder.md | 4 ++++ codev/roles/consultant.md | 1 + codev/state/bugfix-1910_thread.md | 10 ++++++++++ codev/templates/AGENTS.md | 2 ++ codev/templates/CLAUDE.md | 2 ++ .../src/__tests__/bugfix-1910-framework-paths.test.ts | 8 ++++++++ packages/codev/src/lib/shipped-skill-hashes.ts | 2 ++ 13 files changed, 40 insertions(+) diff --git a/codev-skeleton/roles/architect.md b/codev-skeleton/roles/architect.md index cf9162ef7..39bed7710 100644 --- a/codev-skeleton/roles/architect.md +++ b/codev-skeleton/roles/architect.md @@ -96,6 +96,7 @@ regardless of what the tests say. - Run `afx` commands only from the main workspace root, never from inside a builder worktree — spawning from a worktree nests builders and breaks the workspace. - **Use PR comments for anything long** — `afx send` is for short messages. - **Let builders own their work** — guide, don't take over. +- **Finding files.** Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. - **Make sure the issue closes when the PR merges.** The PR body's `Fixes #` / `Closes #` closes it on merge; close it yourself when no keyword did (a partial fix, a forge without close keywords). Builders never close issues by hand. diff --git a/codev-skeleton/roles/builder.md b/codev-skeleton/roles/builder.md index cd38e2d26..b28a08fb8 100644 --- a/codev-skeleton/roles/builder.md +++ b/codev-skeleton/roles/builder.md @@ -109,6 +109,10 @@ reads succeed, writes succeed, and nothing corrects you until a later `git add` - In Bash, prefer relative paths — `cwd` is your worktree, so a relative path cannot be anchored to the wrong root. +## Finding files + +Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. + ## Scope Build what the spec says. If part of it is blocked, finish everything else and say plainly what diff --git a/codev-skeleton/roles/consultant.md b/codev-skeleton/roles/consultant.md index a39b204ab..100ae0696 100644 --- a/codev-skeleton/roles/consultant.md +++ b/codev-skeleton/roles/consultant.md @@ -31,6 +31,7 @@ You think alongside the other agents, helping them see blind spots. You have fil - **ALWAYS read files directly from disk** when reviewing specs, plans, or code. File paths are provided in the query — open and read them. - **NEVER rely on `git diff` or `git log -p` as your primary review source.** Diffs are lossy, get truncated, and miss uncommitted work. Read the actual files instead. - If you need to understand what changed, read the full file first, then optionally use `git diff` as a secondary reference. +- Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. ## You Read the Tree; You Do Not Change It diff --git a/codev-skeleton/templates/AGENTS.md b/codev-skeleton/templates/AGENTS.md index 96cddb736..c92faae63 100644 --- a/codev-skeleton/templates/AGENTS.md +++ b/codev-skeleton/templates/AGENTS.md @@ -47,6 +47,8 @@ Codev resolves protocol files, prompts, agent definitions, and roles through a f **The absence of `codev/protocols//` on disk is not a missing reference** — it's the normal case for any protocol you haven't customized. The protocol resolves from the installed package's skeleton at runtime. Only protocols you want to customize need to live in your repo's `codev/protocols/`. +**Finding files:** Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. + **Implication for `codev update` and CLAUDE.md / AGENTS.md merges:** when an updated template references a protocol, do NOT drop the reference because `codev/protocols//` is absent locally. The protocol resolves via the package skeleton, and dropping the reference removes it from your available-protocol list while it's still callable from the CLI. ## Protocol Names You Don't Recognize diff --git a/codev-skeleton/templates/CLAUDE.md b/codev-skeleton/templates/CLAUDE.md index a31985685..f7bb5b918 100644 --- a/codev-skeleton/templates/CLAUDE.md +++ b/codev-skeleton/templates/CLAUDE.md @@ -45,6 +45,8 @@ Codev resolves protocol files, prompts, agent definitions, and roles through a f **The absence of `codev/protocols//` on disk is not a missing reference** — it's the normal case for any protocol you haven't customized. The protocol resolves from the installed package's skeleton at runtime. Only protocols you want to customize need to live in your repo's `codev/protocols/`. +**Finding files:** Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. + **Implication for `codev update` and CLAUDE.md / AGENTS.md merges:** when an updated template references a protocol, do NOT drop the reference because `codev/protocols//` is absent locally. The protocol resolves via the package skeleton, and dropping the reference removes it from your available-protocol list while it's still callable from the CLI. ## Protocol Names You Don't Recognize diff --git a/codev/roles/architect.md b/codev/roles/architect.md index cf9162ef7..39bed7710 100644 --- a/codev/roles/architect.md +++ b/codev/roles/architect.md @@ -96,6 +96,7 @@ regardless of what the tests say. - Run `afx` commands only from the main workspace root, never from inside a builder worktree — spawning from a worktree nests builders and breaks the workspace. - **Use PR comments for anything long** — `afx send` is for short messages. - **Let builders own their work** — guide, don't take over. +- **Finding files.** Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. - **Make sure the issue closes when the PR merges.** The PR body's `Fixes #` / `Closes #` closes it on merge; close it yourself when no keyword did (a partial fix, a forge without close keywords). Builders never close issues by hand. diff --git a/codev/roles/builder.md b/codev/roles/builder.md index cd38e2d26..b28a08fb8 100644 --- a/codev/roles/builder.md +++ b/codev/roles/builder.md @@ -109,6 +109,10 @@ reads succeed, writes succeed, and nothing corrects you until a later `git add` - In Bash, prefer relative paths — `cwd` is your worktree, so a relative path cannot be anchored to the wrong root. +## Finding files + +Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. + ## Scope Build what the spec says. If part of it is blocked, finish everything else and say plainly what diff --git a/codev/roles/consultant.md b/codev/roles/consultant.md index a39b204ab..100ae0696 100644 --- a/codev/roles/consultant.md +++ b/codev/roles/consultant.md @@ -31,6 +31,7 @@ You think alongside the other agents, helping them see blind spots. You have fil - **ALWAYS read files directly from disk** when reviewing specs, plans, or code. File paths are provided in the query — open and read them. - **NEVER rely on `git diff` or `git log -p` as your primary review source.** Diffs are lossy, get truncated, and miss uncommitted work. Read the actual files instead. - If you need to understand what changed, read the full file first, then optionally use `git diff` as a secondary reference. +- Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. ## You Read the Tree; You Do Not Change It diff --git a/codev/state/bugfix-1910_thread.md b/codev/state/bugfix-1910_thread.md index 70ac762f2..8b8c5e2ab 100644 --- a/codev/state/bugfix-1910_thread.md +++ b/codev/state/bugfix-1910_thread.md @@ -31,3 +31,13 @@ prompt-load sentence and the consult SKILL line (all four copies). The guard now flags any `codev/protocols|roles/` mention unless the line explains customization or resolution, or is a risk-triage table row. + +## Owner scope addition (2026-11-22, via architect) + +- Added one rule, worded the same everywhere: never search from the filesystem root; search the + project or use built-in file search; a framework file not in the project is delivered another + way. Placed in builder.md (new "Finding files" section), architect.md (Boundaries), + consultant.md (File Access Rules) and the CLAUDE/AGENTS templates (File Resolution), both + trees. The guard test pins it. +- The second full run caught the consult SKILL edit against the shipped-skill hash history. + Regenerated with `generate-skill-hashes`. diff --git a/codev/templates/AGENTS.md b/codev/templates/AGENTS.md index 96cddb736..c92faae63 100644 --- a/codev/templates/AGENTS.md +++ b/codev/templates/AGENTS.md @@ -47,6 +47,8 @@ Codev resolves protocol files, prompts, agent definitions, and roles through a f **The absence of `codev/protocols//` on disk is not a missing reference** — it's the normal case for any protocol you haven't customized. The protocol resolves from the installed package's skeleton at runtime. Only protocols you want to customize need to live in your repo's `codev/protocols/`. +**Finding files:** Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. + **Implication for `codev update` and CLAUDE.md / AGENTS.md merges:** when an updated template references a protocol, do NOT drop the reference because `codev/protocols//` is absent locally. The protocol resolves via the package skeleton, and dropping the reference removes it from your available-protocol list while it's still callable from the CLI. ## Protocol Names You Don't Recognize diff --git a/codev/templates/CLAUDE.md b/codev/templates/CLAUDE.md index a31985685..f7bb5b918 100644 --- a/codev/templates/CLAUDE.md +++ b/codev/templates/CLAUDE.md @@ -45,6 +45,8 @@ Codev resolves protocol files, prompts, agent definitions, and roles through a f **The absence of `codev/protocols//` on disk is not a missing reference** — it's the normal case for any protocol you haven't customized. The protocol resolves from the installed package's skeleton at runtime. Only protocols you want to customize need to live in your repo's `codev/protocols/`. +**Finding files:** Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. + **Implication for `codev update` and CLAUDE.md / AGENTS.md merges:** when an updated template references a protocol, do NOT drop the reference because `codev/protocols//` is absent locally. The protocol resolves via the package skeleton, and dropping the reference removes it from your available-protocol list while it's still callable from the CLI. ## Protocol Names You Don't Recognize diff --git a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts index 5dc53ea91..74be28cad 100644 --- a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts +++ b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts @@ -110,6 +110,14 @@ describe('#1910 — shipped text never names a framework file by an on-disk path expect(ALLOWED('{{> protocols/spir/templates/spec.md}}')).toBe(true); }); + it.each(['codev-skeleton', 'codev'])('%s roles and templates forbid searching from the filesystem root (owner ruling)', (tree) => { + for (const f of ['roles/builder.md', 'roles/architect.md', 'roles/consultant.md', 'templates/CLAUDE.md', 'templates/AGENTS.md']) { + const body = fs.readFileSync(path.join(repoRoot, tree, f), 'utf-8'); + expect(body, f).toContain('Never search from the filesystem root'); + expect(body, f).toContain('is delivered to you another way, so do not go looking for it'); + } + }); + it.each(['codev-skeleton', 'codev'])('%s CLAUDE.md/AGENTS.md templates say protocols are delivered, not opened', (tree) => { for (const t of ['CLAUDE.md', 'AGENTS.md']) { expect(fs.readFileSync(path.join(repoRoot, tree, 'templates', t), 'utf-8'), t).toContain('there is no protocol file to open'); diff --git a/packages/codev/src/lib/shipped-skill-hashes.ts b/packages/codev/src/lib/shipped-skill-hashes.ts index 990975da8..c7bf349c9 100644 --- a/packages/codev/src/lib/shipped-skill-hashes.ts +++ b/packages/codev/src/lib/shipped-skill-hashes.ts @@ -88,6 +88,7 @@ export const SHIPPED_SKILL_HASHES: Record = { '.claude/skills/consult': [ '1ca473f62885088632ec05a6c14a7defc5e7ffad59fafd86f1afd58d6e419ab5', '253bf8b698f0fef437552a0dc81e52764d1c6b25994fab0820edd17f829fa0a5', + '83902904c68ef8b647357162dc1e59b589dfe43f24cff8d1c7841880ebaaac17', '8824d4c16d933e4c284a52dc1755b49a842fe30cece2cb0bede32a0364d37554', '8a8476ac7360644ac6a22e2ffd1ac057baee63d3417300dd24411e9d580eaf6e', '9d75d339dc41ecec2912f522f8937ea41f13d34cbae5668a7a72cf57f9b4e886', @@ -188,6 +189,7 @@ export const SHIPPED_SKILL_HASHES: Record = { ], '.codex/skills/consult': [ '1ca473f62885088632ec05a6c14a7defc5e7ffad59fafd86f1afd58d6e419ab5', + '83902904c68ef8b647357162dc1e59b589dfe43f24cff8d1c7841880ebaaac17', '9d75d339dc41ecec2912f522f8937ea41f13d34cbae5668a7a72cf57f9b4e886', 'dfa095714c460375c900d7491ba6e045136594d211381cf78cb15b8356c90041', 'f7007e62436ad1c048ea9044b49d25ab5d21b438f844dc1170885d6d531c2156', From d70810f15d8ce6b3b9fa7e36d67fad3c3b4cb1d3 Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:51:44 +1100 Subject: [PATCH 08/11] [Bugfix #1910] Test: guard scans root skill trees and cheatsheet; allow-list negative cases --- .../src/__tests__/bugfix-1910-framework-paths.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts index 74be28cad..e9e8d7bb2 100644 --- a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts +++ b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts @@ -27,6 +27,9 @@ const ROOTS = [ 'codev/resources/commands', 'codev/resources/workflow-reference.md', 'codev/resources/risk-triage.md', + 'codev/resources/cheatsheet.md', + '.claude/skills', + '.codex/skills', ]; /** RELEASE is this repository's own protocol; it never ships, and its files exist here. */ @@ -108,6 +111,13 @@ describe('#1910 — shipped text never names a framework file by an on-disk path expect(FRAMEWORK_PATH.test(line) && !ALLOWED(line), line).toBe(true); } expect(ALLOWED('{{> protocols/spir/templates/spec.md}}')).toBe(true); + // The allow-list is keyword-based; words that merely sit near a path do not exempt it. + for (const line of [ + 'Open your local copy at `codev/protocols/spir/protocol.md`.', + 'The full protocol lives in `codev/protocols/spir/` (see the package).', + ]) { + expect(ALLOWED(line), line).toBe(false); + } }); it.each(['codev-skeleton', 'codev'])('%s roles and templates forbid searching from the filesystem root (owner ruling)', (tree) => { From 748cd2601a4f40a3603a5b16197661221505e932 Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 10:54:03 +1100 Subject: [PATCH 09/11] chore(porch): bugfix-1910 pr gate-requested --- .../bugfix-1910-prompts-name-framework-paths-t/status.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml index 2ecb35a6d..cfc93c102 100644 --- a/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml +++ b/codev/projects/bugfix-1910-prompts-name-framework-paths-t/status.yaml @@ -7,8 +7,10 @@ current_plan_phase: null gates: pr: status: pending + requested_at: '2026-11-22T23:54:03.751Z' iteration: 1 build_complete: false history: [] started_at: '2026-11-22T23:29:54.501Z' -updated_at: '2026-11-22T23:41:02.640Z' +updated_at: '2026-11-22T23:54:03.752Z' +pr_ready_for_human: true From 26419eedceff7c30b2d8345dc20a4e19ddd37885 Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 11:31:01 +1100 Subject: [PATCH 10/11] [Bugfix #1910] Trim: keep the issue's sites and the owner's rule, in plain wording Owner review: the sweep was too broad and some rewording was jargon. Reverts the consult skill and its hash entry, the reference docs, the cheatsheets, the consultant role and the Key Locations line to main. Drops resolver jargon and disclaimers from the kept sites. Replaces the keyword-allow-list guard with a short test pinning the exact sites and the owner's rule. R9 now awaits the owner's sign-off at the pr gate. --- .claude/skills/consult/SKILL.md | 4 +- .codex/skills/consult/SKILL.md | 4 +- .../.claude/skills/consult/SKILL.md | 4 +- codev-skeleton/.codex/skills/consult/SKILL.md | 4 +- .../aspir/consult-types/spec-review.md | 2 +- .../spir/consult-types/spec-review.md | 2 +- codev-skeleton/resources/commands/consult.md | 6 +- codev-skeleton/resources/commands/overview.md | 4 +- codev-skeleton/resources/risk-triage.md | 2 +- .../resources/workflow-reference.md | 7 +- codev-skeleton/roles/consultant.md | 1 - codev-skeleton/templates/AGENTS.md | 6 +- codev-skeleton/templates/CLAUDE.md | 6 +- codev-skeleton/templates/cheatsheet.md | 2 +- .../aspir/consult-types/spec-review.md | 2 +- .../spir/consult-types/spec-review.md | 2 +- codev/resources/1280-retirements.md | 19 +-- codev/resources/cheatsheet.md | 2 +- codev/resources/commands/consult.md | 6 +- codev/resources/commands/overview.md | 4 +- codev/resources/risk-triage.md | 2 +- codev/resources/workflow-reference.md | 7 +- codev/roles/consultant.md | 1 - codev/state/bugfix-1910_thread.md | 14 ++ codev/templates/AGENTS.md | 6 +- codev/templates/CLAUDE.md | 6 +- codev/templates/cheatsheet.md | 2 +- .../bugfix-1910-framework-paths.test.ts | 146 ++++-------------- .../aspir-spec-review.md.baseline | 2 +- .../spir-spec-review.md.baseline | 2 +- packages/codev/src/lib/framework-ref-audit.ts | 5 +- .../codev/src/lib/shipped-skill-hashes.ts | 2 - 32 files changed, 98 insertions(+), 186 deletions(-) diff --git a/.claude/skills/consult/SKILL.md b/.claude/skills/consult/SKILL.md index d4321b50f..71b068335 100644 --- a/.claude/skills/consult/SKILL.md +++ b/.claude/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from -`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under +`protocols//consult-types/`. Only `integration` works without it. ## Usage patterns diff --git a/.codex/skills/consult/SKILL.md b/.codex/skills/consult/SKILL.md index d4321b50f..71b068335 100644 --- a/.codex/skills/consult/SKILL.md +++ b/.codex/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from -`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under +`protocols//consult-types/`. Only `integration` works without it. ## Usage patterns diff --git a/codev-skeleton/.claude/skills/consult/SKILL.md b/codev-skeleton/.claude/skills/consult/SKILL.md index d4321b50f..71b068335 100644 --- a/codev-skeleton/.claude/skills/consult/SKILL.md +++ b/codev-skeleton/.claude/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from -`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under +`protocols//consult-types/`. Only `integration` works without it. ## Usage patterns diff --git a/codev-skeleton/.codex/skills/consult/SKILL.md b/codev-skeleton/.codex/skills/consult/SKILL.md index d4321b50f..71b068335 100644 --- a/codev-skeleton/.codex/skills/consult/SKILL.md +++ b/codev-skeleton/.codex/skills/consult/SKILL.md @@ -66,8 +66,8 @@ The claude and codex lanes print what they authenticate with, e.g. `[CLAUDE] aut | `phase` | Phase-scoped review (builder context only) | | `integration` | Architect's integration review of a PR | -`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts resolve from -`protocols//consult-types/` through the four-tier lookup. Only `integration` works without it. +`spec`, `plan`, `impl`, `pr` and `phase` need `--protocol` — their prompts live under +`protocols//consult-types/`. Only `integration` works without it. ## Usage patterns diff --git a/codev-skeleton/protocols/aspir/consult-types/spec-review.md b/codev-skeleton/protocols/aspir/consult-types/spec-review.md index 0843a488d..349916716 100644 --- a/codev-skeleton/protocols/aspir/consult-types/spec-review.md +++ b/codev-skeleton/protocols/aspir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template that the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev-skeleton/protocols/spir/consult-types/spec-review.md b/codev-skeleton/protocols/spir/consult-types/spec-review.md index f9dc2f0a4..6f5dc926d 100644 --- a/codev-skeleton/protocols/spir/consult-types/spec-review.md +++ b/codev-skeleton/protocols/spir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template that the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev-skeleton/resources/commands/consult.md b/codev-skeleton/resources/commands/consult.md index 394aa0ea2..f3622998f 100644 --- a/codev-skeleton/resources/commands/consult.md +++ b/codev-skeleton/resources/commands/consult.md @@ -337,7 +337,7 @@ consult -m codex --type integration --issue 42 --base ci - **Architect context** (cwd outside `.builders/` or `--issue` provided): requires `--issue ` to identify the project **Prompt templates:** -Protocol-specific prompts (`protocols//consult-types/-review.md`) and the shared `integration` prompt (`consult-types/integration-review.md`) resolve through the four-tier lookup: a copy this project customizes under `codev/` overrides the one in the installed package. +Protocol-specific prompts are loaded from `codev/protocols//consult-types/-review.md`. The `integration` type uses the shared `codev/consult-types/integration-review.md`. ### Stats Mode @@ -558,12 +558,12 @@ session. If the CLI denies any of the reviewer's tool calls, consult says so: ## The Consultant Role -The consultant role, which `consult` delivers to each reviewer, defines behavior: +The consultant role (`codev/roles/consultant.md`) defines behavior: - Provides second perspectives on decisions - Offers alternatives and considerations - Works constructively (not adversarial, not a rubber stamp) -Customize by creating a local `codev/roles/consultant.md`; without one, the role resolves from the installed package. +Customize by editing your local `codev/roles/consultant.md`. ## Query Logging diff --git a/codev-skeleton/resources/commands/overview.md b/codev-skeleton/resources/commands/overview.md index 3f8350550..397247c2d 100644 --- a/codev-skeleton/resources/commands/overview.md +++ b/codev-skeleton/resources/commands/overview.md @@ -106,4 +106,6 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## Related Documentation -- The SPIR protocol and the architect and builder roles are delivered to the agents that run them (by `afx spawn` and porch); they resolve from the installed package unless this project customizes them under `codev/protocols/` or `codev/roles/`. +- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow +- [Architect Role](../roles/architect.md) - Architect responsibilities +- [Builder Role](../roles/builder.md) - Builder responsibilities diff --git a/codev-skeleton/resources/risk-triage.md b/codev-skeleton/resources/risk-triage.md index dfe2f7ecf..fcfaee768 100644 --- a/codev-skeleton/resources/risk-triage.md +++ b/codev-skeleton/resources/risk-triage.md @@ -1,6 +1,6 @@ # PR Review Risk Triage Guide -Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see Section 4 of the architect role, which `afx` delivers to the architect session. +Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see `codev/roles/architect.md` Section 4. ## Risk Assessment diff --git a/codev-skeleton/resources/workflow-reference.md b/codev-skeleton/resources/workflow-reference.md index 2bd8f381f..1643a95cf 100644 --- a/codev-skeleton/resources/workflow-reference.md +++ b/codev-skeleton/resources/workflow-reference.md @@ -1,6 +1,6 @@ # Architect-Builder Workflow Reference -Quick reference for the 7-stage project workflow. Protocol details arrive with the work: `afx spawn` inlines the protocol into the builder's prompt and porch delivers each phase's prompt. +Quick reference for the 7-stage project workflow. For protocol details, see `codev/protocols/spir/protocol.md`. ## Workflow Overview @@ -243,5 +243,8 @@ afx cleanup -p --force ## Related Documentation -- The SPIR protocol and the builder, architect and consultant roles: delivered by `afx spawn`, porch and `consult`. They resolve from the installed package and exist under `codev/protocols/` and `codev/roles/` only when this project customizes them. +- Full SPIR protocol: `codev/protocols/spir/protocol.md` +- Builder role: `codev/roles/builder.md` +- Architect role: `codev/roles/architect.md` +- Consultant role: `codev/roles/consultant.md` - Risk triage guide: `codev/resources/risk-triage.md` diff --git a/codev-skeleton/roles/consultant.md b/codev-skeleton/roles/consultant.md index 100ae0696..a39b204ab 100644 --- a/codev-skeleton/roles/consultant.md +++ b/codev-skeleton/roles/consultant.md @@ -31,7 +31,6 @@ You think alongside the other agents, helping them see blind spots. You have fil - **ALWAYS read files directly from disk** when reviewing specs, plans, or code. File paths are provided in the query — open and read them. - **NEVER rely on `git diff` or `git log -p` as your primary review source.** Diffs are lossy, get truncated, and miss uncommitted work. Read the actual files instead. - If you need to understand what changed, read the full file first, then optionally use `git diff` as a secondary reference. -- Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. ## You Read the Tree; You Do Not Change It diff --git a/codev-skeleton/templates/AGENTS.md b/codev-skeleton/templates/AGENTS.md index c92faae63..e9a59796a 100644 --- a/codev-skeleton/templates/AGENTS.md +++ b/codev-skeleton/templates/AGENTS.md @@ -24,8 +24,6 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. - - **SPIR**: Multi-phase development with consultation - **ASPIR**: Autonomous SPIR — no human gates on spec/plan - **AIR**: Autonomous Implement & Review for small features @@ -60,7 +58,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) +- **Protocols**: `codev/protocols/` - Development protocols ## Working with Project Labels @@ -161,4 +159,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. +Porch and `afx spawn` give each agent the full text of the protocol it is running. diff --git a/codev-skeleton/templates/CLAUDE.md b/codev-skeleton/templates/CLAUDE.md index f7bb5b918..00f6f2296 100644 --- a/codev-skeleton/templates/CLAUDE.md +++ b/codev-skeleton/templates/CLAUDE.md @@ -22,8 +22,6 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. - - **SPIR**: Multi-phase development with consultation - **ASPIR**: Autonomous SPIR — no human gates on spec/plan - **AIR**: Autonomous Implement & Review for small features @@ -58,7 +56,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) +- **Protocols**: `codev/protocols/` - Development protocols ## Working with Project Labels @@ -159,4 +157,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. +Porch and `afx spawn` give each agent the full text of the protocol it is running. diff --git a/codev-skeleton/templates/cheatsheet.md b/codev-skeleton/templates/cheatsheet.md index 6e0520a15..b9ce9cf4d 100644 --- a/codev-skeleton/templates/cheatsheet.md +++ b/codev-skeleton/templates/cheatsheet.md @@ -196,4 +196,4 @@ In strict mode porch hands builders these commands itself. --- -*Porch and `afx spawn` deliver each protocol's full text; a protocol resolves from the installed package unless this project customizes it under `codev/protocols/`.* +*For detailed documentation, see the full protocol files in `codev/protocols/`.* diff --git a/codev/protocols/aspir/consult-types/spec-review.md b/codev/protocols/aspir/consult-types/spec-review.md index 0843a488d..349916716 100644 --- a/codev/protocols/aspir/consult-types/spec-review.md +++ b/codev/protocols/aspir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template that the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev/protocols/spir/consult-types/spec-review.md b/codev/protocols/spir/consult-types/spec-review.md index f9dc2f0a4..6f5dc926d 100644 --- a/codev/protocols/spir/consult-types/spec-review.md +++ b/codev/protocols/spir/consult-types/spec-review.md @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template that the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/codev/resources/1280-retirements.md b/codev/resources/1280-retirements.md index 0730840d2..ad86cc836 100644 --- a/codev/resources/1280-retirements.md +++ b/codev/resources/1280-retirements.md @@ -473,11 +473,9 @@ pre-existing flakiness". 3. **Audit trail.** This entry and `bugfix-1902-prompt-sweep.test.ts`, which asserts no agent-facing file (PIR included) tells a builder to skip a flaky test. -## R9 — re-baseline spir/aspir spec-review.md for Bugfix #1910 (framework paths named by location) +## R9 — re-baseline spir/aspir spec-review.md for Bugfix #1910 (framework path named by location) -**Status: applied in the #1910 PR, scope set by the architect (main) on 2026-11-22: reword every -shipped site that sends an agent looking for a framework file by path. The owner sees it at the -`pr` gate.** +**Status: proposed in the #1910 PR; needs the owner's sign-off at the `pr` gate.** | | | |---|---| @@ -488,16 +486,15 @@ shipped site that sends an agent looking for a framework file by path. The owner ### What was removed -One line per file, the Structure bullet, replaced in place: "the spec follows the delivered -template (`protocols/spir/templates/spec.md`)" now reads "the SPIR spec template, which the -specify prompt inlines (it is delivered content, not a file to look for in this workspace)". In -an adopter workspace that path exists only inside the installed package, so a reviewer that read -it literally searched the disk for it (`find /` on Windows). +One line per file, the Structure bullet, replaced in place. "the spec follows the delivered +template (`protocols/spir/templates/spec.md`), which the specify prompt inlines" now reads "the +spec follows the SPIR spec template that the specify prompt inlines". In an adopter workspace that +path exists only inside the installed package, so a reviewer that read it literally searched the +disk for it. ### Class-invariant compliance 1. **Behaviour grep green.** Both keep `Baked Decisions` and `do not autonomously`; mirror parity holds. 2. **Guard kept, not retired.** Only the baselines move. -3. **Audit trail.** This entry and `bugfix-1910-framework-paths.test.ts`, which asserts no shipped - file names a framework file by an on-disk path outside a resolver include. +3. **Audit trail.** This entry and `bugfix-1910-framework-paths.test.ts`. diff --git a/codev/resources/cheatsheet.md b/codev/resources/cheatsheet.md index cc3a7781e..955f9ed50 100644 --- a/codev/resources/cheatsheet.md +++ b/codev/resources/cheatsheet.md @@ -198,4 +198,4 @@ In strict mode porch hands builders these commands itself. --- -*Porch and `afx spawn` deliver each protocol's full text; a protocol resolves from the installed package unless this project customizes it under `codev/protocols/`.* +*For detailed documentation, see the full protocol files in `codev/protocols/`.* diff --git a/codev/resources/commands/consult.md b/codev/resources/commands/consult.md index 394aa0ea2..f3622998f 100644 --- a/codev/resources/commands/consult.md +++ b/codev/resources/commands/consult.md @@ -337,7 +337,7 @@ consult -m codex --type integration --issue 42 --base ci - **Architect context** (cwd outside `.builders/` or `--issue` provided): requires `--issue ` to identify the project **Prompt templates:** -Protocol-specific prompts (`protocols//consult-types/-review.md`) and the shared `integration` prompt (`consult-types/integration-review.md`) resolve through the four-tier lookup: a copy this project customizes under `codev/` overrides the one in the installed package. +Protocol-specific prompts are loaded from `codev/protocols//consult-types/-review.md`. The `integration` type uses the shared `codev/consult-types/integration-review.md`. ### Stats Mode @@ -558,12 +558,12 @@ session. If the CLI denies any of the reviewer's tool calls, consult says so: ## The Consultant Role -The consultant role, which `consult` delivers to each reviewer, defines behavior: +The consultant role (`codev/roles/consultant.md`) defines behavior: - Provides second perspectives on decisions - Offers alternatives and considerations - Works constructively (not adversarial, not a rubber stamp) -Customize by creating a local `codev/roles/consultant.md`; without one, the role resolves from the installed package. +Customize by editing your local `codev/roles/consultant.md`. ## Query Logging diff --git a/codev/resources/commands/overview.md b/codev/resources/commands/overview.md index d5f4442ea..5c9f9455a 100644 --- a/codev/resources/commands/overview.md +++ b/codev/resources/commands/overview.md @@ -130,4 +130,6 @@ Customize agent-farm commands via `.codev/config.json` (project root): ## Related Documentation -- The SPIR protocol and the architect and builder roles are delivered to the agents that run them (by `afx spawn` and porch); they resolve from the installed package unless this project customizes them under `codev/protocols/` or `codev/roles/`. +- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow +- [Architect Role](../roles/architect.md) - Architect responsibilities +- [Builder Role](../roles/builder.md) - Builder responsibilities diff --git a/codev/resources/risk-triage.md b/codev/resources/risk-triage.md index dfe2f7ecf..fcfaee768 100644 --- a/codev/resources/risk-triage.md +++ b/codev/resources/risk-triage.md @@ -1,6 +1,6 @@ # PR Review Risk Triage Guide -Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see Section 4 of the architect role, which `afx` delivers to the architect session. +Quick reference for the architect's risk-based PR review process. For the full integration review workflow, see `codev/roles/architect.md` Section 4. ## Risk Assessment diff --git a/codev/resources/workflow-reference.md b/codev/resources/workflow-reference.md index 646f0fbd4..a3fdff14d 100644 --- a/codev/resources/workflow-reference.md +++ b/codev/resources/workflow-reference.md @@ -1,6 +1,6 @@ # Architect-Builder Workflow Reference -Quick reference for the 7-stage project workflow. Protocol details arrive with the work: `afx spawn` inlines the protocol into the builder's prompt and porch delivers each phase's prompt. +Quick reference for the 7-stage project workflow. For protocol details, see `codev/protocols/spir/protocol.md`. ## Workflow Overview @@ -271,4 +271,7 @@ afx cleanup -p --force ## Related Documentation -- The SPIR protocol and the builder, architect and consultant roles: delivered by `afx spawn`, porch and `consult`. They resolve from the installed package and exist under `codev/protocols/` and `codev/roles/` only when this project customizes them. +- Full SPIR protocol: `codev/protocols/spir/protocol.md` +- Builder role: `codev/roles/builder.md` +- Architect role: `codev/roles/architect.md` +- Consultant role: `codev/roles/consultant.md` diff --git a/codev/roles/consultant.md b/codev/roles/consultant.md index 100ae0696..a39b204ab 100644 --- a/codev/roles/consultant.md +++ b/codev/roles/consultant.md @@ -31,7 +31,6 @@ You think alongside the other agents, helping them see blind spots. You have fil - **ALWAYS read files directly from disk** when reviewing specs, plans, or code. File paths are provided in the query — open and read them. - **NEVER rely on `git diff` or `git log -p` as your primary review source.** Diffs are lossy, get truncated, and miss uncommitted work. Read the actual files instead. - If you need to understand what changed, read the full file first, then optionally use `git diff` as a secondary reference. -- Never search from the filesystem root (`find /`, a whole-drive search): search within the project directory or use your built-in file search tools. A framework file (protocol, prompt, template, role) that is not in the project is delivered to you another way, so do not go looking for it. ## You Read the Tree; You Do Not Change It diff --git a/codev/state/bugfix-1910_thread.md b/codev/state/bugfix-1910_thread.md index 8b8c5e2ab..86fb1e137 100644 --- a/codev/state/bugfix-1910_thread.md +++ b/codev/state/bugfix-1910_thread.md @@ -41,3 +41,17 @@ trees. The guard test pins it. - The second full run caught the consult SKILL edit against the shipped-skill hash history. Regenerated with `generate-skill-hashes`. + +## Trim (2026-11-23, owner review of the PR) + +- The owner judged the PR too broad, and agreed that resolver jargon ("through the four-tier lookup") and + disclaimers ("delivered content, not a file to look for") add nothing an agent can act on. + The four-tier wording partly existed to satisfy the guard's keyword allow-list, which is a smell. +- Reverted to main: the consult skill (4 copies) and shipped-skill-hashes.ts, consult.md, + overview.md, workflow-reference.md, risk-triage.md, the cheatsheets, the consultant role, and + the templates' Key Locations line. +- Kept: the issue's sites (plain wording), the templates' protocol list and closing line, and the + owner's rule in the builder/architect roles and the CLAUDE/AGENTS templates (the owner named + templates). The keyword-allow-list guard is replaced by a short test that pins the exact sites. +- R9 is marked as needing the owner's sign-off at the gate (R7/R8 were architect-approved + before they were applied; this one was not). diff --git a/codev/templates/AGENTS.md b/codev/templates/AGENTS.md index c92faae63..e9a59796a 100644 --- a/codev/templates/AGENTS.md +++ b/codev/templates/AGENTS.md @@ -24,8 +24,6 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. - - **SPIR**: Multi-phase development with consultation - **ASPIR**: Autonomous SPIR — no human gates on spec/plan - **AIR**: Autonomous Implement & Review for small features @@ -60,7 +58,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) +- **Protocols**: `codev/protocols/` - Development protocols ## Working with Project Labels @@ -161,4 +159,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. +Porch and `afx spawn` give each agent the full text of the protocol it is running. diff --git a/codev/templates/CLAUDE.md b/codev/templates/CLAUDE.md index f7bb5b918..00f6f2296 100644 --- a/codev/templates/CLAUDE.md +++ b/codev/templates/CLAUDE.md @@ -22,8 +22,6 @@ This project uses **Codev** for AI-assisted development. ## Available Protocols -Porch and `afx spawn` deliver each protocol's text to the agent running it, so there is no protocol file to open: a protocol resolves from the installed package (see File Resolution below) unless this project customized it. - - **SPIR**: Multi-phase development with consultation - **ASPIR**: Autonomous SPIR — no human gates on spec/plan - **AIR**: Autonomous Implement & Review for small features @@ -58,7 +56,7 @@ The list above is what ships with Codev; a project can add its own under `.codev - **Specs**: `codev/specs/` - Feature specifications (WHAT to build) - **Plans**: `codev/plans/` - Implementation plans (HOW to build) - **Reviews**: `codev/reviews/` - Reviews and lessons learned -- **Protocols**: `codev/protocols/` - only the protocols this project customizes (the standard ones resolve from the installed package) +- **Protocols**: `codev/protocols/` - Development protocols ## Working with Project Labels @@ -159,4 +157,4 @@ Agent Farm is configured via `.codev/config.json` at the project root. Created d ## For More Info -Porch and `afx spawn` deliver each protocol's full text to the agent running it; File Resolution above says where a customized copy goes. +Porch and `afx spawn` give each agent the full text of the protocol it is running. diff --git a/codev/templates/cheatsheet.md b/codev/templates/cheatsheet.md index 6e0520a15..b9ce9cf4d 100644 --- a/codev/templates/cheatsheet.md +++ b/codev/templates/cheatsheet.md @@ -196,4 +196,4 @@ In strict mode porch hands builders these commands itself. --- -*Porch and `afx spawn` deliver each protocol's full text; a protocol resolves from the installed package unless this project customizes it under `codev/protocols/`.* +*For detailed documentation, see the full protocol files in `codev/protocols/`.* diff --git a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts index e9e8d7bb2..6b91d1f5c 100644 --- a/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts +++ b/packages/codev/src/__tests__/bugfix-1910-framework-paths.test.ts @@ -1,136 +1,42 @@ /** - * Regression guard for cluesmith/codev#1910 — shipped text named framework files by an on-disk - * path that adopter workspaces do not have. + * Regression guard for cluesmith/codev#1910: shipped text named framework files by an on-disk + * path that adopter workspaces do not have (the files live only in the installed package), and + * agents searched the disk for them with `find /`. * - * Protocols, roles and templates resolve at runtime through the four-tier lookup; in an adopter - * workspace the standard ones live only inside the installed package. A prompt or template that - * says "the template is at `protocols/spir/templates/spec.md`" or lists a protocol as - * "(`codev/protocols/experiment/protocol.md`)" reads as a location, and agents went looking for it - * with `find /`. Content reaches agents through `{{> …}}` includes, the spawn prompt and porch. - * - * Allowed: resolver includes (`{{> protocols/…}}`), lines that name a `codev/…` path as the place - * a project's own customization goes or that explain resolution, and markdown table rows (see - * ALLOWED below). + * Pins the sites the issue found, in both trees, and the owner's rule that agents never search + * from the filesystem root. */ import { describe, it, expect } from 'vitest'; import * as fs from 'node:fs'; import * as path from 'node:path'; const repoRoot = path.resolve(import.meta.dirname, '../../../..'); +const read = (rel: string) => fs.readFileSync(path.join(repoRoot, rel), 'utf-8'); +const TREES = ['codev-skeleton', 'codev']; -/** What ships to adopters (the skeleton) and our instance's copies of the same framework files. */ -const ROOTS = [ - 'codev-skeleton', - 'codev/protocols', - 'codev/roles', - 'codev/templates', - 'codev/resources/commands', - 'codev/resources/workflow-reference.md', - 'codev/resources/risk-triage.md', - 'codev/resources/cheatsheet.md', - '.claude/skills', - '.codex/skills', -]; - -/** RELEASE is this repository's own protocol; it never ships, and its files exist here. */ -const EXCLUDED = [/^codev\/protocols\/release\//]; - -/** - * A framework file or directory named by location: any `codev/protocols/…` or `codev/roles/…` - * (directories and `` forms included), and the bare or relative - * `protocols/x/templates/…`, `../roles/x.md` forms. - */ -const FRAMEWORK_PATH = - /\bcodev\/(?:protocols|roles)\/|(?:\.\.\/|`|\(|\s)(?:protocols\/[a-z<>-]+\/(?:protocol\.md|templates\/|prompts\/|consult-types\/)|roles\/[a-z-]+\.md)/; - -/** - * Allowed: a resolver include; a line that frames the path as where a customization goes, or - * explains resolution/absence; a markdown table row (risk-triage lists paths a PR diff touches). - */ -const ALLOWED = (line: string) => - /\{\{>\s*protocols\//.test(line) || - /customi[sz]|override|four-tier|resolves? via|is absent|add its own/i.test(line) || - /^\s*\|/.test(line); - -function walk(rel: string): string[] { - const full = path.join(repoRoot, rel); - if (!fs.existsSync(full)) return []; - if (fs.statSync(full).isFile()) return [rel]; - const out: string[] = []; - for (const entry of fs.readdirSync(full, { withFileTypes: true })) { - const child = path.posix.join(rel, entry.name); - if (entry.isDirectory()) out.push(...walk(child)); - else if (/\.(md|json)$/.test(entry.name)) out.push(child); - } - return out; -} - -const FILES = [...new Set(ROOTS.flatMap(walk))].filter((f) => !EXCLUDED.some((re) => re.test(f))); +/** An on-disk framework path that is not a `{{> … }}` resolver include. */ +const linesNamingPath = (body: string, re: RegExp) => + body.split('\n').filter((l) => re.test(l) && !/\{\{>/.test(l)).map((l) => l.trim()); -describe('#1910 — shipped text never names a framework file by an on-disk path', () => { - it('scans the files that carried the bug', () => { - for (const f of [ - 'codev-skeleton/protocols/spir/consult-types/spec-review.md', - 'codev-skeleton/protocols/aspir/protocol.json', - 'codev-skeleton/templates/CLAUDE.md', - 'codev-skeleton/templates/AGENTS.md', - 'codev-skeleton/resources/workflow-reference.md', - 'codev/templates/CLAUDE.md', - ]) { - expect(FILES).toContain(f); +describe.each(TREES)('#1910 (%s)', (tree) => { + it.each(['spir', 'aspir'])('%s spec-review.md and protocol.json do not name the spec template path', (p) => { + for (const f of [`protocols/${p}/consult-types/spec-review.md`, `protocols/${p}/protocol.json`]) { + expect(linesNamingPath(read(`${tree}/${f}`), /protocols\/spir\/templates\/spec\.md/), f).toEqual([]); } }); - it('every remaining framework path is a resolver include or a customization pointer', () => { - const hits: string[] = []; - for (const file of FILES) { - fs.readFileSync(path.join(repoRoot, file), 'utf-8').split('\n').forEach((text, i) => { - if (FRAMEWORK_PATH.test(text) && !ALLOWED(text)) hits.push(` ${file}:${i + 1} ${text.trim().slice(0, 160)}`); - }); - } - expect( - hits, - `These name a framework file by a path adopter workspaces do not have; agents search the disk for it. ` + - `Deliver the content (include, spawn prompt, porch) or name the path only as where a customization goes.\n` + - hits.join('\n'), - ).toEqual([]); - }); - - it('the guard bites on the shapes #1910 found', () => { - for (const line of [ - 'the spec follows the delivered template (`protocols/spir/templates/spec.md`), which the specify prompt inlines.', - '"description": "canonical template delivered by the specify prompt (protocols/spir/templates/spec.md)."', - '- **EXPERIMENT**: Disciplined experimentation (`codev/protocols/experiment/protocol.md`)', - '- [SPIR Protocol](../protocols/spir/protocol.md) - Multi-phase development workflow', - '- Builder role: `codev/roles/builder.md`', - 'Read the full protocol documentation in `codev/protocols/`.', - 'Protocol-specific prompts are loaded from `codev/protocols//consult-types/-review.md`.', - '*For detailed documentation, see the full protocol files in `codev/protocols/`.*', - 'See your local `codev/roles/consultant.md`.', - ]) { - expect(FRAMEWORK_PATH.test(line) && !ALLOWED(line), line).toBe(true); - } - expect(ALLOWED('{{> protocols/spir/templates/spec.md}}')).toBe(true); - // The allow-list is keyword-based; words that merely sit near a path do not exempt it. - for (const line of [ - 'Open your local copy at `codev/protocols/spir/protocol.md`.', - 'The full protocol lives in `codev/protocols/spir/` (see the package).', - ]) { - expect(ALLOWED(line), line).toBe(false); - } + it.each(['CLAUDE.md', 'AGENTS.md'])('templates/%s does not point at codev/protocols/ for protocol text', (t) => { + const body = read(`${tree}/templates/${t}`); + expect(linesNamingPath(body, /codev\/protocols\/[a-z]+\/protocol\.md/)).toEqual([]); + expect(body).not.toContain('Read the full protocol documentation in `codev/protocols/`'); }); - it.each(['codev-skeleton', 'codev'])('%s roles and templates forbid searching from the filesystem root (owner ruling)', (tree) => { - for (const f of ['roles/builder.md', 'roles/architect.md', 'roles/consultant.md', 'templates/CLAUDE.md', 'templates/AGENTS.md']) { - const body = fs.readFileSync(path.join(repoRoot, tree, f), 'utf-8'); - expect(body, f).toContain('Never search from the filesystem root'); - expect(body, f).toContain('is delivered to you another way, so do not go looking for it'); - } - }); - - it.each(['codev-skeleton', 'codev'])('%s CLAUDE.md/AGENTS.md templates say protocols are delivered, not opened', (tree) => { - for (const t of ['CLAUDE.md', 'AGENTS.md']) { - expect(fs.readFileSync(path.join(repoRoot, tree, 'templates', t), 'utf-8'), t).toContain('there is no protocol file to open'); - } - }); + it.each(['roles/builder.md', 'roles/architect.md', 'templates/CLAUDE.md', 'templates/AGENTS.md'])( + '%s says never to search from the filesystem root (owner ruling)', + (f) => { + const body = read(`${tree}/${f}`); + expect(body).toContain('Never search from the filesystem root'); + expect(body).toContain('is delivered to you another way, so do not go looking for it'); + }, + ); }); diff --git a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline index 0843a488d..349916716 100644 --- a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline +++ b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/aspir-spec-review.md.baseline @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template that the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline index f9dc2f0a4..6f5dc926d 100644 --- a/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline +++ b/packages/codev/src/__tests__/fixtures/spec-1280-baselines/spir-spec-review.md.baseline @@ -16,7 +16,7 @@ If the baked decisions themselves contradict each other (e.g., two different lan - **Correctness** — the requirements are technically sound and internally consistent; the problem statement is accurate. - **Feasibility** — implementable within the stated tools and constraints, with no obvious blockers. - **Clarity** — a builder would know what to build; acceptance criteria are testable; terminology is consistent. -- **Structure** — the spec follows the SPIR spec template, which the specify prompt inlines (it is delivered content, not a file to look for in this workspace). A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. +- **Structure** — the spec follows the SPIR spec template that the specify prompt inlines. A spec that ignores the template's headings — usually because the builder pattern-matched an older spec in `codev/specs/` — is a defect: `REQUEST_CHANGES` for a wholesale departure (most headings missing or renamed). A single genuinely-inapplicable section reduced to a one-line "N/A — [reason]" with its heading kept is fine, not grounds for `REQUEST_CHANGES`. You are reviewing the specification (WHAT is built), not code or implementation (HOW) — that is the plan and implementation reviews. Be constructive: name the issue and suggest a fix. diff --git a/packages/codev/src/lib/framework-ref-audit.ts b/packages/codev/src/lib/framework-ref-audit.ts index 2850420fc..e25468d14 100644 --- a/packages/codev/src/lib/framework-ref-audit.ts +++ b/packages/codev/src/lib/framework-ref-audit.ts @@ -23,10 +23,7 @@ * user-evolved files (`arch.md`, `lessons-learned.md`) that builders and * architects reference and write by path legitimately. * - Plain documentation references (backtick mentions, "see codev/…") are - * NOT flagged here. The rule is about *fetching*, not *referencing*. A - * reference that reads as "the file is at this path" still sends agents - * searching the disk for it (#1910); the framework's own test - * `bugfix-1910-framework-paths.test.ts` guards the shipped text for that. + * NOT flagged. The rule is about *fetching*, not *referencing*. */ import { existsSync, readdirSync, readFileSync } from 'node:fs'; import { join, relative } from 'node:path'; diff --git a/packages/codev/src/lib/shipped-skill-hashes.ts b/packages/codev/src/lib/shipped-skill-hashes.ts index c7bf349c9..990975da8 100644 --- a/packages/codev/src/lib/shipped-skill-hashes.ts +++ b/packages/codev/src/lib/shipped-skill-hashes.ts @@ -88,7 +88,6 @@ export const SHIPPED_SKILL_HASHES: Record = { '.claude/skills/consult': [ '1ca473f62885088632ec05a6c14a7defc5e7ffad59fafd86f1afd58d6e419ab5', '253bf8b698f0fef437552a0dc81e52764d1c6b25994fab0820edd17f829fa0a5', - '83902904c68ef8b647357162dc1e59b589dfe43f24cff8d1c7841880ebaaac17', '8824d4c16d933e4c284a52dc1755b49a842fe30cece2cb0bede32a0364d37554', '8a8476ac7360644ac6a22e2ffd1ac057baee63d3417300dd24411e9d580eaf6e', '9d75d339dc41ecec2912f522f8937ea41f13d34cbae5668a7a72cf57f9b4e886', @@ -189,7 +188,6 @@ export const SHIPPED_SKILL_HASHES: Record = { ], '.codex/skills/consult': [ '1ca473f62885088632ec05a6c14a7defc5e7ffad59fafd86f1afd58d6e419ab5', - '83902904c68ef8b647357162dc1e59b589dfe43f24cff8d1c7841880ebaaac17', '9d75d339dc41ecec2912f522f8937ea41f13d34cbae5668a7a72cf57f9b4e886', 'dfa095714c460375c900d7491ba6e045136594d211381cf78cb15b8356c90041', 'f7007e62436ad1c048ea9044b49d25ab5d21b438f844dc1170885d6d531c2156', From 791aae853b1e127e8c8a5398c76780a81091ab53 Mon Sep 17 00:00:00 2001 From: Amr Elsayed Date: Mon, 23 Nov 2026 11:36:51 +1100 Subject: [PATCH 11/11] [Bugfix #1910] R9: record the owner's approval of the spec-review re-baseline --- codev/resources/1280-retirements.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codev/resources/1280-retirements.md b/codev/resources/1280-retirements.md index ad86cc836..5a7ea192e 100644 --- a/codev/resources/1280-retirements.md +++ b/codev/resources/1280-retirements.md @@ -475,7 +475,8 @@ pre-existing flakiness". ## R9 — re-baseline spir/aspir spec-review.md for Bugfix #1910 (framework path named by location) -**Status: proposed in the #1910 PR; needs the owner's sign-off at the `pr` gate.** +**Status: APPROVED by the owner, 2026-11-23, for issue #1910 (relayed by the architect, main). Applied +in PR #1949.** | | | |---|---|