5-phase-workflow 3.0.0 → 3.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.
- package/README.md +31 -101
- package/bin/install.js +168 -176
- package/bin/sync-agents.js +59 -54
- package/docs/workflow-guide.md +35 -79
- package/package.json +2 -2
- package/src/agents/step-executor-agent.md +5 -4
- package/src/agents/step-orchestrator-agent.md +12 -12
- package/src/agents/verification-agent.md +7 -8
- package/src/codex-commands/plan.md +65 -0
- package/src/commands/5/address-review-findings.md +43 -52
- package/src/commands/5/analyze-feature.md +1 -1
- package/src/commands/5/configure.md +75 -179
- package/src/commands/5/eject.md +0 -1
- package/src/commands/5/implement.md +78 -68
- package/src/commands/5/lean-check.md +75 -0
- package/src/commands/5/reconfigure.md +48 -129
- package/src/commands/5/review.md +42 -14
- package/src/commands/5/synchronize-agents.md +1 -1
- package/src/commands/5/update.md +2 -2
- package/src/hooks/dependency-guard.js +150 -0
- package/src/hooks/statusline.js +5 -3
- package/src/references/configure-tables.md +0 -33
- package/src/settings.json +3 -4
- package/src/skills/baseline-conventions/SKILL.md +37 -0
- package/src/skills/cognitive-load/SKILL.md +52 -0
- package/src/skills/configure-agents-md/SKILL.md +72 -0
- package/src/skills/configure-rules/SKILL.md +146 -0
- package/src/skills/documentation-style/SKILL.md +32 -0
- package/src/skills/fowler-code-smells/SKILL.md +25 -0
- package/src/skills/review-style/SKILL.md +142 -0
- package/src/templates/AGENTS.md +31 -31
- package/src/templates/workflow/REVIEW-FINDINGS.md +2 -9
- package/src/workflows/5-implement.js +67 -92
- package/docs/findings.md +0 -361
- package/docs/progress.md +0 -102
- package/src/commands/5/apply-review-findings.md +0 -66
- package/src/commands/5/commit.md +0 -43
- package/src/commands/5/plan.md +0 -189
- package/src/commands/5/reply-pr-comments.md +0 -48
- package/src/commands/5/split.md +0 -86
- package/src/commands/5/triage-pr-comments.md +0 -70
- package/src/hooks/config-guard.js +0 -30
- package/src/skills/configure-docs-index/SKILL.md +0 -243
- package/src/skills/configure-skills/SKILL.md +0 -311
- package/src/skills/generate-readme/EXAMPLES.md +0 -168
- package/src/skills/generate-readme/SKILL.md +0 -122
- package/src/skills/generate-readme/TEMPLATE.md +0 -141
- package/src/skills/use-index/SKILL.md +0 -49
- package/src/templates/ARCHITECTURE.md +0 -33
- package/src/templates/CONCERNS.md +0 -33
- package/src/templates/CONVENTIONS.md +0 -74
- package/src/templates/TESTING.md +0 -24
- package/src/templates/workflow/FIX-PLAN.md +0 -55
- package/src/templates/workflow/PLAN-COMPACT.md +0 -42
- package/src/templates/workflow/PLAN.md +0 -76
- package/src/templates/workflow/REVIEW-SUMMARY.md +0 -53
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 5:plan
|
|
3
|
+
description: Plans a feature without native plan mode — explores, discusses, and writes one approved plan to .5/planning/, then hands it to /5:implement. Re-run with an existing feature name or plan path to refine that plan. Codex only; Claude Code plans in native plan mode under the Planning rules in AGENTS.md.
|
|
4
|
+
allowed-tools: Bash, Read, Write, Glob, Grep, Agent, AskUserQuestion
|
|
5
|
+
user-invocable: true
|
|
6
|
+
argument-hint: [feature-name-or-plan-path-or-ticket-id-or-description]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<role>
|
|
10
|
+
You are a Workflow Planner. Your deliverable is one plan file in `.5/planning/`, written only after the user approves it.
|
|
11
|
+
Until then you write no files, write no source code, and spawn no implementation agents.
|
|
12
|
+
</role>
|
|
13
|
+
|
|
14
|
+
# Plan
|
|
15
|
+
|
|
16
|
+
The "Planning" section of `AGENTS.md` applies to every plan. This command adds the planning loop that Claude Code gets from native plan mode.
|
|
17
|
+
|
|
18
|
+
## Step 1: Resolve Feature and Description
|
|
19
|
+
|
|
20
|
+
**Refine mode.** The argument names an existing plan when it is a path to a plan file, when `.5/planning/{argument}.md` exists, or when a file in `.5/planning/` has `feature: {argument}` in its frontmatter. A ticket prefix matches `feature: {prefix}*`. Read that plan; you are refining it. If several plans match, ask which one.
|
|
21
|
+
|
|
22
|
+
**New plan.** Otherwise:
|
|
23
|
+
|
|
24
|
+
1. When the argument or request names a ticket, validate the ID (GitHub: digits only, `^[0-9]+$`; Jira: `^[A-Z][A-Z0-9]+-[0-9]+$`), then fetch it — Jira through its MCP tool with the key as a typed parameter, GitHub with `gh issue view "$id" --json title,body`. If validation or fetching fails, report the reason and continue without fetched content. Show the fetched content to the user and ask whether any context is missing.
|
|
25
|
+
2. Otherwise, ask the user for the feature description.
|
|
26
|
+
3. Determine a short kebab-case feature name. With a known ticket ID, use `{ticket-id}-{feature-name}`. Sanitize to alphanumeric, dash, and underscore only.
|
|
27
|
+
|
|
28
|
+
## Step 2: Explore
|
|
29
|
+
|
|
30
|
+
Spawn one Explore agent:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Analyze the codebase for a workflow plan.
|
|
34
|
+
|
|
35
|
+
Feature description:
|
|
36
|
+
{feature description}
|
|
37
|
+
|
|
38
|
+
Tasks:
|
|
39
|
+
1. Identify relevant modules, existing patterns, and likely target files.
|
|
40
|
+
2. Find at most 3 similar implementations and reusable helpers.
|
|
41
|
+
3. Identify test framework, test file conventions, and the narrowest relevant build/test commands.
|
|
42
|
+
4. Find the repository's own standards — the files `.claude/skills/review-style/SKILL.md` step 2 lists — and what they require for this change.
|
|
43
|
+
5. Identify constraints, risks, and places where the user needs to decide.
|
|
44
|
+
|
|
45
|
+
Report:
|
|
46
|
+
- Relevant existing patterns: path + symbol or line range + one-line reason
|
|
47
|
+
- Similar implementations: max 3 paths + one-line reason
|
|
48
|
+
- Likely target paths
|
|
49
|
+
- Test/build setup: commands only, with scope
|
|
50
|
+
- Repository standards: path + what it requires here
|
|
51
|
+
- Risks or unknowns
|
|
52
|
+
|
|
53
|
+
READ-ONLY. Use only Read, Glob, and Grep.
|
|
54
|
+
Keep the report under 40 lines. Do not include generic project structure, dependency lists, or long file summaries unless directly needed for this feature.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Step 3: Discuss and Draft
|
|
58
|
+
|
|
59
|
+
Discuss with the user until you understand the problem, the expected outcome, and what is in and out of scope. Ask only useful questions — prefer proposing a concrete understanding and letting the user correct it. In refine mode, start from the existing plan and change only what the discussion changes.
|
|
60
|
+
|
|
61
|
+
Draft the plan as the "Planning" section of `AGENTS.md` asks; shape it as the change needs.
|
|
62
|
+
|
|
63
|
+
## Step 4: Approve and Hand Off
|
|
64
|
+
|
|
65
|
+
Show the plan and get explicit approval. Then write it to `.5/planning/{name}.md`; in refine mode, overwrite the plan you refined. Then run `/5:implement {name}`.
|
|
@@ -1,68 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 5:address-review-findings
|
|
3
|
-
description:
|
|
4
|
-
allowed-tools: Bash, Read, Write, Glob, AskUserQuestion
|
|
3
|
+
description: Fixes clear review findings on its own, asks the user one question at a time only for real decisions, then verifies the result. --interactive asks about every finding.
|
|
4
|
+
allowed-tools: Bash, Read, Edit, Write, Glob, AskUserQuestion, Agent
|
|
5
|
+
argument-hint: [feature-name] [--interactive] [dirty: {paths}]
|
|
5
6
|
user-invocable: true
|
|
6
|
-
model:
|
|
7
|
+
model: sonnet
|
|
7
8
|
context: inherit
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
<role>
|
|
11
|
-
You are a Review Fix Coordinator. You
|
|
12
|
+
You are a Review Fix Coordinator. You fix what is clear, ask the user only what they must decide, and do not review code or implement unrelated changes.
|
|
12
13
|
</role>
|
|
13
14
|
|
|
14
15
|
# Address Review Findings
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
`/5:review` runs this after every review. For comments on a GitHub PR, ask Claude directly; this command handles the findings file only.
|
|
17
18
|
|
|
18
19
|
## Options
|
|
19
20
|
|
|
20
|
-
- `--
|
|
21
|
+
- `--interactive` — ask about every finding, one at a time, instead of deciding the clear ones yourself.
|
|
22
|
+
- `dirty: {paths}` — files that held the user's own uncommitted work before the run (`/5:implement` passes this). A finding in one of them may sit in that earlier work, so it is always **ask**, never fixed on your own.
|
|
21
23
|
|
|
22
24
|
## Process
|
|
23
25
|
|
|
24
26
|
1. Determine feature context:
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- If none
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- Find the latest `.5/features/{feature}/review-findings-*.md`.
|
|
31
|
-
- If missing, ask whether to stop or continue with GitHub PR comments only.
|
|
27
|
+
- Use the feature name argument when given.
|
|
28
|
+
- Otherwise use the feature of the most recently modified plan in `.5/planning/`: its `feature` frontmatter field, or its file name without `.md`.
|
|
29
|
+
- If there is none, ask for the feature name.
|
|
30
|
+
2. Decide:
|
|
31
|
+
- Find the latest `.5/features/{feature}/review-findings-*.md`. If missing, tell the user to run `/5:review` and stop.
|
|
32
32
|
- Parse each finding into compact records with `id`, `file`, `line`, `category`, `severity`, `description`, `suggestedFix`, and `originalReviewerMessage`.
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- Treat textual instructions as `fix` with `customInstructions` unless the text clearly says to defer or reject the finding.
|
|
33
|
+
- Sort each finding into one group:
|
|
34
|
+
- **fix** — a confirmed bug, security issue, breach of a repository standard, or style finding with a clear, local fix that changes no behavior beyond the finding.
|
|
35
|
+
- **wont_fix** — obsolete, a duplicate, outside the feature scope, or based on an incorrect premise.
|
|
36
|
+
- **ask** — uncertain (`Question` category), spanning several files, or needing a design, product, or API decision; also any fix whose suggested change you cannot apply with confidence.
|
|
37
|
+
- Record `fix` and `wont_fix` yourself, each with a one-line reason.
|
|
38
|
+
- For each **ask** finding, ask the user — **one finding per question, one question at a time**. Show `Decision {current}/{total}`, file and line, a concise description, the suggested fix, and your recommendation. Options: `fix`, `wont_fix`, `wait`, or textual instructions. Treat textual instructions as `fix` with `customInstructions` unless the text clearly says to defer or reject the finding.
|
|
39
|
+
- With `--interactive`, ask about every finding this way instead.
|
|
41
40
|
- Write decisions to `.5/features/{feature}/review-decisions-{YYYYMMDD-HHmmss}.json`.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- Do not claim the review findings are fully addressed unless every discovered post-fix verification command passes or is explicitly skipped because no command exists.
|
|
58
|
-
- Store compact results for each category in the summary: command, status (`passed`, `failed`, or `skipped`), and a one-line reason.
|
|
59
|
-
5. Write `.5/features/{feature}/review-summary-{YYYYMMDD-HHmmss}.md` using `.claude/templates/workflow/REVIEW-SUMMARY.md`.
|
|
60
|
-
|
|
61
|
-
Keep all intermediate summaries compact. Do not paste raw diffs, raw PR JSON, or command logs unless a failure needs exact evidence.
|
|
62
|
-
|
|
63
|
-
## Local Decision Format
|
|
64
|
-
|
|
65
|
-
Write JSON with this shape:
|
|
41
|
+
3. Apply the fixes:
|
|
42
|
+
- Take every decision with `fix`. Use `customInstructions` when present; otherwise `suggestedFix`.
|
|
43
|
+
- Group fixes by file. Read each file before editing it.
|
|
44
|
+
- 1-3 simple fixes in a file: edit directly, highest line number first.
|
|
45
|
+
- 4+ fixes or complex logic in a file: spawn one focused agent with only the file path and its numbered fix list. It reads the file first, applies the fixes from highest line to lowest, introduces no unrelated changes, and reports each item as `APPLIED` or `FAILED`.
|
|
46
|
+
- Track each finding as `APPLIED`, `FAILED`, or `SKIPPED` (`wont_fix` and `wait`).
|
|
47
|
+
4. Run post-fix verification. This is mandatory after any fix is applied.
|
|
48
|
+
- Identify the commands from `.5/config.json` and, only as needed, the project manifests (`package.json`, `Makefile`, `pyproject.toml`, `Cargo.toml`, Gradle files).
|
|
49
|
+
- Run every available command in these categories: `build`, `test`, `e2e`/`test:e2e`, and `lint`. Skip a category only when no command exists or it is configured as `none`; record the reason.
|
|
50
|
+
- If a command fails, still run the remaining independent categories.
|
|
51
|
+
- Do not claim the findings are addressed unless every discovered command passes or is skipped because no command exists.
|
|
52
|
+
|
|
53
|
+
Keep all intermediate summaries compact. Do not paste raw diffs or command logs unless a failure needs exact evidence.
|
|
54
|
+
|
|
55
|
+
## Decision Format
|
|
66
56
|
|
|
67
57
|
```json
|
|
68
58
|
{
|
|
@@ -74,7 +64,8 @@ Write JSON with this shape:
|
|
|
74
64
|
"file": "path/to/file.ts",
|
|
75
65
|
"line": 123,
|
|
76
66
|
"decision": "fix",
|
|
77
|
-
"
|
|
67
|
+
"decidedBy": "claude",
|
|
68
|
+
"reason": "Confirmed off-by-one; local fix",
|
|
78
69
|
"description": "Concise issue summary",
|
|
79
70
|
"suggestedFix": "Concrete fix to apply",
|
|
80
71
|
"customInstructions": ""
|
|
@@ -83,7 +74,7 @@ Write JSON with this shape:
|
|
|
83
74
|
}
|
|
84
75
|
```
|
|
85
76
|
|
|
86
|
-
Allowed `decision` values are `fix`, `wont_fix`, and `wait`.
|
|
77
|
+
Allowed `decision` values are `fix`, `wont_fix`, and `wait`. `decidedBy` is `claude` or `user`.
|
|
87
78
|
|
|
88
79
|
## Completion
|
|
89
80
|
|
|
@@ -92,13 +83,13 @@ Output:
|
|
|
92
83
|
```text
|
|
93
84
|
Review findings addressed: {yes/no}
|
|
94
85
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
Fixed on my own: {N} — {one line per finding: id, file, what changed}
|
|
87
|
+
Decided by you: {N} ({fixed} fixed, {deferred} deferred)
|
|
88
|
+
Skipped: {N} — {one line per finding: id, reason}
|
|
89
|
+
Failed: {N}
|
|
99
90
|
Build: {passed/failed/skipped}
|
|
100
91
|
Tests: {passed/failed/skipped}
|
|
101
92
|
E2E: {passed/failed/skipped}
|
|
102
93
|
Lint: {passed/failed/skipped}
|
|
103
|
-
|
|
94
|
+
Decisions saved at .5/features/{feature}/review-decisions-{timestamp}.json
|
|
104
95
|
```
|
|
@@ -30,7 +30,7 @@ Do NOT proceed until you have a clear understanding of what to analyze.
|
|
|
30
30
|
|
|
31
31
|
1. Derive a short kebab-case name from the analysis subject (e.g., `user-auth`, `order-processing`, `payment-integration`). This becomes the filename: `{name}-analysis.md`.
|
|
32
32
|
|
|
33
|
-
2. Identify the relevant modules and layers to analyze.
|
|
33
|
+
2. Identify the relevant modules and layers to analyze.
|
|
34
34
|
|
|
35
35
|
3. Use Glob and Grep to locate the relevant source files. Search for key classes, interfaces, functions, and types related to the analysis subject.
|
|
36
36
|
|