@pdlc-os/pdlc 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,349 @@
1
+ ---
2
+ description: Run the Operation phase (Ship → Verify → Reflect) for the current feature
3
+ ---
4
+
5
+ You are running the Operation phase. Follow every step in order. Do not skip steps.
6
+
7
+ ---
8
+
9
+ ## Pre-flight: Load state and context
10
+
11
+ ### Step 1 — Read STATE.md
12
+
13
+ Read `docs/pdlc/memory/STATE.md` completely.
14
+
15
+ Extract:
16
+ - **Current Phase**: must be `Construction Complete — Ready for /pdlc ship`
17
+ - **Current Feature**: the `[feature-name]` slug
18
+ - **Episode file path**: look in `docs/pdlc/memory/episodes/` for a draft file matching `[NNN]_[feature-name]_[YYYY-MM-DD].md`
19
+
20
+ If the phase is not `Construction Complete — Ready for /pdlc ship`, warn the user:
21
+
22
+ > "STATE.md shows the current phase is `[phase]`, not `Construction Complete`. Running `/pdlc ship` before Construction is complete may cause issues.
23
+ >
24
+ > Continue anyway? (yes/no)"
25
+
26
+ Wait for confirmation before proceeding.
27
+
28
+ ### Step 2 — Verify test gates
29
+
30
+ Read `docs/pdlc/memory/CONSTITUTION.md` §7 (Test Gates).
31
+
32
+ Read the episode file draft at `docs/pdlc/memory/episodes/[NNN]_[feature-name]_[YYYY-MM-DD].md`.
33
+
34
+ Check the Test Summary table in the episode file against the required gates in CONSTITUTION.md.
35
+
36
+ If any required gate shows `fail` in the episode file, warn the user:
37
+
38
+ > "Required test gate `[layer]` shows as failed in the episode file. Shipping with failing required gates is a Tier 3 logged warning.
39
+ >
40
+ > Proceed anyway? (yes/no)"
41
+
42
+ Log the response in STATE.md as a Tier 3 event if the user proceeds with a failed gate.
43
+
44
+ Update `docs/pdlc/memory/STATE.md`:
45
+ - **Current Phase**: `Operation`
46
+ - **Current Sub-phase**: `Ship`
47
+ - **Last Checkpoint**: `Operation / Ship / [now ISO 8601]`
48
+
49
+ ---
50
+
51
+ ## SHIP
52
+
53
+ ### Step 3 — Merge approval gate
54
+
55
+ Tell the user:
56
+
57
+ > "Ready to merge and deploy `[feature-name]` to main.
58
+ >
59
+ > Feature branch: `feature/[feature-name]`
60
+ > Episode: `[NNN]_[feature-name]_[YYYY-MM-DD].md`
61
+ >
62
+ > **Confirm merge commit to main?** (yes/no)"
63
+
64
+ Wait for explicit `yes`. Do not merge without it.
65
+
66
+ If the user says `no`: stop and tell them to resolve whatever is blocking before re-running `/pdlc ship`.
67
+
68
+ ### Step 4 — Merge to main
69
+
70
+ Switch to main and merge:
71
+ ```bash
72
+ git checkout main
73
+ git merge --no-ff feature/[feature-name] -m "feat([feature-name]): [one-line feature description from the PRD Overview section]"
74
+ ```
75
+
76
+ **TIER 1 HARD BLOCK**: Do not force-push to main under any circumstances. If a merge conflict arises, stop and tell the user:
77
+
78
+ > "Merge conflict detected. Please resolve the conflicts manually, then re-run `/pdlc ship`."
79
+
80
+ ### Step 5 — Generate release notes and CHANGELOG entry
81
+
82
+ Jarvis role: read all commits on the feature branch since it diverged from main:
83
+ ```bash
84
+ git log main..[feature branch before merge] --oneline
85
+ ```
86
+
87
+ Generate a CHANGELOG entry in Conventional Changelog format. Draft it as:
88
+
89
+ ```markdown
90
+ ## v[X.Y.Z] — [today's date]
91
+
92
+ ### Added
93
+ - [bullet for each new feature or capability]
94
+
95
+ ### Changed
96
+ - [bullet for each modified behavior]
97
+
98
+ ### Fixed
99
+ - [bullet for each bug fixed, if any]
100
+
101
+ ### Breaking Changes
102
+ - [only if applicable — feature or API that is not backward compatible]
103
+ ```
104
+
105
+ Prepend this entry to `docs/pdlc/memory/CHANGELOG.md`.
106
+
107
+ ### Step 6 — Determine semantic version
108
+
109
+ Read the current latest tag:
110
+ ```bash
111
+ git describe --tags --abbrev=0
112
+ ```
113
+
114
+ If no tags exist, the next version is `v0.1.0`.
115
+
116
+ Analyze the commits on the feature branch:
117
+ - Any commit message contains `BREAKING CHANGE` or a `!` after the type (e.g. `feat(api)!:`) → **major** bump
118
+ - Any commit message starts with `feat` → **minor** bump
119
+ - All commits are `fix`, `docs`, `chore`, `test`, `refactor`, `perf`, or `ci` only → **patch** bump
120
+
121
+ If the bump type is ambiguous (e.g. mix of `feat` and `fix` with no breaking changes), default to **minor**.
122
+
123
+ If you are unsure, ask the user:
124
+
125
+ > "Commits on this branch include features and fixes. Is this a **minor** release (new feature, backward-compatible) or a **patch** release (fixes only)? Type `minor` or `patch`:"
126
+
127
+ Increment the version accordingly. Example: `v1.2.3` → minor bump → `v1.3.0`.
128
+
129
+ ### Step 7 — Tag the commit
130
+
131
+ ```bash
132
+ git tag v[X.Y.Z] -m "[feature-name] — [one-line description from PRD Overview]"
133
+ ```
134
+
135
+ ### Step 8 — Push to origin
136
+
137
+ ```bash
138
+ git push origin main
139
+ git push origin v[X.Y.Z]
140
+ ```
141
+
142
+ **TIER 1 HARD BLOCK**: Do not use `--force` on `git push origin main`. If the push is rejected (non-fast-forward), stop and tell the user:
143
+
144
+ > "Push rejected — main has diverged. Please pull and resolve manually:
145
+ > `git pull --rebase origin main`
146
+ > Then re-run `/pdlc ship`."
147
+
148
+ Do not attempt to force-push.
149
+
150
+ ### Step 9 — Trigger CI/CD (Pulse coordinates)
151
+
152
+ Pulse role: detect the CI/CD setup in this order:
153
+
154
+ 1. Check for `npm run deploy` in `package.json` → if found, run `npm run deploy`
155
+ 2. Check for `make deploy` in `Makefile` → if found, run `make deploy`
156
+ 3. Check for `.github/workflows/` → if deploy workflows exist, trigger via:
157
+ ```bash
158
+ gh workflow run [workflow-filename] --ref main
159
+ ```
160
+ (requires GitHub CLI `gh` to be authenticated)
161
+ 4. If none of the above are found, tell the user:
162
+ > "No CI/CD deployment command detected. Please trigger your deployment manually and confirm when the deployment is complete."
163
+ > Wait for user confirmation before proceeding to Verify.
164
+
165
+ Update `docs/pdlc/memory/STATE.md`:
166
+ - **Current Sub-phase**: `Verify`
167
+ - **Last Checkpoint**: `Operation / Verify / [now ISO 8601]`
168
+
169
+ ---
170
+
171
+ ## VERIFY
172
+
173
+ ### Step 10 — Get the deployment URL
174
+
175
+ Check `docs/pdlc/memory/CONSTITUTION.md` for a deployment URL (look in §1 Hosting/Deploy row or §9 Additional Rules).
176
+
177
+ If not found, ask the user:
178
+
179
+ > "What is the URL of the deployed environment? (e.g. `https://your-app.fly.dev`)"
180
+
181
+ Store as `[deploy-url]`.
182
+
183
+ ### Step 11 — Run smoke tests
184
+
185
+ Run basic health checks against `[deploy-url]`:
186
+
187
+ **11a. HTTP health check:**
188
+ Fetch the root URL and key routes. Check for HTTP 200 responses. Run:
189
+ ```bash
190
+ curl -s -o /dev/null -w "%{http_code}" [deploy-url]
191
+ curl -s -o /dev/null -w "%{http_code}" [deploy-url]/[key-route-from-PRD]
192
+ ```
193
+
194
+ Report the results. Flag any non-200 response.
195
+
196
+ **11b. Critical user journey:**
197
+ Read the PRD at `docs/pdlc/prds/PRD_[feature-name]_[YYYY-MM-DD].md`. Identify the primary acceptance criterion (AC-1).
198
+
199
+ Describe the manual steps the user should take to verify the primary user journey works in production. Example:
200
+
201
+ > "Please verify AC-1 manually: [Given/When/Then steps from the BDD user story]. Confirm the behavior matches the acceptance criterion."
202
+
203
+ Wait for the user to perform the check and report back.
204
+
205
+ **11c. Auth flow (if applicable):**
206
+ If the feature includes authentication (check PRD and design docs for `auth`, `login`, `OAuth`), ask the user to verify the auth flow works end-to-end in the deployed environment.
207
+
208
+ ### Step 12 — Smoke test approval gate
209
+
210
+ Present a summary of smoke test results:
211
+
212
+ > "Smoke test results:
213
+ >
214
+ > - HTTP health check: [pass/fail — [N] routes checked]
215
+ > - Primary user journey (AC-1): [pass/fail — user-reported]
216
+ > - Auth flow: [pass/fail / N/A]
217
+ >
218
+ > **Manual sign-off required. Does the deployment look correct?** (yes/no)"
219
+
220
+ Wait for explicit `yes`. If the user says `no`: help them diagnose the issue. Do not proceed to Reflect until the user confirms the deployment is good.
221
+
222
+ Update `docs/pdlc/memory/STATE.md`:
223
+ - **Current Sub-phase**: `Reflect`
224
+ - **Last Checkpoint**: `Operation / Reflect / [now ISO 8601]`
225
+
226
+ ---
227
+
228
+ ## REFLECT
229
+
230
+ ### Step 13 — Generate the retro
231
+
232
+ Following the gstack-style retrospective approach, generate a Reflect Notes section for the episode file. Cover:
233
+
234
+ **Per-agent contributions** (list which agents participated and what they contributed):
235
+ - Neo: [architectural work done]
236
+ - Echo: [test strategy and coverage work]
237
+ - Phantom: [security checks performed, issues found/resolved]
238
+ - Jarvis: [docs written, CHANGELOG authored]
239
+ - [Auto-selected agents]: [their contributions]
240
+
241
+ **What went well:**
242
+ Analyze the Construction phase: tasks completed without issue, tests that passed cleanly, design decisions that worked out, agent collaboration that was effective. List 3–5 specific observations.
243
+
244
+ **What broke or slowed us down:**
245
+ Review the STATE.md Phase History and episode file: how many auto-fix attempts were needed, which tests failed initially, which review findings required fixing. List 2–4 specific observations.
246
+
247
+ **What to improve next time:**
248
+ Based on the above, list 2–3 actionable improvements for the next feature cycle.
249
+
250
+ **Metrics snapshot:**
251
+ - Cycle time: calculate from first Inception entry in Phase History to today's date
252
+ - Test pass rate: calculate from the episode file Test Summary (total passed / total run × 100%)
253
+ - Tasks completed: count from Beads
254
+ - Review findings: count from the review file (Important / Recommended / Advisory)
255
+
256
+ ### Step 14 — Update the episode file
257
+
258
+ Open `docs/pdlc/memory/episodes/[NNN]_[feature-name]_[YYYY-MM-DD].md`.
259
+
260
+ Append the Reflect Notes section with all content from Step 13.
261
+
262
+ Update:
263
+ - **Date delivered**: today's date (the actual merge date)
264
+ - **Status**: keep as `Draft` — it becomes `Approved` after human sign-off below
265
+ - **Links → PR**: fill in the PR link if one was created (check `gh pr list` or ask the user)
266
+
267
+ ### Step 15 — Episode file approval gate
268
+
269
+ Tell the user:
270
+
271
+ > "Episode file is complete at `docs/pdlc/memory/episodes/[NNN]_[feature-name]_[YYYY-MM-DD].md`
272
+ >
273
+ > Please review the full episode file — the What Was Built summary, decisions, test results, tech debt, and retro notes.
274
+ >
275
+ > **Approve to commit this episode to the repository?** (approve / request changes)"
276
+
277
+ Wait for explicit approval. If the user requests changes: make them, re-save the file, and re-present.
278
+
279
+ When approved: update the **Approval** section in the episode file with the approver's name and today's date. Set **Status** to `Approved`.
280
+
281
+ ### Step 16 — Commit the episode and update memory files
282
+
283
+ After approval, run these commands sequentially:
284
+
285
+ **16a. Update the episodes index:**
286
+
287
+ Append a row to `docs/pdlc/memory/episodes/index.md`:
288
+ ```
289
+ | [NNN] | [Feature Name] | [today's date] | [[NNN]_[feature-name]_[date].md]([NNN]_[feature-name]_[date].md) | [#PR or —] | Shipped |
290
+ ```
291
+
292
+ **16b. Update OVERVIEW.md:**
293
+
294
+ Read `docs/pdlc/memory/OVERVIEW.md`. Update:
295
+ - **Active Functionality**: add a bullet for the new capability shipped (e.g. "Users can now [feature description]")
296
+ - **Shipped Features table**: add a row for this feature with episode and PR links
297
+ - **Architecture Summary**: update if this feature changed the architecture meaningfully (new service, new DB table, new integration)
298
+ - **Known Tech Debt**: append any tech debt items recorded in the episode file
299
+ - **Last updated**: today's date
300
+
301
+ **16c. Commit everything:**
302
+
303
+ ```bash
304
+ git add docs/pdlc/memory/episodes/[NNN]_[feature-name]_[YYYY-MM-DD].md
305
+ git add docs/pdlc/memory/episodes/index.md
306
+ git add docs/pdlc/memory/OVERVIEW.md
307
+ git add docs/pdlc/memory/CHANGELOG.md
308
+ git commit -m "docs(pdlc): add episode [NNN] — [feature-name]"
309
+ git push origin main
310
+ ```
311
+
312
+ **TIER 2 action**: this is a direct push to main (not a PR). Since this is a docs-only commit (episode file), it is acceptable — but confirm with the user if their workflow requires a PR even for docs.
313
+
314
+ ### Step 17 — Final STATE.md update
315
+
316
+ Update `docs/pdlc/memory/STATE.md`:
317
+ - **Current Phase**: `Idle — Ready for next /pdlc brainstorm`
318
+ - **Current Feature**: `none`
319
+ - **Active Beads Task**: `none`
320
+ - **Current Sub-phase**: `none`
321
+ - **Last Checkpoint**: `Operation / Complete / [now ISO 8601]`
322
+
323
+ Append to Phase History:
324
+ ```
325
+ | [now] | operation_complete | Idle | — | none |
326
+ ```
327
+
328
+ ### Step 18 — Print completion message
329
+
330
+ > "[feature-name] shipped. Episode [NNN] committed.
331
+ >
332
+ > - Version: v[X.Y.Z]
333
+ > - Episode: docs/pdlc/memory/episodes/[NNN]_[feature-name]_[YYYY-MM-DD].md
334
+ > - CHANGELOG updated: docs/pdlc/memory/CHANGELOG.md
335
+ > - OVERVIEW updated: docs/pdlc/memory/OVERVIEW.md
336
+ >
337
+ > Ready for the next feature — run `/pdlc brainstorm [next-feature]` to start."
338
+
339
+ ---
340
+
341
+ ## Rules
342
+
343
+ - Never force-push to `main`. This is a Tier 1 hard block with no override.
344
+ - Never push PR comments or tags without human approval at the ship gate (Step 3).
345
+ - Never proceed to Reflect without human sign-off on smoke tests (Step 12).
346
+ - Never commit the episode file without human approval (Step 15).
347
+ - If the deployment URL is unknown, ask — do not guess or skip smoke tests.
348
+ - The merge strategy is always `--no-ff` (merge commit). Do not squash or rebase feature branches.
349
+ - If any step fails due to an external service (GitHub, CI, deploy target), describe the failure clearly and give the user the manual steps to resolve it. Do not silently skip.
@@ -0,0 +1,40 @@
1
+ {
2
+ "statusLine": {
3
+ "type": "command",
4
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/pdlc-statusline.js"
5
+ },
6
+ "hooks": {
7
+ "PostToolUse": [
8
+ {
9
+ "matcher": "*",
10
+ "hooks": [
11
+ {
12
+ "type": "command",
13
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/pdlc-context-monitor.js"
14
+ }
15
+ ]
16
+ }
17
+ ],
18
+ "PreToolUse": [
19
+ {
20
+ "matcher": "Bash",
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/pdlc-guardrails.js"
25
+ }
26
+ ]
27
+ }
28
+ ],
29
+ "SessionStart": [
30
+ {
31
+ "hooks": [
32
+ {
33
+ "type": "command",
34
+ "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/pdlc-session-start.sh"
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ }
package/CLAUDE.md ADDED
@@ -0,0 +1,179 @@
1
+ # PDLC — Product Development Lifecycle
2
+
3
+ You are operating within the PDLC (Product Development Lifecycle) framework, a structured Claude Code plugin designed for small startup teams (2–5 engineers). PDLC guides every feature from raw idea through shipping and retrospective across four phases: Initialization, Inception, Construction, and Operation. The framework combines methodology discipline (TDD, systematic debugging, subagent reviews), specialist agent roles, context-rot prevention, spec-driven execution, and file-based persistent memory. Every session begins by reading `docs/pdlc/memory/STATE.md` to determine where work left off, then resumes automatically from the last checkpoint. All rules, standards, and overrides live in `docs/pdlc/memory/CONSTITUTION.md` — the Constitution always wins.
4
+
5
+ ---
6
+
7
+ ## PDLC Flow Diagram
8
+
9
+ ```mermaid
10
+ flowchart TD
11
+ START([Session Start]) --> RESUME{docs/pdlc/memory/\nSTATE.md exists?}
12
+ RESUME -->|No| INIT
13
+ RESUME -->|Yes| AUTOLOAD[Auto-resume from\nlast checkpoint]
14
+ AUTOLOAD --> PHASE_CHECK{Current phase?}
15
+ PHASE_CHECK -->|Inception| INCEPTION
16
+ PHASE_CHECK -->|Construction| CONSTRUCTION
17
+ PHASE_CHECK -->|Operation| OPERATION
18
+
19
+ %% PHASE 0 — INITIALIZATION
20
+ INIT["/pdlc init"] --> I1[Setup CONSTITUTION.md\nINTENT.md]
21
+ I1 --> I2[Create Memory Bank\nROADMAP · DECISIONS\nSTATE · CHANGELOG\nOVERVIEW]
22
+ I2 --> I3[bd init → .beads/\nin project root]
23
+ I3 --> I4([Initialization Complete\nReady for /pdlc brainstorm])
24
+
25
+ %% PHASE 1 — INCEPTION
26
+ INCEPTION["/pdlc brainstorm"] --> D1[Start Visual\nCompanion Server]
27
+ D1 --> D2[DISCOVER\nSocratic questioning\n+ external context ingestion]
28
+ D2 --> D3[Human approves\nvisual + conversation output]
29
+ D3 --> D4[DEFINE\nClaude auto-generates\nPRD draft — BDD stories]
30
+ D4 --> D5{Human approves\nPRD?}
31
+ D5 -->|Revise| D4
32
+ D5 -->|Approved| D6[DESIGN\nARCHITECTURE · data-model\napi-contracts — linked from PRD]
33
+ D6 --> D7{Human approves\ndesign docs?}
34
+ D7 -->|Revise| D6
35
+ D7 -->|Approved| D8[PLAN\nCreate Beads tasks with\nepic·story labels + dependencies]
36
+ D8 --> D9{Human approves\nBeads task list?}
37
+ D9 -->|Revise| D8
38
+ D9 -->|Approved| D10[Stop Visual Server\nUpdate docs/pdlc/memory/STATE.md]
39
+ D10 --> D11([Inception Complete\nReady for /pdlc build])
40
+
41
+ %% PHASE 2 — CONSTRUCTION
42
+ CONSTRUCTION["/pdlc build"] --> C1[bd ready → pick\nhighest-priority task]
43
+ C1 --> C2[bd update --claim\nUpdate docs/pdlc/memory/STATE.md]
44
+ C2 --> C3{Execution\nmode?}
45
+ C3 -->|Agent Teams| C4[Auto-select roles\nNeo·Echo·Phantom·Jarvis\n+ context roles]
46
+ C3 -->|Sub-Agent| C5[Single focused\nsubagent]
47
+ C4 & C5 --> C6[BUILD\nTDD enforced:\nfailing tests → implement → pass]
48
+ C6 --> C7{Tests pass?}
49
+ C7 -->|Fail — attempt ≤3| C6
50
+ C7 -->|Fail — attempt 3| C8{Human choice}
51
+ C8 -->|Continue| C6
52
+ C8 -->|Intervene| C9[Human suggests\ncourse of action]
53
+ C9 --> C6
54
+ C7 -->|Pass| C10[REVIEW\nNeo·Echo·Phantom·Jarvis\n+ builder]
55
+ C10 --> C11[Generate\nREVIEW_task_date.md]
56
+ C11 --> C12{Human approves\nreview?}
57
+ C12 -->|Revise| C10
58
+ C12 -->|Approved| C13[Push PR comments\nvia GitHub integration]
59
+ C13 --> C14[TEST\nUnit · Integration · E2E\nPerf · A11y · Visual Regression\nskip any layer via Constitution]
60
+ C14 --> C15{Constitution\ngates pass?}
61
+ C15 -->|Soft warnings| C16[Human: fix or accept?]
62
+ C16 --> C15
63
+ C15 -->|Pass| C17[bd done\nUpdate docs/pdlc/memory/STATE.md]
64
+ C17 --> C18{More tasks\nin bd ready?}
65
+ C18 -->|Yes| C1
66
+ C18 -->|No| C19[Claude drafts\nepisode file]
67
+ C19 --> C20([Construction Complete\nReady for /pdlc ship])
68
+
69
+ %% PHASE 3 — OPERATION
70
+ OPERATION["/pdlc ship"] --> O1[SHIP\nMerge PR — merge commit]
71
+ O1 --> O2[Trigger CI/CD\nvia Pulse]
72
+ O2 --> O3[Jarvis generates\nrelease notes + CHANGELOG]
73
+ O3 --> O4[PDLC auto-tags\nsemver commit]
74
+ O4 --> O5[VERIFY\nSmoke tests vs\ndeployed environment]
75
+ O5 --> O6{Human\nsign-off?}
76
+ O6 -->|No — issues found| O5
77
+ O6 -->|Approved| O7[REFLECT\ngstack-style retro:\nper-agent breakdown\nshipping streaks · metrics]
78
+ O7 --> O8[Human approves\nepisode file]
79
+ O8 --> O9[Commit episode\nUpdate docs/pdlc/memory/OVERVIEW.md\nUpdate docs/pdlc/memory/CHANGELOG.md]
80
+ O9 --> O10([Feature Delivered\nReady for next /pdlc brainstorm])
81
+
82
+ %% SAFETY GUARDRAILS
83
+ style C8 fill:#ff4444,color:#fff
84
+ style D5 fill:#f0a500,color:#fff
85
+ style D7 fill:#f0a500,color:#fff
86
+ style D9 fill:#f0a500,color:#fff
87
+ style C12 fill:#f0a500,color:#fff
88
+ style O6 fill:#f0a500,color:#fff
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Phase Summary
94
+
95
+ | Phase | Command | Description |
96
+ |-------|---------|-------------|
97
+ | **Phase 0 — Initialization** | `/pdlc init` | First-time setup: Constitution, Intent, Memory Bank, Beads (`bd init`) |
98
+ | **Phase 1 — Inception** | `/pdlc brainstorm` | Discover → Define → Design → Plan for a feature; visual companion server active |
99
+ | **Phase 2 — Construction** | `/pdlc build` | Build (TDD) → Review → Test for current feature; wave-based task execution via Beads |
100
+ | **Phase 3 — Operation** | `/pdlc ship` | Ship (merge PR) → Verify (smoke tests) → Reflect (retro + episode file) |
101
+ | *(resume)* | *(none)* | If no command given, read `docs/pdlc/memory/STATE.md` and resume from last checkpoint |
102
+
103
+ ---
104
+
105
+ ## Agent Roster
106
+
107
+ **Always-on** — participate in every task regardless of scope:
108
+
109
+ | Name | Role | Responsibility |
110
+ |------|------|----------------|
111
+ | **Neo** | Architect | High-level design, cross-cutting concerns, tech debt radar |
112
+ | **Echo** | QA Engineer | Test strategy, edge cases, regression coverage |
113
+ | **Phantom** | Security Reviewer | Auth, input validation, OWASP checks |
114
+ | **Jarvis** | Tech Writer | Inline docs, API docs, changelogs |
115
+
116
+ **Auto-selected** — PDLC picks based on task labels and scope:
117
+
118
+ | Name | Role | Responsibility |
119
+ |------|------|----------------|
120
+ | **Bolt** | Backend Engineer | API, services, DB, business logic |
121
+ | **Friday** | Frontend Engineer | UI components, state, UX implementation |
122
+ | **Muse** | UX Designer | User experience, flows, interaction design |
123
+ | **Oracle** | PM | Requirements clarity, scope, acceptance criteria |
124
+ | **Pulse** | DevOps | CI/CD, infra, deployment, environment config |
125
+
126
+ ---
127
+
128
+ ## Approval Gates
129
+
130
+ PDLC pauses and waits for explicit human approval at each of the following checkpoints:
131
+
132
+ 1. **End of Discover** — human approves the Socratic conversation output before PRD is drafted
133
+ 2. **End of Define** — human approves the auto-generated PRD draft before Design begins
134
+ 3. **End of Design** — human approves architecture, data-model, and API contract docs
135
+ 4. **End of Plan** — human approves the Beads task list before Construction begins
136
+ 5. **End of Review** — human approves the `REVIEW_[task-id]_[date].md` file before PR comments are posted
137
+ 6. **Ship** — human approves merge to main and deployment trigger
138
+ 7. **Verify** — human sign-off after smoke tests pass against the deployed environment
139
+ 8. **Reflect** — human reads and approves the episode file before it is committed
140
+
141
+ ---
142
+
143
+ ## 3-Strike Loop Breaker
144
+
145
+ When Claude enters a bug-fix loop during Construction (build → test → fix → test → fix…):
146
+
147
+ - Maximum **3 automatic fix attempts** per issue.
148
+ - On the **3rd failed attempt**, PDLC pauses and presents the human with a choice:
149
+ - **(A) Continue automatically** — let Claude keep trying with a fresh approach.
150
+ - **(B) Human takes the wheel** — human reviews the error and suggests a course of action; Claude resumes with that guidance.
151
+
152
+ ---
153
+
154
+ ## Key Rules
155
+
156
+ > **These rules are enforced by default. All can be overridden via `docs/pdlc/memory/CONSTITUTION.md`.**
157
+
158
+ | Rule | Default Behavior |
159
+ |------|-----------------|
160
+ | **TDD enforced** | Claude must write failing tests before any implementation code. No implementation without a failing test. |
161
+ | **Merge commit** | All PRs use merge commits (no squash, no rebase) to preserve full branch history. |
162
+ | **Soft warnings only** | Security findings (Phantom) and test coverage gaps (Echo) are flagged but do not hard-block progress. Human decides: fix now, accept, or defer to tech debt. |
163
+ | **Constitution overrides defaults** | Any rule in this document can be changed by editing `docs/pdlc/memory/CONSTITUTION.md`. The Constitution is the single source of truth for all project-specific rules. |
164
+ | **Tier 1 hard blocks** | Force-push to `main`, dropping DB tables without a migration file, deleting files not created on the current branch, deploying with failing smoke tests — these require **double confirmation in red highlighted text** to override. |
165
+ | **Tier 2 pause & confirm** | `rm -rf`, `git reset --hard`, production DB migrations, changes to `CONSTITUTION.md`, closing all Beads tasks at once, any external API call that writes/posts/sends — PDLC stops and waits for explicit yes. |
166
+ | **Tier 3 logged warnings** | Skipping a test layer, overriding a Constitution rule, accepting a Phantom security warning without fixing, accepting an Echo coverage gap — PDLC proceeds and records the decision in `STATE.md`. |
167
+
168
+ ---
169
+
170
+ ## State & Configuration Pointers
171
+
172
+ - **Current project state:** `docs/pdlc/memory/STATE.md`
173
+ - **Constitution (rules, standards, overrides):** `docs/pdlc/memory/CONSTITUTION.md`
174
+ - **Intent (problem statement, target user, value prop):** `docs/pdlc/memory/INTENT.md`
175
+ - **Roadmap:** `docs/pdlc/memory/ROADMAP.md`
176
+ - **Architectural decisions:** `docs/pdlc/memory/DECISIONS.md`
177
+ - **Changelog:** `docs/pdlc/memory/CHANGELOG.md`
178
+ - **Aggregated delivery overview:** `docs/pdlc/memory/OVERVIEW.md`
179
+ - **Episode history:** `docs/pdlc/memory/episodes/index.md`