5-phase-workflow 1.9.5 → 2.0.1
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 +81 -410
- package/bin/install.js +385 -70
- 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 +32 -31
- 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 +55 -4
- package/src/skills/configure-docs-index/SKILL.md +16 -21
- package/src/skills/configure-skills/SKILL.md +21 -24
- 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
package/README.md
CHANGED
|
@@ -1,466 +1,137 @@
|
|
|
1
|
-
#
|
|
1
|
+
# foifi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**foifi** is an opinionated AI development workflow layer that sits on top of Claude Code and Codex. It handles project setup, structured feature implementation, and code review — so you spend less time managing the AI and more time shipping.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### What it does
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
**Project setup** — The `/5:configure` command detects your stack, generates a `CLAUDE.md` / `AGENTS.md` tailored to your project, writes a `.5/index/` knowledge base, and installs project-specific skills and rules. This gives every AI session the right context from the start rather than letting the model guess.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
2. **Implementation Planning** - Map requirements to technical components
|
|
11
|
-
3. **Orchestrated Implementation** - Execute with state tracking and parallel processing
|
|
12
|
-
4. **Verify Implementation** - Automated verification of completeness and correctness
|
|
13
|
-
5. **Code Review** - AI-powered review, findings annotation, and fix application
|
|
9
|
+
**Status line** — foifi installs an informative Claude Code status line that surfaces the active feature, current workflow phase, and relevant state directly in the terminal footer. No more digging through files to remember where you left off.
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
**Structured implementation workflow** — Instead of asking Claude or Codex to "just implement this," foifi enforces a three-phase loop:
|
|
12
|
+
1. **Plan** (`/5:plan`) — writes a single human-reviewed `plan.md` with scope, acceptance criteria, component checklist, and decisions.
|
|
13
|
+
2. **Implement** (`/5:implement`) — an orchestrator agent turns the plan into a typed execution graph (`state.json`), then delegates each component to a focused executor agent. A verification agent checks completeness, correctness, and test coverage at the end of every run.
|
|
14
|
+
3. **Review** (`/5:review`) — triages changed files, produces structured findings, and feeds them into `/5:address-review-findings` for interactive fix decisions and PR replies.
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
- **Efficient**: Parallel execution and smart agents minimize context usage
|
|
19
|
-
- **Resumable**: State tracking allows pausing and continuing work across sessions
|
|
20
|
-
- **Technology-Agnostic**: Works with JavaScript, Python, Java, Go, Rust, and more
|
|
21
|
-
- **Transparent**: Visible progress tracking and clear handoffs between phases
|
|
16
|
+
This separation keeps planning readable, implementation mechanical, and review structured.
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
**Code review and findings** — `/5:review` triages changed files and produces structured `review-findings-*.md`. `/5:address-review-findings` presents each finding interactively, records `fix`/`wont_fix`/`wait` decisions, applies approved local fixes, handles PR comment replies, and keeps a decision log — all without losing context between sessions.
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
**Plan management helpers** — `/5:discuss-feature` refines an existing plan in conversation. `/5:split` breaks a large plan into smaller linked child plans. `/5:unlock` clears a stale planning lock. `/5:reconfigure` refreshes docs and skills when the project evolves.
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
# Install locally for Claude Code
|
|
29
|
-
npx 5-phase-workflow
|
|
30
|
-
|
|
31
|
-
# Install locally for Codex
|
|
32
|
-
npx 5-phase-workflow --codex
|
|
22
|
+
**Codex support** — Every command has a `$5-*` Codex equivalent. Codex runs are token-budgeted: simple steps use a lighter model and low reasoning, complex or security-sensitive steps escalate automatically.
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
npx 5-phase-workflow --global
|
|
36
|
-
npx 5-phase-workflow --codex --global
|
|
37
|
-
```
|
|
24
|
+
### The name
|
|
38
25
|
|
|
39
|
-
The
|
|
40
|
-
- For Claude Code: copy workflow commands, agents, and skills to `.claude/`, then set up hooks and settings
|
|
41
|
-
- For Codex: convert workflow commands into skills in `.codex/skills/` and generate `.codex/instructions.md`
|
|
42
|
-
- Create `.5/features/` directory for feature tracking
|
|
26
|
+
"foifi" is Swiss German for *five*. The name comes from the project's original 5-phase workflow. That workflow has since been streamlined into the current 3-phase plan → implement → review loop, but the name stuck — and all commands still carry the `/5:` prefix.
|
|
43
27
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Required: Configure Your Project
|
|
28
|
+
## Install
|
|
47
29
|
|
|
48
30
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
# Codex
|
|
53
|
-
$5-configure
|
|
31
|
+
npx foifi
|
|
32
|
+
npx foifi --codex
|
|
54
33
|
```
|
|
55
34
|
|
|
56
|
-
|
|
57
|
-
- Auto-detect your project type (JavaScript, Python, Java, etc.)
|
|
58
|
-
- Set up build and test commands
|
|
59
|
-
- Configure ticket tracking patterns
|
|
60
|
-
- Generate comprehensive CLAUDE.md documentation
|
|
61
|
-
- Generate a rebuildable codebase index in `.5/index/`
|
|
62
|
-
- Create project-specific skills (create-component, create-service, etc.)
|
|
63
|
-
|
|
64
|
-
Follow the standard workflow after configuration:
|
|
65
|
-
1. Claude Code: `/5:plan-implementation CONFIGURE`
|
|
66
|
-
2. Codex: `$5-plan-implementation CONFIGURE`
|
|
67
|
-
3. Claude Code: `/5:implement-feature CONFIGURE`
|
|
68
|
-
4. Codex: `$5-implement-feature CONFIGURE`
|
|
69
|
-
5. Claude Code: `/5:verify-implementation`
|
|
70
|
-
6. Codex: `$5-verify-implementation`
|
|
71
|
-
|
|
72
|
-
**The workflow is ready to use after completing configuration.**
|
|
73
|
-
|
|
74
|
-
## Start Your First Feature
|
|
75
|
-
|
|
76
|
-
After configuration is complete, start your first feature:
|
|
35
|
+
Global installs are also supported:
|
|
77
36
|
|
|
78
37
|
```bash
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/5:plan-implementation {ticket-id}-{description}
|
|
82
|
-
/5:implement-feature {ticket-id}-{description}
|
|
83
|
-
/5:verify-implementation
|
|
84
|
-
/5:review-code
|
|
85
|
-
/5:address-review-findings
|
|
86
|
-
|
|
87
|
-
# Codex
|
|
88
|
-
$5-plan-feature
|
|
89
|
-
$5-plan-implementation {ticket-id}-{description}
|
|
90
|
-
$5-implement-feature {ticket-id}-{description}
|
|
91
|
-
$5-verify-implementation
|
|
92
|
-
$5-review-code
|
|
93
|
-
$5-address-review-findings
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Tip:** Running `/clear` between phases in Claude Code resets context and keeps conversations focused. In Codex, start a fresh turn or keep the next phase focused. Each phase reads necessary artifacts from previous phases, so no context is lost.
|
|
97
|
-
|
|
98
|
-
## Supported Tech Stacks
|
|
99
|
-
|
|
100
|
-
The workflow auto-detects and supports:
|
|
101
|
-
|
|
102
|
-
**JavaScript/TypeScript**:
|
|
103
|
-
- Node.js (npm, yarn, pnpm)
|
|
104
|
-
- Next.js
|
|
105
|
-
- NestJS
|
|
106
|
-
- Express
|
|
107
|
-
- React
|
|
108
|
-
- Vue
|
|
109
|
-
|
|
110
|
-
**Python**:
|
|
111
|
-
- Django
|
|
112
|
-
- Flask
|
|
113
|
-
- FastAPI
|
|
114
|
-
- Generic Python projects
|
|
115
|
-
|
|
116
|
-
**Java**:
|
|
117
|
-
- Gradle
|
|
118
|
-
- Maven
|
|
119
|
-
- Spring Boot
|
|
120
|
-
|
|
121
|
-
**Other**:
|
|
122
|
-
- Rust (Cargo)
|
|
123
|
-
- Go
|
|
124
|
-
- Ruby on Rails
|
|
125
|
-
- Custom projects (via manual config)
|
|
126
|
-
|
|
127
|
-
## Available Commands
|
|
128
|
-
|
|
129
|
-
Claude Code exposes the workflow under the `/5:` namespace. Codex exposes the same workflow as `$5-...` skills:
|
|
130
|
-
|
|
131
|
-
| Command | Phase | Purpose |
|
|
132
|
-
|---------|-------|---------|
|
|
133
|
-
| `/5:configure` or `$5-configure` | Setup | Interactive project configuration |
|
|
134
|
-
| `/5:plan-feature` or `$5-plan-feature` | 1 | Create feature specification with Q&A |
|
|
135
|
-
| `/5:discuss-feature` or `$5-discuss-feature` | 1 | Refine existing feature spec |
|
|
136
|
-
| `/5:plan-implementation` or `$5-plan-implementation` | 2 | Map feature to technical components |
|
|
137
|
-
| `/5:implement-feature` or `$5-implement-feature` | 3 | Execute implementation with agents |
|
|
138
|
-
| `/5:verify-implementation` or `$5-verify-implementation` | 4 | Verify completeness and correctness |
|
|
139
|
-
| `/5:review-code` or `$5-review-code` | 5 | AI-powered code review (Claude, Codex, or CodeRabbit workflows) |
|
|
140
|
-
| `/5:address-review-findings` or `$5-address-review-findings` | 5 | Apply annotated findings and address PR comments |
|
|
141
|
-
| `/5:quick-implement` or `$5-quick-implement` | Fast | Streamlined workflow for small tasks |
|
|
142
|
-
| `/5:eject` or `$5-eject` | Utility | Permanently remove update infrastructure |
|
|
143
|
-
| `/5:unlock` or `$5-unlock` | Utility | Remove planning guard lock |
|
|
144
|
-
| `/5:synchronize-agents` or `$5-synchronize-agents` | Utility | Sync user content between Claude Code and Codex runtimes |
|
|
145
|
-
|
|
146
|
-
## Configuration
|
|
147
|
-
|
|
148
|
-
The workflow is configured via `.5/config.json`. Here's an example:
|
|
149
|
-
|
|
150
|
-
```json
|
|
151
|
-
{
|
|
152
|
-
"projectType": "nextjs",
|
|
153
|
-
"ticket": {
|
|
154
|
-
"pattern": "[A-Z]+-\\d+",
|
|
155
|
-
"extractFromBranch": true
|
|
156
|
-
},
|
|
157
|
-
"build": {
|
|
158
|
-
"command": "npm run build",
|
|
159
|
-
"testCommand": "npm test"
|
|
160
|
-
},
|
|
161
|
-
"steps": [
|
|
162
|
-
{ "name": "foundation", "mode": "parallel" },
|
|
163
|
-
{ "name": "logic", "mode": "sequential" },
|
|
164
|
-
{ "name": "integration", "mode": "sequential" }
|
|
165
|
-
],
|
|
166
|
-
"reviewTool": "coderabbit"
|
|
167
|
-
}
|
|
38
|
+
npx foifi --global
|
|
39
|
+
npx foifi --codex --global
|
|
168
40
|
```
|
|
169
41
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
#### Required Fields
|
|
173
|
-
|
|
174
|
-
- **`projectType`**: Detected project type (e.g., `"nextjs"`, `"django"`, `"rust"`)
|
|
175
|
-
- **`build.command`**: Command to build the project
|
|
176
|
-
- **`build.testCommand`**: Command to run tests
|
|
177
|
-
|
|
178
|
-
#### Optional Fields
|
|
179
|
-
|
|
180
|
-
- **`ticket.pattern`**: Regex pattern for ticket IDs (e.g., `"PROJ-\\d+"`)
|
|
181
|
-
- **`ticket.extractFromBranch`**: Auto-extract ticket from branch name
|
|
182
|
-
- **`steps`**: Implementation step configuration
|
|
183
|
-
- **`framework`**: Framework-specific patterns (routes, models, etc.)
|
|
184
|
-
- **`integration`**: Integration point configuration
|
|
185
|
-
- **`tools`**: Available development tools (CodeRabbit, IDE, etc.)
|
|
186
|
-
|
|
187
|
-
Run `/5:configure` to set up or update your configuration.
|
|
188
|
-
|
|
189
|
-
## How It Works
|
|
190
|
-
|
|
191
|
-
### Phase 1: Feature Planning
|
|
192
|
-
|
|
193
|
-
Claude asks 5-10 clarifying questions to understand your requirements:
|
|
194
|
-
|
|
195
|
-
- What exactly should this feature do?
|
|
196
|
-
- What are the edge cases?
|
|
197
|
-
- How will we verify it works?
|
|
198
|
-
- Are there simpler alternatives?
|
|
199
|
-
|
|
200
|
-
The output is a comprehensive feature spec at `.5/features/{ticket-id}/feature.md`.
|
|
201
|
-
|
|
202
|
-
### Phase 2: Implementation Planning
|
|
203
|
-
|
|
204
|
-
Claude maps your feature to technical components:
|
|
205
|
-
|
|
206
|
-
- Analyzes your codebase structure
|
|
207
|
-
- Identifies affected modules
|
|
208
|
-
- Maps components to implementation steps
|
|
209
|
-
- Creates dependency graph
|
|
210
|
-
|
|
211
|
-
The output is an **atomic plan structure** at `.5/features/{ticket-id}/`:
|
|
212
|
-
- `feature.md` - Feature specification (Phase 1)
|
|
213
|
-
- `plan.md` - Implementation plan (Phase 2)
|
|
214
|
-
- `state.json` - Implementation state tracking (Phase 3)
|
|
215
|
-
|
|
216
|
-
Each step file is self-contained and independently loadable, making large plans manageable and improving agent efficiency.
|
|
217
|
-
|
|
218
|
-
### Phase 3: Orchestrated Implementation
|
|
219
|
-
|
|
220
|
-
Claude executes the plan using specialized agents:
|
|
221
|
-
|
|
222
|
-
- **step-executor**: Creates each component using skills or direct file creation
|
|
223
|
-
- **step-verifier**: Compiles and checks for errors after each step
|
|
224
|
-
- **integration-agent**: Wires components and registers routes
|
|
225
|
-
|
|
226
|
-
State is tracked in `.5/features/{ticket-id}/state.json` for resumability.
|
|
227
|
-
|
|
228
|
-
### Phase 4: Verify Implementation
|
|
229
|
-
|
|
230
|
-
An agent performs comprehensive verification:
|
|
231
|
-
|
|
232
|
-
- All planned files exist
|
|
233
|
-
- No compilation/build errors
|
|
234
|
-
- Tests pass
|
|
235
|
-
- IDE diagnostics clean
|
|
236
|
-
|
|
237
|
-
Results are saved to a verification report.
|
|
238
|
-
|
|
239
|
-
### Phase 5: Code Review
|
|
240
|
-
|
|
241
|
-
Two commands work together to handle the review workflow:
|
|
242
|
-
|
|
243
|
-
**`/5:review-code`** — runs the automated review and presents findings:
|
|
244
|
-
- Supports Claude (built-in, no setup) or CodeRabbit CLI
|
|
245
|
-
- Reviews staged changes, unstaged changes, or branch diff
|
|
246
|
-
- Categorizes findings as Fixable, Questions, or Manual
|
|
247
|
-
- Lets you fix immediately or save findings for later
|
|
248
|
-
|
|
249
|
-
**`/5:address-review-findings`** — applies annotated findings from a saved file:
|
|
250
|
-
- Reads the `review-findings-*.md` file generated by `/5:review-code`
|
|
251
|
-
- Applies `[FIX]` items, skips `[SKIP]` items, and follows `[MANUAL]` instructions
|
|
252
|
-
- Optionally fetches and addresses GitHub PR review comments
|
|
253
|
-
- Posts threaded replies to processed PR comments
|
|
254
|
-
- Runs build, tests, and lint after applying fixes
|
|
255
|
-
- Saves a summary report
|
|
42
|
+
Claude Code installs commands under `.claude/`. Codex installs converted skills under `.codex/skills/`.
|
|
256
43
|
|
|
257
|
-
##
|
|
44
|
+
## Configure
|
|
258
45
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
```
|
|
262
|
-
.5/
|
|
263
|
-
├── config.json # Project configuration
|
|
264
|
-
├── version.json # Version tracking
|
|
265
|
-
├── index/ # Generated codebase index + rebuild script
|
|
266
|
-
│ ├── rebuild-index.sh
|
|
267
|
-
│ └── *.md
|
|
268
|
-
└── features/ # Feature tracking
|
|
269
|
-
|
|
270
|
-
.claude/
|
|
271
|
-
├── commands/5/ # Workflow commands
|
|
272
|
-
│ ├── plan-feature.md
|
|
273
|
-
│ ├── plan-implementation.md
|
|
274
|
-
│ ├── implement-feature.md
|
|
275
|
-
│ ├── verify-implementation.md
|
|
276
|
-
│ ├── review-code.md
|
|
277
|
-
│ ├── address-review-findings.md
|
|
278
|
-
│ ├── discuss-feature.md
|
|
279
|
-
│ ├── quick-implement.md
|
|
280
|
-
│ ├── configure.md
|
|
281
|
-
│ ├── eject.md
|
|
282
|
-
│ ├── unlock.md
|
|
283
|
-
│ └── synchronize-agents.md
|
|
284
|
-
├── skills/ # Atomic operations
|
|
285
|
-
│ ├── build-project/
|
|
286
|
-
│ ├── run-tests/
|
|
287
|
-
│ └── generate-readme/
|
|
288
|
-
├── hooks/
|
|
289
|
-
│ ├── statusline.js # Status line integration
|
|
290
|
-
│ ├── check-updates.js # Update notifications
|
|
291
|
-
│ ├── plan-guard.js # Planning phase edit guard
|
|
292
|
-
│ └── config-guard.js # Configuration guard
|
|
293
|
-
└── settings.json # Claude Code settings
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
## Examples
|
|
297
|
-
|
|
298
|
-
### Example 1: Adding a REST API endpoint
|
|
46
|
+
Run configuration once per project:
|
|
299
47
|
|
|
300
48
|
```bash
|
|
301
|
-
/5:
|
|
302
|
-
#
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
/5:plan-implementation PROJ-1234-add-user-endpoint
|
|
306
|
-
# Claude maps to: route file, controller, service, tests
|
|
307
|
-
# Creates technical plan
|
|
308
|
-
|
|
309
|
-
/5:implement-feature PROJ-1234-add-user-endpoint
|
|
310
|
-
# Creates route, controller, service, tests
|
|
311
|
-
# Registers route in app
|
|
312
|
-
# Runs build and tests
|
|
313
|
-
|
|
314
|
-
/5:verify-implementation
|
|
315
|
-
# Verifies all files created
|
|
316
|
-
# Checks build passes
|
|
317
|
-
# Confirms tests pass
|
|
49
|
+
/5:configure
|
|
50
|
+
# or in Codex
|
|
51
|
+
$5-configure
|
|
318
52
|
```
|
|
319
53
|
|
|
320
|
-
|
|
54
|
+
Configuration writes `.5/config.json` and `.5/features/CONFIGURE/plan.md`. Then run:
|
|
321
55
|
|
|
322
56
|
```bash
|
|
323
|
-
/5:
|
|
324
|
-
#
|
|
325
|
-
|
|
57
|
+
/5:implement CONFIGURE
|
|
58
|
+
# or
|
|
59
|
+
$5-implement CONFIGURE
|
|
326
60
|
```
|
|
327
61
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
### Build/Test commands not working
|
|
331
|
-
|
|
332
|
-
1. Run `/5:configure` to verify configuration
|
|
333
|
-
2. Test commands manually in terminal
|
|
334
|
-
3. Update `.5/config.json` with correct commands
|
|
335
|
-
|
|
336
|
-
### "Cannot find project type"
|
|
62
|
+
That generates project documentation, a rebuildable `.5/index/`, AGENTS.md, a CLAUDE.md shim, and selected project-specific skills/rules.
|
|
337
63
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
### State file issues
|
|
341
|
-
|
|
342
|
-
If implementation gets stuck:
|
|
343
|
-
|
|
344
|
-
1. Check `.5/features/{ticket-id}/state.json`
|
|
345
|
-
2. Note the `currentStep` value
|
|
346
|
-
3. Run `/5:implement-feature` again - it will resume from that step
|
|
347
|
-
|
|
348
|
-
### CodeRabbit not working
|
|
349
|
-
|
|
350
|
-
1. Install: https://docs.coderabbit.ai/cli/installation
|
|
351
|
-
2. Authenticate: `coderabbit auth login`
|
|
352
|
-
3. Run `/5:configure` to update config
|
|
353
|
-
|
|
354
|
-
## Updating
|
|
355
|
-
|
|
356
|
-
The workflow automatically detects when a new version is available.
|
|
357
|
-
|
|
358
|
-
### Automatic Update (Recommended)
|
|
64
|
+
## Workflow
|
|
359
65
|
|
|
360
66
|
```bash
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
# Check version without updating
|
|
368
|
-
npx 5-phase-workflow --check
|
|
67
|
+
/5:plan
|
|
68
|
+
/5:split {feature-name}
|
|
69
|
+
/5:implement {feature-name}
|
|
70
|
+
/5:review
|
|
71
|
+
/5:address-review-findings {feature-name}
|
|
369
72
|
```
|
|
370
73
|
|
|
371
|
-
|
|
74
|
+
Codex equivalents:
|
|
372
75
|
|
|
373
76
|
```bash
|
|
374
|
-
|
|
375
|
-
|
|
77
|
+
$5-plan
|
|
78
|
+
$5-split {feature-name}
|
|
79
|
+
$5-implement {feature-name}
|
|
80
|
+
$5-review
|
|
81
|
+
$5-address-review-findings {feature-name}
|
|
376
82
|
```
|
|
377
83
|
|
|
378
|
-
|
|
379
|
-
- Config files in `.5/` are preserved
|
|
380
|
-
- User-created commands, agents, skills, hooks, and templates are preserved
|
|
381
|
-
- Only workflow-managed files are updated
|
|
382
|
-
|
|
383
|
-
### Ejecting
|
|
84
|
+
Verification runs at the end of `/5:implement` and records concise results in `state.json`.
|
|
384
85
|
|
|
385
|
-
|
|
86
|
+
## Commands
|
|
386
87
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
/5
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
88
|
+
| Command | Purpose |
|
|
89
|
+
|---------|---------|
|
|
90
|
+
| `/5:configure` / `$5-configure` | Detect project settings and write the CONFIGURE plan |
|
|
91
|
+
| `/5:plan` / `$5-plan` | Create one unified `plan.md` from requirements, codebase exploration, and user decisions |
|
|
92
|
+
| `/5:discuss-feature` / `$5-discuss-feature` | Refine an existing `plan.md` |
|
|
93
|
+
| `/5:split` / `$5-split` | Split an existing plan into smaller linked plans for separate implementation |
|
|
94
|
+
| `/5:implement` / `$5-implement` | Derive `state.json`, execute steps with agents, and verify inline |
|
|
95
|
+
| `/5:review` / `$5-review` | Review code changes and save findings |
|
|
96
|
+
| `/5:address-review-findings` / `$5-address-review-findings` | Decide on review findings interactively, then apply approved fixes and PR comments |
|
|
97
|
+
| `/5:reconfigure` / `$5-reconfigure` | Refresh docs, index, skills, and rules |
|
|
98
|
+
| `/5:update` / `$5-update` | Upgrade installed workflow files |
|
|
99
|
+
| `/5:eject` / `$5-eject` | Stop workflow-managed updates |
|
|
100
|
+
| `/5:unlock` / `$5-unlock` | Remove a stale planning guard lock |
|
|
101
|
+
| `/5:synchronize-agents` / `$5-synchronize-agents` | Sync user content between Claude Code and Codex |
|
|
394
102
|
|
|
395
|
-
|
|
396
|
-
- Deletes `check-updates.js` hook, `update.md` and `eject.md` commands
|
|
397
|
-
- Deletes `.5/version.json` and `.5/.update-cache.json`
|
|
398
|
-
- For Claude Code, removes the update check hook entry from `.claude/settings.json`
|
|
399
|
-
- For Codex, removes the converted update/eject skills from `.codex/skills/`
|
|
103
|
+
## Artifacts
|
|
400
104
|
|
|
401
|
-
|
|
105
|
+
Each feature lives under `.5/features/{feature-name}/`:
|
|
402
106
|
|
|
403
|
-
|
|
107
|
+
- `plan.md` - single human-reviewed planning artifact
|
|
108
|
+
- `codebase-scan.md` - cached discovery used to reduce repeated scanning
|
|
109
|
+
- `state.json` - enriched execution state derived by `step-orchestrator-agent`
|
|
110
|
+
- `state-events.jsonl` - detailed execution history for retries, commands, commits, and verification
|
|
111
|
+
- `split-manifest-*.json` - parent feature record for child plans created by `/5:split`
|
|
112
|
+
- `review-findings-*.md` - review output for `/5:address-review-findings`
|
|
113
|
+
- `review-decisions-*.json` - interactive fix/wont-fix/wait decisions for local findings
|
|
114
|
+
- `pr-comment-decisions.json` - PR review comment decisions when PR handling is used
|
|
404
115
|
|
|
405
|
-
|
|
116
|
+
## Design
|
|
406
117
|
|
|
407
|
-
|
|
408
|
-
# Claude Code
|
|
409
|
-
/5:synchronize-agents
|
|
118
|
+
Planning stays human-readable. `plan.md` contains scope, acceptance criteria, decisions, module impact, and a clean component checklist. Small low-risk changes can use the compact plan template. Plans intentionally do not ask the planner to fill model choices, verify commands, step grouping, or pattern-file wiring.
|
|
410
119
|
|
|
411
|
-
|
|
412
|
-
$5-synchronize-agents
|
|
413
|
-
```
|
|
120
|
+
Implementation is mechanical. `step-orchestrator-agent` reads `plan.md` and `codebase-scan.md`, derives the execution graph into compact `state.json`, then `/5:implement` delegates each component to `step-executor-agent` with an inline executor contract. Pattern context is passed as targeted references instead of broad file lists so executors can read only the relevant ranges. Detailed history is appended to `state-events.jsonl`. This reduces planning token cost and avoids brittle prompt-table metadata.
|
|
414
121
|
|
|
415
|
-
|
|
416
|
-
- Sync project-specific skills (e.g., `create-controller`, `run-tests`) between `.claude/skills/` and `.codex/skills/` with appropriate format conversion
|
|
417
|
-
- Convert custom Claude commands to Codex skills
|
|
418
|
-
- Append `.claude/rules/` content to `.codex/instructions.md`
|
|
419
|
-
- Sync Codex-only skills back to Claude
|
|
122
|
+
Verification uses a dedicated agent. `/5:implement` runs `verification-agent` at the end and records a concise final status in `state.json` without generating an extra report.
|
|
420
123
|
|
|
421
|
-
|
|
124
|
+
Review is risk-based. Native review triages changed files first and reads full files only for risky changes or when diff context is insufficient. `/5:address-review-findings` presents each finding one by one with a recommendation, records `fix`/`wont_fix`/`wait` decisions, then coordinates narrower helpers for approved local fixes, PR comment triage, and PR replies so the common path stays compact.
|
|
422
125
|
|
|
423
|
-
|
|
126
|
+
Reconfiguration uses a compact `.5/reconfigure-manifest.json` to pass refresh decisions to documentation and skill generation helpers without duplicating long detection summaries in prompts.
|
|
424
127
|
|
|
425
|
-
|
|
128
|
+
For Codex installs, the workflow is token-budgeted: exploration, orchestration, and simple executors default to `gpt-5.4-mini` with low reasoning. Complex logic, security-sensitive work, data migrations, public API changes, final verification that needs deeper review, and failed retries escalate to `gpt-5.4` with medium reasoning.
|
|
426
129
|
|
|
427
|
-
|
|
130
|
+
## Updating
|
|
428
131
|
|
|
429
132
|
```bash
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
# Or run directly
|
|
434
|
-
bash test/verify-install-js.sh
|
|
133
|
+
npx foifi --upgrade
|
|
134
|
+
npx foifi --codex --upgrade
|
|
435
135
|
```
|
|
436
136
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
### Continuous Integration
|
|
440
|
-
|
|
441
|
-
A GitHub Actions workflow runs on every push to verify the install.js configuration. The workflow:
|
|
442
|
-
- Checks that all workflow files are listed in `getWorkflowManagedFiles()`
|
|
443
|
-
- Ensures selective updates will work correctly
|
|
444
|
-
- Prevents accidental omissions that could break user upgrades
|
|
445
|
-
|
|
446
|
-
See `.github/workflows/test.yml` for details.
|
|
447
|
-
|
|
448
|
-
### Adding New Workflow Files
|
|
449
|
-
|
|
450
|
-
When adding new commands, agents, skills, hooks, or templates:
|
|
451
|
-
|
|
452
|
-
1. Create the file in the appropriate `src/` directory
|
|
453
|
-
2. **Update `bin/install.js`** - Add the file to `getWorkflowManagedFiles()`
|
|
454
|
-
3. Run `npm test` to verify
|
|
455
|
-
4. Commit only if tests pass
|
|
456
|
-
|
|
457
|
-
See `CLAUDE.md` for detailed development guidelines.
|
|
458
|
-
|
|
459
|
-
## License
|
|
460
|
-
|
|
461
|
-
MIT
|
|
462
|
-
|
|
463
|
-
## Learn More
|
|
464
|
-
|
|
465
|
-
- [Full Workflow Guide](./docs/workflow-guide.md) - Detailed documentation
|
|
466
|
-
- [Claude Code Docs](https://docs.anthropic.com/claude/docs/claude-code) - Claude Code features
|
|
137
|
+
v2.0.0 is a hard migration. Finish in-progress v1.9.5 features before upgrading; v1 `feature.md` and old `state.json` formats are not supported.
|