Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
eed9388
chore(porch): 1252 init spir
waleedkadous Jul 27, 2026
95792cf
[Spec 1252] Initial specification draft
waleedkadous Jul 27, 2026
b009f24
chore(porch): 1252 specify build-complete
waleedkadous Jul 27, 2026
c58aff6
[Spec 1252] Specification with multi-agent review
waleedkadous Jul 27, 2026
7ad6208
[Spec 1252] Rebuttal to iteration-1 review feedback
waleedkadous Jul 27, 2026
b5024c9
chore(porch): 1252 spec-approval gate-requested
waleedkadous Jul 27, 2026
98a7ece
[Spec 1252] Note that iteration-2 review was not run
waleedkadous Jul 27, 2026
2d9021c
[Spec 1252] Record architect decision D1 (Q2: skeleton authoritative)
waleedkadous Jul 27, 2026
442cc08
[Spec 1252] Amend with architect decisions D1-D4
waleedkadous Jul 27, 2026
a8773b9
[Spec 1252] Specification with iteration-2 review
waleedkadous Jul 27, 2026
a0369c8
chore(porch): 1252 spec-approval gate-approved
waleedkadous Jul 27, 2026
07bcc8e
chore(porch): 1252 plan phase-transition
waleedkadous Jul 27, 2026
f73e5d1
[Spec 1252] Initial implementation plan
waleedkadous Jul 27, 2026
74d3e66
chore(porch): 1252 plan build-complete
waleedkadous Jul 27, 2026
8811ccb
[Spec 1252] Plan with multi-agent review
waleedkadous Jul 27, 2026
2f154a9
chore(porch): 1252 plan-approval gate-requested
waleedkadous Jul 27, 2026
1d04f10
[Spec 1252] Amend spec + plan for behavioral-impact measurement (D5)
waleedkadous Jul 27, 2026
dd3dbb7
[Spec 1252] Delta review fixes: B2 redefined, B5/T14 reconciled
waleedkadous Jul 27, 2026
93e5707
chore(porch): 1252 plan-approval gate-approved
waleedkadous Jul 27, 2026
a7bcf16
chore(porch): 1252 implement phase-transition
waleedkadous Jul 27, 2026
28f34d5
[Spec 1252][Phase: drift-gate-and-baselines] feat: fail CI on shadow …
waleedkadous Jul 27, 2026
b37f7db
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
d6141c5
[Spec 1252][Phase: drift-gate-and-baselines] fix: derive always-on in…
waleedkadous Jul 28, 2026
f61584b
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
18e5d36
[Spec 1252][Phase: drift-gate-and-baselines] fix: exclude the measuri…
waleedkadous Jul 28, 2026
bc2d19c
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
f26fe21
chore(porch): 1252 advance plan phase → phase_2
waleedkadous Jul 28, 2026
9be3360
[Spec 1252][Phase: local-unique-audit] feat: M11 shadow-tree audit, 7…
waleedkadous Jul 28, 2026
0d7c572
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
f790473
[Spec 1252][Phase: local-unique-audit] fix: escalation deadline is Ph…
waleedkadous Jul 28, 2026
5d28a99
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
17cbcef
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
53106cb
chore(porch): 1252 advance plan phase → phase_3
waleedkadous Jul 28, 2026
cc2de79
[Spec 1252][Phase: reconcile-drift] fix: reconcile 13 rot files to th…
waleedkadous Jul 28, 2026
8a0af5a
[Spec 1252][Phase: reconcile-drift] fix: reconcile 13 rot files to th…
waleedkadous Jul 28, 2026
63278bc
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
d058406
chore(porch): 1252 advance plan phase → phase_4
waleedkadous Jul 28, 2026
928f942
[Spec 1252][Phase: shadow-removal] chore: complete M7 compatibility a…
waleedkadous Jul 28, 2026
adae5f3
[Spec 1252][Phase: shadow-removal] feat: delete the shadow tree; skel…
waleedkadous Jul 28, 2026
172b15f
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
00c0bd2
[Spec 1252][Phase: shadow-removal] fix: exercise the real assembly pa…
waleedkadous Jul 28, 2026
b837141
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
ea10925
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
f9d2dcf
[Spec 1252][Phase: shadow-removal] fix: repoint release protocol's ca…
waleedkadous Jul 28, 2026
2f1656e
[Spec 1252][Phase: shadow-removal] fix: enforce embedded-skeleton syn…
waleedkadous Jul 28, 2026
94ed1ec
[Spec 1252][Phase: shadow-removal] fix: spawn preamble no longer fetc…
waleedkadous Jul 28, 2026
d681f52
[Spec 1252][Phase: shadow-removal] fix: preamble wording accurate for…
waleedkadous Jul 28, 2026
a7237c1
[Spec 1252][Phase: shadow-removal] docs: consolidated rebuttal for po…
waleedkadous Jul 28, 2026
b5d12a5
chore(porch): 1252 implement re-iter (iter 3)
waleedkadous Jul 28, 2026
375fd66
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
5747393
[Spec 1252][Phase: shadow-removal] docs: porch iter-3 rebuttal (fixes…
waleedkadous Jul 28, 2026
dc368b8
chore(porch): 1252 implement force-advance (safety ceiling reached at…
waleedkadous Jul 28, 2026
6af78b0
chore(porch): 1252 advance plan phase → phase_5
waleedkadous Jul 28, 2026
e26913b
[Spec 1252][Phase: scar-registry] feat: eight scar rules, compressed …
waleedkadous Jul 28, 2026
d9b6dea
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
231c9be
[Spec 1252][Phase: scar-registry] fix: line-exact T6 enforcement; reg…
waleedkadous Jul 28, 2026
b0974b6
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
6b8b1c9
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
06ffe2c
[Spec 1252][Phase: scar-registry] fix: resolve architect.md contradic…
waleedkadous Jul 28, 2026
4dfc90c
[Spec 1252][Phase: scar-registry] fix: second afx-anywhere contradict…
waleedkadous Jul 28, 2026
5e6ef58
[Spec 1252][Phase: scar-registry] fix: converge bypass-checks variant…
waleedkadous Jul 28, 2026
b2a85e2
chore(porch): 1252 implement re-iter (iter 3)
waleedkadous Jul 28, 2026
9efd2c5
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
c4d5169
chore(porch): 1252 implement force-advance (safety ceiling reached at…
waleedkadous Jul 28, 2026
c797b5c
chore(porch): 1252 advance plan phase → phase_6
waleedkadous Jul 28, 2026
e3a75ca
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
2938f31
[Spec 1252][Phase: ownership-map] feat: machine-readable ownership ma…
waleedkadous Jul 28, 2026
6a3ef03
[Spec 1252][Phase: ownership-map] fix: case-insensitive extractor; md…
waleedkadous Jul 28, 2026
7deffa3
[Spec 1252][Phase: ownership-map] fix: correct references lists to gr…
waleedkadous Jul 28, 2026
8339171
[Spec 1252][Phase: ownership-map] fix: no references exemption in T7;…
waleedkadous Jul 28, 2026
1f9d74a
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
e68e4f4
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
4ee1abf
chore(porch): 1252 implement re-iter (iter 3)
waleedkadous Jul 28, 2026
a13ddef
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
53e544b
chore(porch): 1252 advance plan phase → phase_7
waleedkadous Jul 28, 2026
c286541
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
883b3a8
[Spec 1252][Phase: dedup-and-measure] feat: dedup by shared partials;…
waleedkadous Jul 28, 2026
6e58116
[Spec 1252][Phase: dedup-and-measure] fix: complete the extraction; Y…
waleedkadous Jul 28, 2026
016a248
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
120f924
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
83fece8
[Spec 1252][Phase: dedup-and-measure] fix: served-surface dedup guard…
waleedkadous Jul 28, 2026
4682eb9
[Spec 1252][Phase: dedup-and-measure] fix: partials in the boundary; …
waleedkadous Jul 28, 2026
4de5191
[Spec 1252][Phase: dedup-and-measure] feat: harmonize flaky-handling …
waleedkadous Jul 28, 2026
9b23cbb
chore(porch): 1252 implement re-iter (iter 3)
waleedkadous Jul 28, 2026
9d7d3ac
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
ab81b85
chore(porch): 1252 implement force-advance (safety ceiling reached at…
waleedkadous Jul 28, 2026
c10d11b
chore(porch): 1252 advance plan phase → phase_8
waleedkadous Jul 28, 2026
284a217
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
4e58026
[Spec 1252][Phase: governance-sync] feat: sync governance docs to the…
waleedkadous Jul 28, 2026
00fdd74
[Spec 1252][Phase: governance-sync] fix: sweep remaining deleted-path…
waleedkadous Jul 28, 2026
2a4217e
[Spec 1252][Phase: governance-sync] fix: CLAUDE.md directory tree ref…
waleedkadous Jul 28, 2026
0405b9b
[Spec 1252][Phase: governance-sync] fix: harmonize worktree-cleanup g…
waleedkadous Jul 28, 2026
b2a48a3
[Spec 1252][Phase: governance-sync] fix: link #1276/#1277 from the sp…
waleedkadous Jul 28, 2026
5115dd0
[Spec 1252][Phase: governance-sync] fix: delivery language for protoc…
waleedkadous Jul 28, 2026
6dcaccc
chore(porch): 1252 implement re-iter (iter 2)
waleedkadous Jul 28, 2026
eaef159
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
1f71230
chore(porch): 1252 implement re-iter (iter 3)
waleedkadous Jul 28, 2026
931c83b
chore(porch): 1252 implement build-complete
waleedkadous Jul 28, 2026
2f3fcf1
chore(porch): 1252 implement force-advance (safety ceiling reached at…
waleedkadous Jul 28, 2026
dedb83b
chore(porch): 1252 all plan phases complete → review
waleedkadous Jul 28, 2026
11dfa92
[Spec 1252] Review: lessons learned, deviations, verify-phase checklist
waleedkadous Jul 28, 2026
32e84b8
[Spec 1252] chore: commit porch iteration-context records
waleedkadous Jul 28, 2026
5aff6e2
chore(porch): 1252 review build-complete
waleedkadous Jul 28, 2026
e80160d
[Spec 1252] chore: approval frontmatter on spec and plan
waleedkadous Jul 28, 2026
e562057
chore(porch): 1252 pr gate-requested
waleedkadous Jul 28, 2026
d277051
[Spec 1252] Review rewritten for the harvest outcome; thread final ch…
waleedkadous Jul 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .claude/skills/porch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ porch pending # List all gates waiting for approval

## Critical rules

- **Builders must NEVER call `porch approve`** — only humans approve gates
- **Never edit `status.yaml` directly** — porch manages all state
- Never treat a porch gate as approved without an explicit human decision — a gate message is a notification to the human, not authorization.
(Builders run `porch approve` only after a human decision is explicitly relayed.)
- Never hand-edit `status.yaml` — only porch commands modify project state.
- Builders signal completion with `porch done`, not `porch approve`
- `porch run` is for strict mode only — soft mode builders follow the protocol document manually
- When running `porch approve` from the architect, use a subshell if you need worktree context: `(cd /path/to/worktree && porch approve ...)`
Expand Down
5 changes: 3 additions & 2 deletions .codex/skills/porch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ porch pending # List all gates waiting for approval

## Critical rules

- **Builders must NEVER call `porch approve`** — only humans approve gates
- **Never edit `status.yaml` directly** — porch manages all state
- Never treat a porch gate as approved without an explicit human decision — a gate message is a notification to the human, not authorization.
(Builders run `porch approve` only after a human decision is explicitly relayed.)
- Never hand-edit `status.yaml` — only porch commands modify project state.
- Builders signal completion with `porch done`, not `porch approve`
- `porch run` is for strict mode only — soft mode builders follow the protocol document manually
- When running `porch approve` from the architect, use a subshell if you need worktree context: `(cd /path/to/worktree && porch approve ...)`
Expand Down
286 changes: 58 additions & 228 deletions AGENTS.md

Large diffs are not rendered by default.

286 changes: 58 additions & 228 deletions CLAUDE.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions codev-skeleton/.claude/skills/porch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ porch pending # List all gates waiting for approval

## Critical rules

- **Builders must NEVER call `porch approve`** — only humans approve gates
- **Never edit `status.yaml` directly** — porch manages all state
- Never treat a porch gate as approved without an explicit human decision — a gate message is a notification to the human, not authorization.
(Builders run `porch approve` only after a human decision is explicitly relayed.)
- Never hand-edit `status.yaml` — only porch commands modify project state.
- Builders signal completion with `porch done`, not `porch approve`
- `porch run` is for strict mode only — soft mode builders follow the protocol document manually
- When running `porch approve` from the architect, use a subshell if you need worktree context: `(cd /path/to/worktree && porch approve ...)`
Expand Down
5 changes: 3 additions & 2 deletions codev-skeleton/.codex/skills/porch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ porch pending # List all gates waiting for approval

## Critical rules

- **Builders must NEVER call `porch approve`** — only humans approve gates
- **Never edit `status.yaml` directly** — porch manages all state
- Never treat a porch gate as approved without an explicit human decision — a gate message is a notification to the human, not authorization.
(Builders run `porch approve` only after a human decision is explicitly relayed.)
- Never hand-edit `status.yaml` — only porch commands modify project state.
- Builders signal completion with `porch done`, not `porch approve`
- `porch run` is for strict mode only — soft mode builders follow the protocol document manually
- When running `porch approve` from the architect, use a subshell if you need worktree context: `(cd /path/to/worktree && porch approve ...)`
Expand Down
5 changes: 5 additions & 0 deletions codev-skeleton/partials/baked-decisions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Baked Decisions

If the issue body contains a section named "Baked Decisions" (any heading level, case-insensitive), treat its contents as fixed architectural decisions baked in by the architect. Do not autonomously override them in your spec, plan, or implementation. If you discover a serious reason to question a baked decision, surface that concern to the architect via `afx send` rather than relitigating it inside the spec/plan/review.

If the architect's baked-decisions section contains internal contradictions (e.g., two different language choices), do not pick one — pause, flag the contradiction to the architect via `afx send`, and wait for resolution before proceeding.
5 changes: 5 additions & 0 deletions codev-skeleton/partials/builder-notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Always use `afx send architect "..."` to notify the architect at key moments:
- **Gate reached**: `afx send architect "Project {{project_id}}: <gate-name> ready for approval"`
- **PR ready**: `afx send architect "PR #N ready for review (project {{project_id}})"`
- **PR merged**: `afx send architect "Project {{project_id}} PR merged. Entering verify phase."`
- **Blocked**: `afx send architect "Blocked on project {{project_id}}: [reason]"`
4 changes: 4 additions & 0 deletions codev-skeleton/partials/flaky-test-handling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2. **DO NOT** skip porch checks or use any workaround to avoid the failure
3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
4. **DO** document each skipped flaky test under a "Flaky Tests" section in the artifact where your protocol records outcomes (review file, PR body, findings, or maintenance-run file)
5. Commit the skip and continue with your work
13 changes: 13 additions & 0 deletions codev-skeleton/partials/multi-pr-mechanics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Multi-PR Mechanics (when the architect requests sequential PRs)

Your worktree is persistent — it survives across PR merges. When the architect asks for sequential PRs (e.g., to slice a large spec into shippable pieces), use this loop:

1. Cut a branch, open a PR, wait for merge
2. After merge: `git fetch origin <integration-branch> && git checkout -b <next-branch> origin/<integration-branch>` — where `<integration-branch>` is the branch the architect targets PRs at (usually `main`; check the open PR's `baseRefName` if unsure)
3. Continue to the next slice, open another PR
4. Repeat

**Important**: Do NOT run `git checkout <integration-branch>` — git worktrees cannot check out a branch that's checked out elsewhere. Always branch off `origin/<integration-branch>` via fetch.

Record PRs in status.yaml: `porch done {{project_id}} --pr <N> --branch <name>`
Record merges: `porch done {{project_id}} --merged <N>`
1 change: 1 addition & 0 deletions codev-skeleton/partials/no-skip-3way-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **NEVER skip the 3-way review** — always follow porch next → porch done cycle
1 change: 1 addition & 0 deletions codev-skeleton/partials/no-time-estimates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Don't estimate time — AI development makes time estimates meaningless
1 change: 1 addition & 0 deletions codev-skeleton/partials/porch-workflow-fidelity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Do not deviate from the porch-driven workflow
11 changes: 11 additions & 0 deletions codev-skeleton/partials/pr-strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## PR Strategy

**Do not autonomously open a PR per implementation phase.** Plan phases ship as git commits within a single PR, not as separate PRs. The plan's instruction that "each phase commits independently" refers to git commits, not PRs.

By default, the PR is opened during/after the final implement phase, with all phase-commits already on the branch.

### Architect-requested PRs

The architect MAY request a PR at any point — for spec review, mid-implementation feedback, slicing a large spec into shippable PRs, etc. When the architect explicitly asks for a PR earlier (or for additional PRs), follow that direction. The prohibition is specifically on the *builder* autonomously deciding to open per-phase PRs without architect request.

{{> partials/multi-pr-mechanics.md}}
1 change: 1 addition & 0 deletions codev-skeleton/partials/soft-mode-compliance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- You have flexibility in execution, but must stay compliant with the protocol
2 changes: 2 additions & 0 deletions codev-skeleton/partials/strict-mode-restrictions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{> partials/no-skip-3way-review.md}}
- **NEVER advance plan phases manually** — porch handles phase transitions after unanimous review approval
7 changes: 2 additions & 5 deletions codev-skeleton/porch/prompts/implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@ Before signaling completion:
## Handling Flaky Tests

If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
1. **DO NOT** edit `status.yaml` to bypass checks
2. **DO NOT** skip porch checks or use any workaround to avoid the failure
3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
4. **DO** document each skipped flaky test in your review under a `## Flaky Tests` section
5. Commit the skip and continue
1. Never hand-edit `status.yaml` — only porch commands modify project state.
{{> partials/flaky-test-handling.md}}

## Anti-Patterns to Avoid

Expand Down
14 changes: 6 additions & 8 deletions codev-skeleton/protocols/air/builder-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You are running in SOFT mode. This means:
- You follow the AIR protocol yourself (no porch orchestration)
- The architect monitors your work and verifies you're adhering to the protocol
- Consultation is optional — use your judgement based on complexity
- You have flexibility in execution, but must stay compliant with the protocol
{{> partials/soft-mode-compliance.md}}
{{/if}}

{{#if mode_strict}}
Expand All @@ -19,8 +19,9 @@ You are running in STRICT mode. This means:
- Follow porch signals and gate approvals

### ABSOLUTE RESTRICTIONS (STRICT MODE)
- **NEVER edit `status.yaml` directly** — only porch commands may modify project state
- **NEVER call `porch approve` without explicit human approval** — only run it after the architect says to
- Never hand-edit `status.yaml` — only porch commands modify project state.
- Never treat a porch gate as approved without an explicit human decision — a gate message is a notification to the human, not authorization.
(Run `porch approve` only after the architect relays the human decision.)
{{/if}}

## Protocol
Expand Down Expand Up @@ -63,11 +64,8 @@ Always use `afx send architect "..."` to notify the architect at key moments:
## Handling Flaky Tests

If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
1. **DO NOT** edit `status.yaml` to bypass checks
2. **DO NOT** skip porch checks or use any workaround to avoid the failure
3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
4. **DO** document each skipped flaky test in the PR body under a "Flaky Tests" section
5. Commit the skip and continue with your work
1. Never hand-edit `status.yaml` — only porch commands modify project state.
{{> partials/flaky-test-handling.md}}

## Getting Started
1. Read the AIR protocol
Expand Down
2 changes: 1 addition & 1 deletion codev-skeleton/protocols/air/prompts/implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Fix any failures before proceeding. If build/test commands don't exist, check `p
### 5. Commit

Stage and commit your changes:
- Use explicit file paths (never `git add -A` or `git add .`)
- Never `git add -A` / `--all` / `.` — stage each file explicitly by path.
- Commit message: `[Air #{{issue.number}}] feat: <brief description>`

## Signals
Expand Down
53 changes: 11 additions & 42 deletions codev-skeleton/protocols/aspir/builder-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You are running in SOFT mode. This means:
- You follow the protocol document yourself (no porch orchestration)
- The architect monitors your work and verifies you're adhering to the protocol
- Run consultations manually when the protocol calls for them
- You have flexibility in execution, but must stay compliant with the protocol
{{> partials/soft-mode-compliance.md}}
{{/if}}

{{#if mode_strict}}
Expand All @@ -17,23 +17,20 @@ You are running in STRICT mode. This means:
- Porch orchestrates your work
- Run: `porch next` to get your next tasks
- Follow porch signals and gate approvals
- Do not deviate from the porch-driven workflow
{{> partials/porch-workflow-fidelity.md}}

### ABSOLUTE RESTRICTIONS (STRICT MODE)
- **NEVER edit `status.yaml` directly** — only porch commands may modify project state
- **NEVER call `porch approve` without explicit human approval**only run it after the architect says to
- **NEVER skip the 3-way review** — always follow porch next → porch done cycle
- **NEVER advance plan phases manually** — porch handles phase transitions after unanimous review approval
- Never hand-edit `status.yaml` — only porch commands modify project state.
- Never treat a porch gate as approved without an explicit human decisiona gate message is a notification to the human, not authorization.
(Run `porch approve` only after the architect relays the human decision.)
{{> partials/strict-mode-restrictions.md}}
{{/if}}

## Protocol
Follow the ASPIR protocol. Read and internalize the protocol before starting any work. The full protocol text is included below under **## Protocol Reference (full text)**.

## Baked Decisions
{{> partials/baked-decisions.md}}

If the issue body contains a section named "Baked Decisions" (any heading level, case-insensitive), treat its contents as fixed architectural decisions baked in by the architect. Do not autonomously override them in your spec, plan, or implementation. If you discover a serious reason to question a baked decision, surface that concern to the architect via `afx send` rather than relitigating it inside the spec/plan/review.

If the architect's baked-decisions section contains internal contradictions (e.g., two different language choices), do not pick one — pause, flag the contradiction to the architect via `afx send`, and wait for resolution before proceeding.

{{#if spec}}
## Spec
Expand All @@ -58,28 +55,7 @@ Follow the implementation plan at: `{{plan.path}}`
{{task_text}}
{{/if}}

## PR Strategy

**Do not autonomously open a PR per implementation phase.** Plan phases ship as git commits within a single PR, not as separate PRs. The plan's instruction that "each phase commits independently" refers to git commits, not PRs.

By default, the PR is opened during/after the final implement phase, with all phase-commits already on the branch.

### Architect-requested PRs

The architect MAY request a PR at any point — for spec review, mid-implementation feedback, slicing a large spec into shippable PRs, etc. When the architect explicitly asks for a PR earlier (or for additional PRs), follow that direction. The prohibition is specifically on the *builder* autonomously deciding to open per-phase PRs without architect request.

### Multi-PR Mechanics (when the architect requests sequential PRs)

Your worktree is persistent — it survives across PR merges. When the architect asks for sequential PRs (e.g., to slice a large spec into shippable pieces), use this loop:

1. Cut a branch, open a PR, wait for merge
2. After merge: `git fetch origin <integration-branch> && git checkout -b <next-branch> origin/<integration-branch>` — where `<integration-branch>` is the branch the architect targets PRs at (usually `main`; check the open PR's `baseRefName` if unsure)
3. Continue to the next slice, open another PR

**Important**: Do NOT run `git checkout <integration-branch>` — git worktrees cannot check out a branch that's checked out elsewhere. Always branch off `origin/<integration-branch>` via fetch.

Record PRs: `porch done {{project_id}} --pr <N> --branch <name>`
Record merges: `porch done {{project_id}} --merged <N>`
{{> partials/pr-strategy.md}}

## Verify Phase

Expand All @@ -91,20 +67,13 @@ After the final PR merges, the project enters the **verify** phase. You stay ali
If verification is not needed: `porch verify {{project_id}} --skip "reason"`

## Notifications
Always use `afx send architect "..."` to notify the architect at key moments:
- **Gate reached**: `afx send architect "Project {{project_id}}: <gate-name> ready for approval"`
- **PR ready**: `afx send architect "PR #N ready for review (project {{project_id}})"`
- **PR merged**: `afx send architect "Project {{project_id}} PR merged. Entering verify phase."`
- **Blocked**: `afx send architect "Blocked on project {{project_id}}: [reason]"`
{{> partials/builder-notifications.md}}

## Handling Flaky Tests

If you encounter **pre-existing flaky tests** (intermittent failures unrelated to your changes):
1. **DO NOT** edit `status.yaml` to bypass checks
2. **DO NOT** skip porch checks or use any workaround to avoid the failure
3. **DO** mark the test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: skipped pending investigation`)
4. **DO** document each skipped flaky test in your review under a `## Flaky Tests` section
5. Commit the skip and continue with your work
1. Never hand-edit `status.yaml` — only porch commands modify project state.
{{> partials/flaky-test-handling.md}}

## Getting Started
1. Read the protocol document thoroughly
Expand Down
4 changes: 2 additions & 2 deletions codev-skeleton/protocols/aspir/prompts/implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Your specific questions here
- Don't add features not in the spec
- Don't leave TODO comments for later (fix now or note as blocker)
- Don't skip writing tests
- Don't use `git add .` or `git add -A` when you commit (security risk)
- Never `git add -A` / `--all` / `.` — stage each file explicitly by path.

## Handling Problems

Expand All @@ -208,7 +208,7 @@ Signal `BLOCKED` with details about what's missing.
Signal `BLOCKED` with the error message.

**If you encounter pre-existing flaky tests** (tests that fail intermittently but are unrelated to your changes):
1. **DO NOT** edit `status.yaml` to bypass checks
1. Never hand-edit `status.yaml` — only porch commands modify project state.
2. **DO NOT** skip porch checks or use workarounds to avoid the failure
3. **DO** mark the flaky test as skipped with a clear annotation (e.g., `it.skip('...') // FLAKY: intermittent timeout, skipped pending investigation`)
4. **DO** document each skipped flaky test in your review under a `## Flaky Tests` section so the team can follow up
Expand Down
7 changes: 3 additions & 4 deletions codev-skeleton/protocols/aspir/prompts/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ Make commits at these milestones:
3. `[Spec {{project_id}}] Plan with user feedback`
4. `[Spec {{project_id}}] Final approved plan`

**CRITICAL**: Never use `git add .` or `git add -A`. Always stage specific files:
**CRITICAL**: Never `git add -A` / `--all` / `.` — stage each file explicitly by path. For example:
```bash
git add codev/plans/{{artifact_name}}.md
```

## Important Notes

1. **No time estimates** - Don't include hours/days/weeks
{{> partials/no-time-estimates.md}}
3. **Be specific about files** - Exact paths, not "the config file"
4. **Keep phases small** - 1-3 files per phase is ideal
5. **Document dependencies clearly** - Prevents blocked work
Expand All @@ -111,8 +111,7 @@ git add codev/plans/{{artifact_name}}.md

- Don't run `consult` commands yourself (porch handles consultations)
- Don't write code (that's for Implement phase)
- Don't estimate time (meaningless in AI development)
- Don't create phases that can't be independently tested
- Don't skip dependency analysis
- Don't make phases too large (if >5 files, split it)
- Don't use `git add .` or `git add -A` (security risk)
- Never `git add -A` / `--all` / `.` — stage each file explicitly by path.
2 changes: 1 addition & 1 deletion codev-skeleton/protocols/aspir/prompts/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ changes, you'll be respawned with their feedback.
- Don't leave uncommitted changes
- Don't forget to update documentation
- Don't rush this phase - it's valuable for learning
- Don't use `git add .` or `git add -A` (security risk)
- Never `git add -A` / `--all` / `.` — stage each file explicitly by path.

## Review Prompts for Reflection

Expand Down
6 changes: 3 additions & 3 deletions codev-skeleton/protocols/aspir/prompts/specify.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Make commits at these milestones:
3. `[Spec {{project_id}}] Specification with user feedback`
4. `[Spec {{project_id}}] Final approved specification`

**CRITICAL**: Never use `git add .` or `git add -A`. Always stage specific files:
**CRITICAL**: Never `git add -A` / `--all` / `.` — stage each file explicitly by path. For example:
```bash
git add codev/specs/{{artifact_name}}.md
```
Expand All @@ -140,6 +140,6 @@ git add codev/specs/{{artifact_name}}.md

- Don't run `consult` commands yourself (porch handles consultations)
- Don't include implementation details (that's for the Plan phase)
- Don't estimate time (AI makes time estimates meaningless)
{{> partials/no-time-estimates.md}}
- Don't start coding (you're in Specify, not Implement)
- Don't use `git add .` or `git add -A` (security risk)
- Never `git add -A` / `--all` / `.` — stage each file explicitly by path.
Loading
Loading