5-phase-workflow 1.9.4 → 2.0.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.
Files changed (44) hide show
  1. package/README.md +68 -420
  2. package/bin/install.js +294 -64
  3. package/bin/sync-agents.js +50 -11
  4. package/docs/findings.md +3 -3
  5. package/docs/workflow-guide.md +110 -1046
  6. package/package.json +6 -5
  7. package/src/agents/step-executor-agent.md +49 -0
  8. package/src/agents/step-orchestrator-agent.md +111 -0
  9. package/src/agents/verification-agent.md +78 -0
  10. package/src/commands/5/address-review-findings.md +69 -403
  11. package/src/commands/5/apply-review-findings.md +66 -0
  12. package/src/commands/5/configure.md +113 -77
  13. package/src/commands/5/discuss-feature.md +47 -57
  14. package/src/commands/5/eject.md +7 -6
  15. package/src/commands/5/implement.md +202 -0
  16. package/src/commands/5/plan.md +164 -0
  17. package/src/commands/5/reconfigure.md +30 -29
  18. package/src/commands/5/reply-pr-comments.md +46 -0
  19. package/src/commands/5/review.md +95 -0
  20. package/src/commands/5/split.md +190 -0
  21. package/src/commands/5/synchronize-agents.md +4 -4
  22. package/src/commands/5/triage-pr-comments.md +70 -0
  23. package/src/commands/5/update.md +8 -8
  24. package/src/hooks/check-updates.js +50 -7
  25. package/src/hooks/plan-guard.js +28 -22
  26. package/src/hooks/statusline.js +50 -4
  27. package/src/skills/configure-docs-index/SKILL.md +16 -20
  28. package/src/skills/configure-skills/SKILL.md +12 -12
  29. package/src/templates/AGENTS.md +94 -0
  30. package/src/templates/workflow/FIX-PLAN.md +1 -1
  31. package/src/templates/workflow/PLAN-COMPACT.md +42 -0
  32. package/src/templates/workflow/PLAN.md +58 -34
  33. package/src/templates/workflow/REVIEW-FINDINGS.md +7 -16
  34. package/src/templates/workflow/REVIEW-SUMMARY.md +5 -0
  35. package/src/templates/workflow/STATE.json +32 -3
  36. package/src/agents/component-executor.md +0 -57
  37. package/src/commands/5/implement-feature.md +0 -381
  38. package/src/commands/5/plan-feature.md +0 -248
  39. package/src/commands/5/plan-implementation.md +0 -333
  40. package/src/commands/5/quick-implement.md +0 -375
  41. package/src/commands/5/review-code.md +0 -213
  42. package/src/commands/5/verify-implementation.md +0 -277
  43. package/src/templates/workflow/FEATURE-SPEC.md +0 -100
  44. package/src/templates/workflow/VERIFICATION-REPORT.md +0 -103
@@ -1,53 +1,51 @@
1
1
  ---
2
2
  name: 5:configure
3
- description: Configures the project. Analyzes project, gathers preferences, writes config.json, and creates feature spec for remaining setup. Follow up with /5:plan-implementation CONFIGURE.
3
+ description: Configures the project. Analyzes project, gathers preferences, writes config.json, and creates .5/features/CONFIGURE/plan.md. Follow up with /5:implement CONFIGURE.
4
4
  allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
5
5
  user-invocable: true
6
- model: opus
7
- context: fork
8
6
  ---
9
7
 
10
8
  <role>
11
- You are a Project Configurator. You analyze a project, gather preferences, and write config.json plus a feature spec.
12
- You do NOT generate AGENTS.md, CLAUDE.md, documentation files, or skills directly — those are Phase 3's job.
13
- You write ONLY to: .5/config.json, .5/version.json, .5/features/CONFIGURE/feature.md, and .gitignore.
14
- After writing config.json and the feature spec, you are DONE. Exit immediately.
9
+ You are a Project Configurator. You analyze a project, gather preferences, and write config.json plus a unified plan.
10
+ You do NOT generate AGENTS.md, CLAUDE.md, documentation files, or skills directly — those are /5:implement's job.
11
+ You write ONLY to: .5/config.json, .5/version.json, .5/features/CONFIGURE/plan.md, and .gitignore.
12
+ After writing config.json and the unified plan, you are DONE. Exit immediately.
15
13
  </role>
16
14
 
17
- # Configure (Phase 1 - Plan Feature for Project Configuration)
15
+ # Configure (Project Setup Plan)
16
+
17
+ Current commit: !`git rev-parse --short HEAD 2>/dev/null || echo "none"`
18
18
 
19
19
  ## Overview
20
20
 
21
- This command is **Phase 1** of the 5-phase workflow applied to project configuration itself. It analyzes the project, asks the user questions, and outputs a feature spec at `.5/features/CONFIGURE/feature.md`.
21
+ This command prepares project configuration. It analyzes the project, asks preference questions, writes `.5/config.json`, and writes a unified plan at `.5/features/CONFIGURE/plan.md`.
22
22
 
23
23
  After running this command, proceed through the standard phases:
24
- 1. **`/5:configure`** (this command) - Plan the configuration feature
25
- 2. `/5:plan-implementation CONFIGURE` - Create implementation plan
26
- 3. `/5:implement-feature CONFIGURE` - Execute configuration (uses `configure-docs-index` and `configure-skills`)
27
- 4. `/5:verify-implementation` - Verify configuration
28
- 5. `/5:review-code` - Review generated files
24
+ 1. **`/5:configure`** (this command) - Create config and CONFIGURE plan
25
+ 2. `/5:implement CONFIGURE` - Execute configuration (uses `configure-docs-index` and `configure-skills`)
26
+ 3. `/5:review` - Review generated files if desired
29
27
 
30
28
  ## ⚠️ CRITICAL SCOPE CONSTRAINT
31
29
 
32
- **THIS COMMAND WRITES config.json AND CREATES THE FEATURE SPEC. NOTHING ELSE.**
30
+ **THIS COMMAND WRITES config.json AND CREATES THE CONFIGURE PLAN. NOTHING ELSE.**
33
31
 
34
32
  Your job in this command:
35
33
  ✅ Analyze project (detect type, build commands, etc.)
36
34
  ✅ Gather user preferences via questions
37
35
  ✅ Write `.5/config.json` directly
38
- ✅ Create feature spec at `.5/features/CONFIGURE/feature.md` for remaining work
39
- ✅ Tell user to run /5:plan-implementation CONFIGURE
36
+ ✅ Create unified plan at `.5/features/CONFIGURE/plan.md` for remaining work
37
+ ✅ Tell user to run /5:implement CONFIGURE
40
38
 
41
39
  Your job is NOT:
42
- ❌ Create AGENTS.md or CLAUDE.md directly (Phase 3 does this)
43
- ❌ Generate documentation files directly (Phase 3 does this)
44
- ❌ Generate skills directly (Phase 3 does this)
40
+ ❌ Create AGENTS.md or CLAUDE.md directly (/5:implement does this)
41
+ ❌ Generate documentation files directly (/5:implement does this)
42
+ ❌ Generate skills directly (/5:implement does this)
45
43
  ❌ Skip user interaction
46
44
  ❌ Assume project structure
47
45
 
48
- **After writing config.json, creating the feature spec, and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
46
+ **After writing config.json, creating the unified plan, and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
49
47
 
50
- **If you find yourself creating AGENTS.md, CLAUDE.md, documentation files, or skills, STOP IMMEDIATELY. You should only be writing config.json and the feature spec.**
48
+ **If you find yourself creating AGENTS.md, CLAUDE.md, documentation files, or skills, STOP IMMEDIATELY. You should only be writing config.json and the unified plan.**
51
49
 
52
50
  ## Configuration Process
53
51
 
@@ -94,7 +92,7 @@ fi
94
92
 
95
93
  **1e. Check AGENTS.md / CLAUDE.md:**
96
94
  - If `AGENTS.md` exists, read its content
97
- - If `AGENTS.md` does not exist but `CLAUDE.md` exists with real content (not just `@AGENTS.md`), read it — this is a legacy setup that will be migrated to AGENTS.md during Phase 3
95
+ - If `AGENTS.md` does not exist but `CLAUDE.md` exists with real content (not just `@AGENTS.md`), read it — this is a legacy setup that will be migrated to AGENTS.md during planning
98
96
 
99
97
  **1f. Scan existing skills:**
100
98
  - Check `.claude/skills/` for existing project-specific skills
@@ -259,7 +257,7 @@ If no patterns/commands detected:
259
257
  - Allow manual entry of pattern names/locations or command names
260
258
 
261
259
  **2m. Git-ignore `.5/features/` folder:**
262
- - "The `.5/features/` folder will contain feature specs, implementation plans, and state files. Would you like to add it to `.gitignore`?"
260
+ - "The `.5/features/` folder will contain unified plans, state files, and review findings. Would you like to add it to `.gitignore`?"
263
261
  - Options:
264
262
  1. "Yes, add to .gitignore (recommended)" — workflow artifacts stay local, not tracked in version control
265
263
  2. "No, track in git" — useful if you want to share specs and plans with your team
@@ -283,7 +281,7 @@ mkdir -p .5
283
281
  After writing config.json, update `.5/version.json` so the reconfigure reminder can track staleness:
284
282
  1. Read `.5/version.json` (if it exists)
285
283
  2. Set `configuredAt` to the current ISO timestamp (`new Date().toISOString()`)
286
- 3. Set `configuredAtCommit` to the current short commit hash (run `git rev-parse --short HEAD`)
284
+ 3. Set `configuredAtCommit` to the current short commit hash injected at the top of this command
287
285
  4. Write back `.5/version.json` preserving all other fields
288
286
 
289
287
  **Apply `.gitignore` if selected:**
@@ -300,20 +298,89 @@ Ensure `.5/.reconfig-reminder` is gitignored (it's a transient runtime flag that
300
298
  1. Check if `.gitignore` exists in the project root — create it if not
301
299
  2. Check if `.5/.reconfig-reminder` is already listed — if not, append `.5/.reconfig-reminder` on a new line
302
300
 
303
- ### Step 3: Create Feature Spec
301
+ ### Step 3: Create Configuration Plan
304
302
 
305
- Write `.5/features/CONFIGURE/feature.md` containing all gathered data:
303
+ Write `.5/features/CONFIGURE/plan.md` containing all gathered data:
306
304
 
307
305
  ```markdown
308
- # Feature: Project Configuration
306
+ ---
307
+ ticket: CONFIGURE
308
+ feature: CONFIGURE
309
+ created: {ISO-timestamp}
310
+ ---
311
+
312
+ # Plan: CONFIGURE - Project Configuration
309
313
 
310
- ## Summary
314
+ ## Overview
311
315
  Generates AGENTS.md, CLAUDE.md shim, a rebuildable codebase index, and project-specific skills. (config.json already written.)
312
316
 
313
- ## Requirements
317
+ ## What Changes
318
+
319
+ - Generate focused documentation and a rebuildable codebase index.
320
+ - Generate selected project-specific skills and scoped rules.
321
+ - Preserve existing user-authored AGENTS.md/CLAUDE.md content.
322
+
323
+ ## Existing Patterns to Follow
324
+
325
+ - `.claude/skills/configure-docs-index/SKILL.md` - documentation and index generation behavior.
326
+ - `.claude/skills/configure-skills/SKILL.md` - skill and rule generation behavior.
327
+
328
+ ## Constraints
329
+
330
+ - config.json is already written by `/5:configure`.
331
+ - Do not generate empty placeholder documentation or index files.
332
+ - Preserve user-authored sections in AGENTS.md.
333
+
334
+ ## Scope
335
+
336
+ ### In
337
+
338
+ - Documentation files under `.5/`.
339
+ - `.5/index/` and rebuild script.
340
+ - AGENTS.md plus CLAUDE.md shim.
341
+ - Selected create/run skills.
342
+ - Selected scoped rules.
314
343
 
315
- ### Requirement 1: Generate Documentation Files
316
- Handled by: `configure-docs-index`
344
+ ### Out
345
+
346
+ - Changing preferences already saved in `.5/config.json`.
347
+
348
+ ## Acceptance Criteria
349
+
350
+ - [ ] `.5/ARCHITECTURE.md` exists when architecture knowledge was found.
351
+ - [ ] `.5/TESTING.md` exists when test knowledge was found.
352
+ - [ ] `.5/CONCERNS.md` exists only if concerns were found.
353
+ - [ ] `.5/index/rebuild-index.sh` exists and rebuilds the index.
354
+ - [ ] `.5/index/README.md` documents generated index files.
355
+ - [ ] `AGENTS.md` references created `.5/` files and the index rebuild rule.
356
+ - [ ] `CLAUDE.md` contains only `@AGENTS.md`.
357
+ - [ ] Selected project-specific skills are generated in `.claude/skills/`.
358
+ - [ ] Selected scoped rules are generated in `.claude/rules/`.
359
+ - [ ] User-written AGENTS.md/CLAUDE.md content is preserved.
360
+
361
+ ## Decisions
362
+
363
+ - [DECIDED] Use the detected project type, build command, test command, ticket settings, review tool, and selected patterns from this configure session.
364
+ - [FLEXIBLE] Omit optional generated files when no useful project knowledge exists.
365
+ - [DEFERRED] Further preference changes; rerun `/5:configure` for those.
366
+
367
+ ## Module Impact
368
+
369
+ | Module/Area | Impact |
370
+ |-------------|--------|
371
+ | `.5/` | Create/update documentation and index artifacts. |
372
+ | `AGENTS.md` / `CLAUDE.md` | Create or update provider instructions. |
373
+ | `.claude/skills/` | Create selected project-specific skills. |
374
+ | `.claude/rules/` | Create selected scoped rules. |
375
+
376
+ ## Component Checklist
377
+
378
+ | Component | Action | Target Path | Intent |
379
+ |-----------|--------|-------------|--------|
380
+ | configure docs and index | create | `.5/` | Generate project documentation, codebase index, AGENTS.md, and CLAUDE.md shim. |
381
+ | configure skills and rules | create | `.claude/skills/` | Generate selected create/run skills and scoped rules from detected conventions. |
382
+
383
+ ## Technical Notes
317
384
 
318
385
  Analyze the codebase and generate focused documentation capturing only non-derivable knowledge (skip version numbers, dependency lists, directory layouts, linter configs — Claude Code can look these up directly):
319
386
 
@@ -330,24 +397,13 @@ Analyze the codebase and generate focused documentation capturing only non-deriv
330
397
  - Re-running the script should fully refresh the index in place
331
398
 
332
399
  **Create AGENTS.md** (provider-agnostic instructions file):
333
- - Project overview and build commands
334
- - Links to whichever `.5/` documentation files were created
335
- - Links to `.5/index/README.md`, the generated index files, and `.5/index/rebuild-index.sh`
336
- - An explicit instruction that if the codebase index is older than one day, it should be regenerated by running `.5/index/rebuild-index.sh`
337
- - Workflow rules section (verbatim):
338
- ```
339
- ## Workflow Rules
340
- When running `/5:` workflow commands, follow the command instructions exactly as written.
341
- Do not skip steps, combine phases, or proceed to actions not specified in the current command.
342
- Each phase produces a specific artifact — do not create artifacts belonging to other phases.
343
- ```
344
- - Mandatory coding guidelines:
345
- 1. Types should be clear and types should be available when possible
346
- 2. Use doc (jsdoc, javadoc, pydoc, etc) concisely. No doc is better than meaningless doc
347
- 3. Keep files short and structured
348
- 4. Extract methods, classes
349
- 5. Respect SRP and DRY
350
- 6. Make code maintainable and modular
400
+ - Use `.claude/templates/AGENTS.md` as the source template
401
+ - Fill `{PROJECT_OVERVIEW}` with 1-2 sentences from README/package.json
402
+ - Fill `{BUILD_RUN_COMMANDS}` with build, test, and other detected commands
403
+ - Fill `{PROJECT_DOCUMENTATION_LINKS}` with whichever `.5/` documentation files were created
404
+ - Fill `{CODEBASE_INDEX_LINKS}` with `.5/index/README.md`, generated index files, and `.5/index/rebuild-index.sh`
405
+ - Fill `{CUSTOM_DOCUMENTATION}` with preserved user-authored sections under `## Custom Documentation`; remove the placeholder if there is no custom content
406
+ - Preserve static template sections exactly as written, including skill usage, workflow rules, coding guidelines, simplicity, testing, surgical changes, goal-driven execution, and index freshness
351
407
 
352
408
  **Create CLAUDE.md shim:**
353
409
  - Contains only `@AGENTS.md` (Claude Code include syntax)
@@ -382,43 +438,23 @@ Only generate rules for patterns that were actually detected:
382
438
  - `api-patterns.md` — API conventions, error handling (scoped to API/route/controller files)
383
439
  - `dependencies.md` — dependency usage patterns, env var conventions (unconditional)
384
440
 
385
- ## Acceptance Criteria
386
- - [ ] `.5/` directory created
387
- - [ ] Documentation files exist and contain only non-derivable knowledge:
388
- - [ ] `.5/ARCHITECTURE.md` — architecture, conventions, where to add code
389
- - [ ] `.5/TESTING.md` — test patterns and gotchas
390
- - [ ] `.5/CONCERNS.md` — only if concerns were found (omit if empty)
391
- - [ ] `.5/index/` directory exists
392
- - [ ] `.5/index/rebuild-index.sh` exists and rebuilds the index
393
- - [ ] `.5/index/README.md` exists and documents the generated index files
394
- - [ ] Multiple focused `.5/index/*.md` files are generated for applicable codebase concerns
395
- - [ ] Empty sections omitted (no "Not detected" / "None found" placeholders)
396
- - [ ] `AGENTS.md` exists with references to created `.5/` files
397
- - [ ] `AGENTS.md` links to the codebase index and rebuild script
398
- - [ ] `AGENTS.md` says to regenerate the index if it is older than one day
399
- - [ ] `AGENTS.md` contains 6 coding guidelines
400
- - [ ] `CLAUDE.md` exists and contains only `@AGENTS.md`
401
- - [ ] All specified project-specific skills are generated in `.claude/skills/`
402
- - [ ] Generated skills reference actual project conventions
403
- - [ ] If AGENTS.md or CLAUDE.md existed before, user-written sections are preserved in AGENTS.md
404
- - [ ] `.claude/rules/` directory exists with scoped rule files (if rules generation selected)
405
- - [ ] Generated rules use `paths:` frontmatter for scoping where applicable
406
- - [ ] Rules contain concise directives, not documentation
407
- - [ ] No rules generated for undetected patterns
441
+ ## Next Steps
442
+
443
+ 1. Run `/5:implement CONFIGURE`.
408
444
  ```
409
445
 
410
- **Important:** Use `mkdir -p .5/features/CONFIGURE` before writing the feature spec.
446
+ **Important:** Use `mkdir -p .5/features/CONFIGURE` before writing the unified plan.
411
447
 
412
448
  ### Step 4: Guide User to Next Phase
413
449
 
414
450
  Tell the user:
415
451
 
416
452
  1. "Configuration saved to `.5/config.json`"
417
- 2. "Configuration feature planned at `.5/features/CONFIGURE/feature.md`"
453
+ 2. "Configuration plan written to `.5/features/CONFIGURE/plan.md`"
418
454
  3. "Next steps:"
419
455
  - "Run `/clear` to reset context"
420
- - "Then run `/5:plan-implementation CONFIGURE`"
421
- 4. "After that: Continue with `/5:implement-feature CONFIGURE` -> `/5:verify-implementation` -> `/5:review-code` (clearing context between each phase)"
456
+ - "Then run `/5:implement CONFIGURE`"
457
+ 4. "After that: Run `/5:review` if you want a review of generated files"
422
458
 
423
459
  ## Related Documentation
424
460
  - [configure-docs-index skill](../../skills/configure-docs-index/SKILL.md)
@@ -1,53 +1,45 @@
1
1
  ---
2
2
  name: 5:discuss-feature
3
- description: Discusses and refines an existing feature specification through iterative Q&A. Use after /plan-feature when requirements need clarification or changes. Updates the feature spec based on discussion.
3
+ description: Discusses and refines an existing unified plan through iterative Q&A. Use after /5:plan when requirements need clarification or changes. Updates the unified plan based on discussion.
4
4
  allowed-tools: Read, Write, Glob, Grep, Agent, AskUserQuestion
5
5
  user-invocable: true
6
- model: opus
7
6
  context: inherit
8
7
  ---
9
8
 
10
9
  <role>
11
- You are a Feature Discussion Facilitator. You refine existing feature specifications through Q&A.
12
- You do NOT create new feature specs, create implementation plans, write code, or start implementation.
13
- You read an existing feature.md, discuss it with the user, and update only the changed sections.
14
- After updating the spec and informing the user, you are DONE.
10
+ You are a Feature Discussion Facilitator. You refine existing unified plans through Q&A.
11
+ You do NOT create new unified plans, create implementation plans, write code, or start implementation.
12
+ You read an existing plan.md, discuss it with the user, and update only the changed sections.
13
+ After updating the plan and informing the user, you are DONE.
15
14
  </role>
16
15
 
17
- # Discuss Feature Specification (Phase 1 - Optional Iteration)
16
+ # Discuss Feature Plan (Optional Iteration)
18
17
 
19
18
  ## Overview
20
19
 
21
- This skill is part of **Phase 1** (Feature Planning) of the 5-phase workflow:
22
- 1. **Feature Planning** - Initial requirements gathering (`/plan-feature`), then optional iteration (`/discuss-feature`)
23
- 2. **Implementation Planning** - Map to technical components
24
- 3. **Orchestrated Implementation** - Execute with state tracking
25
- 4. **Verify Implementation** - Check completeness and correctness
26
- 5. **Code Review** - Apply automated quality improvements
20
+ This helper refines the unified `plan.md` created by `/5:plan`.
27
21
 
28
- This skill enables **optional iterative refinement** of feature specs after initial planning through discussion, clarification, and requirement changes. Use it when the initial spec needs adjustments before proceeding to implementation planning.
22
+ Use it when requirements, scope, acceptance criteria, decisions, or the component checklist need adjustment before `/5:implement`.
29
23
 
30
24
  ## ⚠️ CRITICAL SCOPE CONSTRAINT
31
25
 
32
- **THIS COMMAND ONLY UPDATES FEATURE SPECIFICATIONS. IT DOES NOT PLAN OR IMPLEMENT.**
26
+ **THIS COMMAND ONLY UPDATES THE UNIFIED PLAN. IT DOES NOT IMPLEMENT.**
33
27
 
34
28
  Your job in this command:
35
- ✅ Read existing feature specification
29
+ ✅ Read existing unified plan
36
30
  ✅ Ask what user wants to discuss
37
31
  ✅ Explore codebase if needed for context
38
32
  ✅ Ask clarifying questions
39
- ✅ Update feature specification
40
- ✅ Tell user to run /5:plan-implementation
33
+ ✅ Update unified plan
34
+ ✅ Tell user to run /5:implement
41
35
 
42
36
  Your job is NOT:
43
- ❌ Create new feature specs (use /5:plan-feature)
44
- ❌ Create implementation plans
45
- ❌ Map to technical components
37
+ ❌ Create new unified plans (use /5:plan)
46
38
  ❌ Start implementation
47
39
  ❌ Write any code
48
- ❌ Rewrite entire feature spec (only update changed sections)
40
+ ❌ Rewrite entire unified plan (only update changed sections)
49
41
 
50
- **After updating the feature spec and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
42
+ **After updating the unified plan and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
51
43
 
52
44
  ## Use Cases
53
45
 
@@ -63,36 +55,38 @@ Use this skill when:
63
55
  ## Prerequisites
64
56
 
65
57
  Before invoking this skill, ensure:
66
- 1. Feature spec exists at `.5/features/{feature-name}/feature.md`
58
+ 1. Unified plan exists at `.5/features/{feature-name}/plan.md`
67
59
  2. You have the feature name or ticket ID ready (e.g., "PROJ-1234-add-feature")
68
60
 
69
61
  ## Discussion Process
70
62
 
71
63
  ### Step 1: Extract Feature Name
72
64
 
73
- If user provides only ticket ID (e.g., "PROJ-1234"), find the feature file:
74
- - Use Glob: `.5/features/{TICKET-ID}-*/feature.md` (pattern from config)
65
+ If user provides only ticket ID (e.g., "PROJ-1234"), find the plan file:
66
+ - Use Glob: `.5/features/{TICKET-ID}-*/plan.md` (pattern from config)
75
67
  - Match the ticket ID
76
68
  - If multiple matches, ask user to specify
77
- - If no match found, inform user and suggest running `/plan-feature` first
69
+ - If no match found, inform user and suggest running `/5:plan` first
78
70
 
79
71
  If user provides full feature name (e.g., "PROJ-1234-add-feature"), use directly.
80
72
 
81
- ### Step 2: Read Feature Specification
73
+ ### Step 2: Read Plan
82
74
 
83
- Read the feature spec from `.5/features/{feature-name}/feature.md`.
75
+ Read the unified plan from `.5/features/{feature-name}/plan.md`.
84
76
 
85
77
  Extract current state:
86
78
  - Ticket ID
87
- - Summary
88
- - Requirements (functional and non-functional)
79
+ - Overview
80
+ - What Changes
81
+ - Existing Patterns to Follow
89
82
  - Constraints
90
- - Affected domains
91
- - Entity definitions
92
- - Business rules
93
- - Acceptance criteria
94
- - Alternatives considered
95
- - Decisions (with [DECIDED]/[FLEXIBLE]/[DEFERRED] labels)
83
+ - Scope
84
+ - Acceptance Criteria
85
+ - Decisions ([DECIDED]/[FLEXIBLE]/[DEFERRED])
86
+ - Module Impact
87
+ - Component Checklist
88
+ - Technical Notes
89
+ - Alternatives Considered
96
90
 
97
91
  ### Step 3: Initial Discussion Prompt
98
92
 
@@ -135,7 +129,7 @@ Use Agent tool with subagent_type=Explore for complex exploration.
135
129
 
136
130
  Based on the discussion topic, ask targeted follow-up questions using AskUserQuestion.
137
131
 
138
- Ask targeted follow-up questions informed by the feature spec and any codebase exploration. Focus on: requirements clarity, scope boundaries, edge cases, technical constraints, and acceptance criteria. Challenge assumptions constructively — suggest simpler alternatives when appropriate.
132
+ Ask targeted follow-up questions informed by the unified plan and any codebase exploration. Focus on: requirements clarity, scope boundaries, edge cases, technical constraints, and acceptance criteria. Challenge assumptions constructively — suggest simpler alternatives when appropriate.
139
133
 
140
134
  ### Step 6: Iterative Refinement
141
135
 
@@ -145,26 +139,24 @@ After each round of Q&A:
145
139
  3. Provide options:
146
140
  - "Yes, discuss another aspect"
147
141
  - "Yes, continue this topic"
148
- - "No, update the spec"
142
+ - "No, update the plan"
149
143
 
150
144
  Allow multiple rounds of discussion until user is satisfied.
151
145
 
152
- ### Step 7: Update Feature Specification
146
+ ### Step 7: Update Plan
153
147
 
154
- When user indicates they're done discussing, update `.5/features/{feature-name}/feature.md`:
148
+ When user indicates they're done discussing, update `.5/features/{feature-name}/plan.md`:
155
149
 
156
150
  **Update these sections based on discussion:**
157
151
 
158
- 1. **Summary** - If core understanding changed
159
- 2. **Problem Statement** - If motivation clarified
160
- 3. **Requirements** - Add/modify/remove based on discussion
161
- 4. **Constraints** - Add new constraints discovered
162
- 5. **Affected Domains** - If scope changed
163
- 6. **Entity/Component Definitions** - If data model changed
164
- 7. **Business Rules** - If logic clarified
165
- 8. **Acceptance Criteria** - Add/refine verification criteria
166
- 9. **Alternatives Considered** - Document discussed alternatives
167
- 10. **Decisions** - Append new decisions from this session, tagged [DECIDED], [FLEXIBLE], or [DEFERRED] using Context/Decision format
152
+ 1. **Overview** - If core understanding changed
153
+ 2. **What Changes** - Add/modify/remove behavior
154
+ 3. **Constraints** - Add new constraints discovered
155
+ 4. **Scope** - If boundaries changed
156
+ 5. **Acceptance Criteria** - Add/refine verification criteria
157
+ 6. **Decisions** - Append new decisions tagged [DECIDED], [FLEXIBLE], or [DEFERRED]
158
+ 7. **Component Checklist** - Adjust components only when scope or requirements changed
159
+ 8. **Technical Notes / Alternatives Considered** - Document useful context from discussion
168
160
 
169
161
  **Preserve existing content** - Only update sections that changed during discussion.
170
162
 
@@ -184,16 +176,14 @@ When user indicates they're done discussing, update `.5/features/{feature-name}/
184
176
 
185
177
  ### Step 8: Inform Developer
186
178
 
187
- After updating the spec, tell the developer:
179
+ After updating the plan, tell the developer:
188
180
 
189
- 1. "Feature specification updated at `.5/features/{feature-name}/feature.md`"
181
+ 1. "Plan updated at `.5/features/{feature-name}/plan.md`"
190
182
  2. Summarize key changes:
191
183
  - "Added: {X}"
192
184
  - "Modified: {Y}"
193
185
  - "Removed: {Z}"
194
186
  3. Ask: "Would you like to:"
195
187
  - "Discuss more (run /5:discuss-feature again)"
196
- - "Proceed to implementation planning (run `/clear` followed by `/5:plan-implementation {feature-name}`)"
197
- - "Review the updated spec first"
198
-
199
-
188
+ - "Proceed to implementation (run `/clear` followed by `/5:implement {feature-name}`)"
189
+ - "Review the updated plan first"
@@ -3,6 +3,7 @@ name: 5:eject
3
3
  description: Eject from the update mechanism — permanently removes update infrastructure
4
4
  allowed-tools: Bash, Read, Edit, AskUserQuestion
5
5
  user-invocable: true
6
+ context: inherit
6
7
  ---
7
8
 
8
9
  <role>
@@ -26,11 +27,11 @@ Ejecting permanently removes the update system from this installation. After eje
26
27
 
27
28
  All other workflow files (commands, skills, hooks, templates) remain untouched.
28
29
 
29
- **This is irreversible.** To restore update functionality, reinstall with `npx 5-phase-workflow`.
30
+ **This is irreversible.** To restore update functionality, reinstall with `npx foifi`.
30
31
 
31
32
  ## Step 1: Check Current State
32
33
 
33
- Read `.5/version.json`. If it doesn't exist, tell the user: "No 5-Phase Workflow installation found (or already ejected)." and stop.
34
+ Read `.5/version.json`. If it doesn't exist, tell the user: "No dev-workflow installation found (or already ejected)." and stop.
34
35
 
35
36
  Note the `packageVersion` for the confirmation message.
36
37
 
@@ -38,7 +39,7 @@ Note the `packageVersion` for the confirmation message.
38
39
 
39
40
  Tell the user what ejecting means:
40
41
 
41
- > **Eject from 5-Phase Workflow updates?**
42
+ > **Eject from dev-workflow updates?**
42
43
  >
43
44
  > This will permanently delete:
44
45
  > - `.5/version.json` (version tracking)
@@ -55,7 +56,7 @@ Tell the user what ejecting means:
55
56
  > - `.codex/skills/5-eject/` (this skill)
56
57
  > - `.codex/instructions.md` is removed only if it is workflow-managed and no longer needed for remaining installed workflow files
57
58
  >
58
- > All other workflow files remain untouched. To restore updates later, reinstall with `npx 5-phase-workflow`.
59
+ > All other workflow files remain untouched. To restore updates later, reinstall with `npx foifi`.
59
60
 
60
61
  Ask: "Proceed with eject?"
61
62
 
@@ -105,6 +106,6 @@ Tell the user:
105
106
 
106
107
  > Ejected successfully. Update infrastructure has been removed from this installation (was v{packageVersion}).
107
108
  >
108
- > To restore update functionality, reinstall with: `npx 5-phase-workflow`
109
+ > To restore update functionality, reinstall with: `npx foifi`
109
110
  >
110
- > If this was a Codex install, use: `npx 5-phase-workflow --codex`
111
+ > If this was a Codex install, use: `npx foifi --codex`