5-phase-workflow 1.9.5 → 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.
- package/README.md +68 -420
- package/bin/install.js +294 -64
- package/bin/sync-agents.js +50 -11
- package/docs/findings.md +3 -3
- package/docs/workflow-guide.md +110 -1046
- package/package.json +6 -5
- package/src/agents/step-executor-agent.md +49 -0
- package/src/agents/step-orchestrator-agent.md +111 -0
- package/src/agents/verification-agent.md +78 -0
- package/src/commands/5/address-review-findings.md +69 -403
- package/src/commands/5/apply-review-findings.md +66 -0
- package/src/commands/5/configure.md +110 -76
- package/src/commands/5/discuss-feature.md +47 -57
- package/src/commands/5/eject.md +7 -6
- package/src/commands/5/implement.md +202 -0
- package/src/commands/5/plan.md +164 -0
- package/src/commands/5/reconfigure.md +30 -29
- package/src/commands/5/reply-pr-comments.md +46 -0
- package/src/commands/5/review.md +95 -0
- package/src/commands/5/split.md +190 -0
- package/src/commands/5/synchronize-agents.md +4 -4
- package/src/commands/5/triage-pr-comments.md +70 -0
- package/src/commands/5/update.md +8 -8
- package/src/hooks/check-updates.js +50 -7
- package/src/hooks/plan-guard.js +28 -22
- package/src/hooks/statusline.js +50 -4
- package/src/skills/configure-docs-index/SKILL.md +16 -20
- package/src/skills/configure-skills/SKILL.md +12 -12
- package/src/templates/AGENTS.md +94 -0
- package/src/templates/workflow/FIX-PLAN.md +1 -1
- package/src/templates/workflow/PLAN-COMPACT.md +42 -0
- package/src/templates/workflow/PLAN.md +58 -34
- package/src/templates/workflow/REVIEW-FINDINGS.md +7 -16
- package/src/templates/workflow/REVIEW-SUMMARY.md +5 -0
- package/src/templates/workflow/STATE.json +32 -3
- package/src/agents/component-executor.md +0 -57
- package/src/commands/5/implement-feature.md +0 -381
- package/src/commands/5/plan-feature.md +0 -293
- package/src/commands/5/plan-implementation.md +0 -333
- package/src/commands/5/quick-implement.md +0 -375
- package/src/commands/5/review-code.md +0 -212
- package/src/commands/5/verify-implementation.md +0 -277
- package/src/templates/workflow/FEATURE-SPEC.md +0 -100
- package/src/templates/workflow/VERIFICATION-REPORT.md +0 -103
|
@@ -1,55 +1,51 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 5:configure
|
|
3
|
-
description: Configures the project. Analyzes project, gathers preferences, writes config.json, and creates
|
|
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
|
|
12
|
-
You do NOT generate AGENTS.md, CLAUDE.md, documentation files, or skills directly — those are
|
|
13
|
-
You write ONLY to: .5/config.json, .5/version.json, .5/features/CONFIGURE/
|
|
14
|
-
After writing config.json and the
|
|
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 (
|
|
15
|
+
# Configure (Project Setup Plan)
|
|
18
16
|
|
|
19
17
|
Current commit: !`git rev-parse --short HEAD 2>/dev/null || echo "none"`
|
|
20
18
|
|
|
21
19
|
## Overview
|
|
22
20
|
|
|
23
|
-
This command
|
|
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`.
|
|
24
22
|
|
|
25
23
|
After running this command, proceed through the standard phases:
|
|
26
|
-
1. **`/5:configure`** (this command) -
|
|
27
|
-
2. `/5:
|
|
28
|
-
3. `/5:
|
|
29
|
-
4. `/5:verify-implementation` - Verify configuration
|
|
30
|
-
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
|
|
31
27
|
|
|
32
28
|
## ⚠️ CRITICAL SCOPE CONSTRAINT
|
|
33
29
|
|
|
34
|
-
**THIS COMMAND WRITES config.json AND CREATES THE
|
|
30
|
+
**THIS COMMAND WRITES config.json AND CREATES THE CONFIGURE PLAN. NOTHING ELSE.**
|
|
35
31
|
|
|
36
32
|
Your job in this command:
|
|
37
33
|
✅ Analyze project (detect type, build commands, etc.)
|
|
38
34
|
✅ Gather user preferences via questions
|
|
39
35
|
✅ Write `.5/config.json` directly
|
|
40
|
-
✅ Create
|
|
41
|
-
✅ Tell user to run /5:
|
|
36
|
+
✅ Create unified plan at `.5/features/CONFIGURE/plan.md` for remaining work
|
|
37
|
+
✅ Tell user to run /5:implement CONFIGURE
|
|
42
38
|
|
|
43
39
|
Your job is NOT:
|
|
44
|
-
❌ Create AGENTS.md or CLAUDE.md directly (
|
|
45
|
-
❌ Generate documentation files directly (
|
|
46
|
-
❌ Generate skills directly (
|
|
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)
|
|
47
43
|
❌ Skip user interaction
|
|
48
44
|
❌ Assume project structure
|
|
49
45
|
|
|
50
|
-
**After writing config.json, creating the
|
|
46
|
+
**After writing config.json, creating the unified plan, and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
|
|
51
47
|
|
|
52
|
-
**If you find yourself creating AGENTS.md, CLAUDE.md, documentation files, or skills, STOP IMMEDIATELY. You should only be writing config.json and the
|
|
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.**
|
|
53
49
|
|
|
54
50
|
## Configuration Process
|
|
55
51
|
|
|
@@ -96,7 +92,7 @@ fi
|
|
|
96
92
|
|
|
97
93
|
**1e. Check AGENTS.md / CLAUDE.md:**
|
|
98
94
|
- If `AGENTS.md` exists, read its content
|
|
99
|
-
- 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
|
|
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
|
|
100
96
|
|
|
101
97
|
**1f. Scan existing skills:**
|
|
102
98
|
- Check `.claude/skills/` for existing project-specific skills
|
|
@@ -261,7 +257,7 @@ If no patterns/commands detected:
|
|
|
261
257
|
- Allow manual entry of pattern names/locations or command names
|
|
262
258
|
|
|
263
259
|
**2m. Git-ignore `.5/features/` folder:**
|
|
264
|
-
- "The `.5/features/` folder will contain
|
|
260
|
+
- "The `.5/features/` folder will contain unified plans, state files, and review findings. Would you like to add it to `.gitignore`?"
|
|
265
261
|
- Options:
|
|
266
262
|
1. "Yes, add to .gitignore (recommended)" — workflow artifacts stay local, not tracked in version control
|
|
267
263
|
2. "No, track in git" — useful if you want to share specs and plans with your team
|
|
@@ -302,20 +298,89 @@ Ensure `.5/.reconfig-reminder` is gitignored (it's a transient runtime flag that
|
|
|
302
298
|
1. Check if `.gitignore` exists in the project root — create it if not
|
|
303
299
|
2. Check if `.5/.reconfig-reminder` is already listed — if not, append `.5/.reconfig-reminder` on a new line
|
|
304
300
|
|
|
305
|
-
### Step 3: Create
|
|
301
|
+
### Step 3: Create Configuration Plan
|
|
306
302
|
|
|
307
|
-
Write `.5/features/CONFIGURE/
|
|
303
|
+
Write `.5/features/CONFIGURE/plan.md` containing all gathered data:
|
|
308
304
|
|
|
309
305
|
```markdown
|
|
310
|
-
|
|
306
|
+
---
|
|
307
|
+
ticket: CONFIGURE
|
|
308
|
+
feature: CONFIGURE
|
|
309
|
+
created: {ISO-timestamp}
|
|
310
|
+
---
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
# Plan: CONFIGURE - Project Configuration
|
|
313
|
+
|
|
314
|
+
## Overview
|
|
313
315
|
Generates AGENTS.md, CLAUDE.md shim, a rebuildable codebase index, and project-specific skills. (config.json already written.)
|
|
314
316
|
|
|
315
|
-
##
|
|
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.
|
|
343
|
+
|
|
344
|
+
### Out
|
|
316
345
|
|
|
317
|
-
|
|
318
|
-
|
|
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
|
|
319
384
|
|
|
320
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):
|
|
321
386
|
|
|
@@ -332,24 +397,13 @@ Analyze the codebase and generate focused documentation capturing only non-deriv
|
|
|
332
397
|
- Re-running the script should fully refresh the index in place
|
|
333
398
|
|
|
334
399
|
**Create AGENTS.md** (provider-agnostic instructions file):
|
|
335
|
-
-
|
|
336
|
-
-
|
|
337
|
-
-
|
|
338
|
-
-
|
|
339
|
-
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
When running `/5:` workflow commands, follow the command instructions exactly as written.
|
|
343
|
-
Do not skip steps, combine phases, or proceed to actions not specified in the current command.
|
|
344
|
-
Each phase produces a specific artifact — do not create artifacts belonging to other phases.
|
|
345
|
-
```
|
|
346
|
-
- Mandatory coding guidelines:
|
|
347
|
-
1. Types should be clear and types should be available when possible
|
|
348
|
-
2. Use doc (jsdoc, javadoc, pydoc, etc) concisely. No doc is better than meaningless doc
|
|
349
|
-
3. Keep files short and structured
|
|
350
|
-
4. Extract methods, classes
|
|
351
|
-
5. Respect SRP and DRY
|
|
352
|
-
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
|
|
353
407
|
|
|
354
408
|
**Create CLAUDE.md shim:**
|
|
355
409
|
- Contains only `@AGENTS.md` (Claude Code include syntax)
|
|
@@ -384,43 +438,23 @@ Only generate rules for patterns that were actually detected:
|
|
|
384
438
|
- `api-patterns.md` — API conventions, error handling (scoped to API/route/controller files)
|
|
385
439
|
- `dependencies.md` — dependency usage patterns, env var conventions (unconditional)
|
|
386
440
|
|
|
387
|
-
##
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
- [ ] `.5/ARCHITECTURE.md` — architecture, conventions, where to add code
|
|
391
|
-
- [ ] `.5/TESTING.md` — test patterns and gotchas
|
|
392
|
-
- [ ] `.5/CONCERNS.md` — only if concerns were found (omit if empty)
|
|
393
|
-
- [ ] `.5/index/` directory exists
|
|
394
|
-
- [ ] `.5/index/rebuild-index.sh` exists and rebuilds the index
|
|
395
|
-
- [ ] `.5/index/README.md` exists and documents the generated index files
|
|
396
|
-
- [ ] Multiple focused `.5/index/*.md` files are generated for applicable codebase concerns
|
|
397
|
-
- [ ] Empty sections omitted (no "Not detected" / "None found" placeholders)
|
|
398
|
-
- [ ] `AGENTS.md` exists with references to created `.5/` files
|
|
399
|
-
- [ ] `AGENTS.md` links to the codebase index and rebuild script
|
|
400
|
-
- [ ] `AGENTS.md` says to regenerate the index if it is older than one day
|
|
401
|
-
- [ ] `AGENTS.md` contains 6 coding guidelines
|
|
402
|
-
- [ ] `CLAUDE.md` exists and contains only `@AGENTS.md`
|
|
403
|
-
- [ ] All specified project-specific skills are generated in `.claude/skills/`
|
|
404
|
-
- [ ] Generated skills reference actual project conventions
|
|
405
|
-
- [ ] If AGENTS.md or CLAUDE.md existed before, user-written sections are preserved in AGENTS.md
|
|
406
|
-
- [ ] `.claude/rules/` directory exists with scoped rule files (if rules generation selected)
|
|
407
|
-
- [ ] Generated rules use `paths:` frontmatter for scoping where applicable
|
|
408
|
-
- [ ] Rules contain concise directives, not documentation
|
|
409
|
-
- [ ] No rules generated for undetected patterns
|
|
441
|
+
## Next Steps
|
|
442
|
+
|
|
443
|
+
1. Run `/5:implement CONFIGURE`.
|
|
410
444
|
```
|
|
411
445
|
|
|
412
|
-
**Important:** Use `mkdir -p .5/features/CONFIGURE` before writing the
|
|
446
|
+
**Important:** Use `mkdir -p .5/features/CONFIGURE` before writing the unified plan.
|
|
413
447
|
|
|
414
448
|
### Step 4: Guide User to Next Phase
|
|
415
449
|
|
|
416
450
|
Tell the user:
|
|
417
451
|
|
|
418
452
|
1. "Configuration saved to `.5/config.json`"
|
|
419
|
-
2. "Configuration
|
|
453
|
+
2. "Configuration plan written to `.5/features/CONFIGURE/plan.md`"
|
|
420
454
|
3. "Next steps:"
|
|
421
455
|
- "Run `/clear` to reset context"
|
|
422
|
-
- "Then run `/5:
|
|
423
|
-
4. "After that:
|
|
456
|
+
- "Then run `/5:implement CONFIGURE`"
|
|
457
|
+
4. "After that: Run `/5:review` if you want a review of generated files"
|
|
424
458
|
|
|
425
459
|
## Related Documentation
|
|
426
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
|
|
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
|
|
12
|
-
You do NOT create new
|
|
13
|
-
You read an existing
|
|
14
|
-
After updating the
|
|
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
|
|
16
|
+
# Discuss Feature Plan (Optional Iteration)
|
|
18
17
|
|
|
19
18
|
## Overview
|
|
20
19
|
|
|
21
|
-
This
|
|
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
|
-
|
|
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
|
|
26
|
+
**THIS COMMAND ONLY UPDATES THE UNIFIED PLAN. IT DOES NOT IMPLEMENT.**
|
|
33
27
|
|
|
34
28
|
Your job in this command:
|
|
35
|
-
✅ Read existing
|
|
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
|
|
40
|
-
✅ Tell user to run /5:
|
|
33
|
+
✅ Update unified plan
|
|
34
|
+
✅ Tell user to run /5:implement
|
|
41
35
|
|
|
42
36
|
Your job is NOT:
|
|
43
|
-
❌ Create new
|
|
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
|
|
40
|
+
❌ Rewrite entire unified plan (only update changed sections)
|
|
49
41
|
|
|
50
|
-
**After updating the
|
|
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.
|
|
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
|
|
74
|
-
- Use Glob: `.5/features/{TICKET-ID}-*/
|
|
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
|
|
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
|
|
73
|
+
### Step 2: Read Plan
|
|
82
74
|
|
|
83
|
-
Read the
|
|
75
|
+
Read the unified plan from `.5/features/{feature-name}/plan.md`.
|
|
84
76
|
|
|
85
77
|
Extract current state:
|
|
86
78
|
- Ticket ID
|
|
87
|
-
-
|
|
88
|
-
-
|
|
79
|
+
- Overview
|
|
80
|
+
- What Changes
|
|
81
|
+
- Existing Patterns to Follow
|
|
89
82
|
- Constraints
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
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
|
|
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
|
|
142
|
+
- "No, update the plan"
|
|
149
143
|
|
|
150
144
|
Allow multiple rounds of discussion until user is satisfied.
|
|
151
145
|
|
|
152
|
-
### Step 7: Update
|
|
146
|
+
### Step 7: Update Plan
|
|
153
147
|
|
|
154
|
-
When user indicates they're done discussing, update `.5/features/{feature-name}/
|
|
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. **
|
|
159
|
-
2. **
|
|
160
|
-
3. **
|
|
161
|
-
4. **
|
|
162
|
-
5. **
|
|
163
|
-
6. **
|
|
164
|
-
7. **
|
|
165
|
-
8. **
|
|
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
|
|
179
|
+
After updating the plan, tell the developer:
|
|
188
180
|
|
|
189
|
-
1. "
|
|
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
|
|
197
|
-
- "Review the updated
|
|
198
|
-
|
|
199
|
-
|
|
188
|
+
- "Proceed to implementation (run `/clear` followed by `/5:implement {feature-name}`)"
|
|
189
|
+
- "Review the updated plan first"
|
package/src/commands/5/eject.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
109
|
+
> To restore update functionality, reinstall with: `npx foifi`
|
|
109
110
|
>
|
|
110
|
-
> If this was a Codex install, use: `npx
|
|
111
|
+
> If this was a Codex install, use: `npx foifi --codex`
|