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.
- 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 +113 -77
- 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 -248
- 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 -213
- 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,114 @@
|
|
|
1
|
-
#
|
|
1
|
+
# foifi
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A structured AI-assisted development workflow for Claude Code and Codex.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
The **5-Phase Workflow** is a structured approach to feature development that breaks down the process into clear, manageable phases:
|
|
8
|
-
|
|
9
|
-
1. **Feature Planning** - Understand requirements through intensive Q&A
|
|
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
|
|
14
|
-
|
|
15
|
-
## Why Use It?
|
|
16
|
-
|
|
17
|
-
- **Systematic**: Clear phases prevent missing requirements or skipping validation
|
|
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
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
Install the workflow in your project using npx:
|
|
5
|
+
## Install
|
|
26
6
|
|
|
27
7
|
```bash
|
|
28
|
-
|
|
29
|
-
npx
|
|
30
|
-
|
|
31
|
-
# Install locally for Codex
|
|
32
|
-
npx 5-phase-workflow --codex
|
|
33
|
-
|
|
34
|
-
# Or install globally
|
|
35
|
-
npx 5-phase-workflow --global
|
|
36
|
-
npx 5-phase-workflow --codex --global
|
|
8
|
+
npx foifi
|
|
9
|
+
npx foifi --codex
|
|
37
10
|
```
|
|
38
11
|
|
|
39
|
-
|
|
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
|
|
43
|
-
|
|
44
|
-
**After installation, you must configure your project:**
|
|
45
|
-
|
|
46
|
-
## Required: Configure Your Project
|
|
12
|
+
Global installs are also supported:
|
|
47
13
|
|
|
48
14
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
# Codex
|
|
53
|
-
$5-configure
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This will:
|
|
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:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# Claude Code
|
|
80
|
-
/5:plan-feature
|
|
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
|
-
}
|
|
15
|
+
npx foifi --global
|
|
16
|
+
npx foifi --codex --global
|
|
168
17
|
```
|
|
169
18
|
|
|
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
|
|
19
|
+
Claude Code installs commands under `.claude/`. Codex installs converted skills under `.codex/skills/`.
|
|
236
20
|
|
|
237
|
-
|
|
21
|
+
## Configure
|
|
238
22
|
|
|
239
|
-
|
|
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
|
|
256
|
-
|
|
257
|
-
## Project Structure
|
|
258
|
-
|
|
259
|
-
After installation, your `.claude/` directory will contain:
|
|
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
|
|
23
|
+
Run configuration once per project:
|
|
299
24
|
|
|
300
25
|
```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
|
|
26
|
+
/5:configure
|
|
27
|
+
# or in Codex
|
|
28
|
+
$5-configure
|
|
318
29
|
```
|
|
319
30
|
|
|
320
|
-
|
|
31
|
+
Configuration writes `.5/config.json` and `.5/features/CONFIGURE/plan.md`. Then run:
|
|
321
32
|
|
|
322
33
|
```bash
|
|
323
|
-
/5:
|
|
324
|
-
#
|
|
325
|
-
|
|
34
|
+
/5:implement CONFIGURE
|
|
35
|
+
# or
|
|
36
|
+
$5-implement CONFIGURE
|
|
326
37
|
```
|
|
327
38
|
|
|
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"
|
|
337
|
-
|
|
338
|
-
The auto-detection failed. Run `/5:configure` and manually select your project type.
|
|
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
|
|
39
|
+
That generates project documentation, a rebuildable `.5/index/`, AGENTS.md, a CLAUDE.md shim, and selected project-specific skills/rules.
|
|
355
40
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
### Automatic Update (Recommended)
|
|
41
|
+
## Workflow
|
|
359
42
|
|
|
360
43
|
```bash
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
# Check version without updating
|
|
368
|
-
npx 5-phase-workflow --check
|
|
44
|
+
/5:plan
|
|
45
|
+
/5:split {feature-name}
|
|
46
|
+
/5:implement {feature-name}
|
|
47
|
+
/5:review
|
|
48
|
+
/5:address-review-findings {feature-name}
|
|
369
49
|
```
|
|
370
50
|
|
|
371
|
-
|
|
51
|
+
Codex equivalents:
|
|
372
52
|
|
|
373
53
|
```bash
|
|
374
|
-
|
|
375
|
-
|
|
54
|
+
$5-plan
|
|
55
|
+
$5-split {feature-name}
|
|
56
|
+
$5-implement {feature-name}
|
|
57
|
+
$5-review
|
|
58
|
+
$5-address-review-findings {feature-name}
|
|
376
59
|
```
|
|
377
60
|
|
|
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
|
|
61
|
+
Verification runs at the end of `/5:implement` and records concise results in `state.json`.
|
|
382
62
|
|
|
383
|
-
|
|
63
|
+
## Commands
|
|
384
64
|
|
|
385
|
-
|
|
65
|
+
| Command | Purpose |
|
|
66
|
+
|---------|---------|
|
|
67
|
+
| `/5:configure` / `$5-configure` | Detect project settings and write the CONFIGURE plan |
|
|
68
|
+
| `/5:plan` / `$5-plan` | Create one unified `plan.md` from requirements, codebase exploration, and user decisions |
|
|
69
|
+
| `/5:discuss-feature` / `$5-discuss-feature` | Refine an existing `plan.md` |
|
|
70
|
+
| `/5:split` / `$5-split` | Split an existing plan into smaller linked plans for separate implementation |
|
|
71
|
+
| `/5:implement` / `$5-implement` | Derive `state.json`, execute steps with agents, and verify inline |
|
|
72
|
+
| `/5:review` / `$5-review` | Review code changes and save findings |
|
|
73
|
+
| `/5:address-review-findings` / `$5-address-review-findings` | Decide on review findings interactively, then apply approved fixes and PR comments |
|
|
74
|
+
| `/5:reconfigure` / `$5-reconfigure` | Refresh docs, index, skills, and rules |
|
|
75
|
+
| `/5:update` / `$5-update` | Upgrade installed workflow files |
|
|
76
|
+
| `/5:eject` / `$5-eject` | Stop workflow-managed updates |
|
|
77
|
+
| `/5:unlock` / `$5-unlock` | Remove a stale planning guard lock |
|
|
78
|
+
| `/5:synchronize-agents` / `$5-synchronize-agents` | Sync user content between Claude Code and Codex |
|
|
386
79
|
|
|
387
|
-
|
|
388
|
-
# Claude Code
|
|
389
|
-
/5:eject
|
|
80
|
+
## Artifacts
|
|
390
81
|
|
|
391
|
-
|
|
392
|
-
$5-eject
|
|
393
|
-
```
|
|
82
|
+
Each feature lives under `.5/features/{feature-name}/`:
|
|
394
83
|
|
|
395
|
-
|
|
396
|
-
-
|
|
397
|
-
-
|
|
398
|
-
-
|
|
399
|
-
-
|
|
84
|
+
- `plan.md` - single human-reviewed planning artifact
|
|
85
|
+
- `codebase-scan.md` - cached discovery used to reduce repeated scanning
|
|
86
|
+
- `state.json` - enriched execution state derived by `step-orchestrator-agent`
|
|
87
|
+
- `state-events.jsonl` - detailed execution history for retries, commands, commits, and verification
|
|
88
|
+
- `split-manifest-*.json` - parent feature record for child plans created by `/5:split`
|
|
89
|
+
- `review-findings-*.md` - review output for `/5:address-review-findings`
|
|
90
|
+
- `review-decisions-*.json` - interactive fix/wont-fix/wait decisions for local findings
|
|
91
|
+
- `pr-comment-decisions.json` - PR review comment decisions when PR handling is used
|
|
400
92
|
|
|
401
|
-
|
|
93
|
+
## Design
|
|
402
94
|
|
|
403
|
-
|
|
95
|
+
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.
|
|
404
96
|
|
|
405
|
-
|
|
97
|
+
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.
|
|
406
98
|
|
|
407
|
-
|
|
408
|
-
# Claude Code
|
|
409
|
-
/5:synchronize-agents
|
|
99
|
+
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.
|
|
410
100
|
|
|
411
|
-
|
|
412
|
-
$5-synchronize-agents
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
This will:
|
|
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
|
|
420
|
-
|
|
421
|
-
Workflow-managed files and shared data (`.5/`) are not affected — those are handled by the installer.
|
|
101
|
+
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
102
|
|
|
423
|
-
|
|
103
|
+
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
104
|
|
|
425
|
-
|
|
105
|
+
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
106
|
|
|
427
|
-
|
|
107
|
+
## Updating
|
|
428
108
|
|
|
429
109
|
```bash
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
# Or run directly
|
|
434
|
-
bash test/verify-install-js.sh
|
|
110
|
+
npx foifi --upgrade
|
|
111
|
+
npx foifi --codex --upgrade
|
|
435
112
|
```
|
|
436
113
|
|
|
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
|
|
114
|
+
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.
|