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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 5:configure
|
|
3
|
-
description: Configures the project. Analyzes project, gathers preferences, writes config.json, and creates .5/
|
|
3
|
+
description: Configures the project. Analyzes project, gathers preferences, writes config.json, points Claude Code plan mode at .5/planning/, and creates .5/planning/CONFIGURE.md. Follow up with /5:implement CONFIGURE.
|
|
4
4
|
allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<role>
|
|
9
9
|
You are a Project Configurator. You analyze a project, gather preferences, and write config.json plus a unified plan.
|
|
10
|
-
You do NOT
|
|
11
|
-
You write ONLY to: .5/config.json, .5/version.json, .5/
|
|
10
|
+
You do NOT write AGENTS.md, CLAUDE.md, or rules directly — those are /5:implement's job.
|
|
11
|
+
You write ONLY to: .5/config.json, .5/version.json, .5/planning/CONFIGURE.md, .gitignore, and the `plansDirectory` key of .claude/settings.json (Claude Code only).
|
|
12
12
|
After writing config.json and the unified plan, you are DONE. Exit immediately.
|
|
13
13
|
</role>
|
|
14
14
|
|
|
@@ -18,11 +18,11 @@ Current commit: !`git rev-parse --short HEAD 2>/dev/null || echo "none"`
|
|
|
18
18
|
|
|
19
19
|
## Overview
|
|
20
20
|
|
|
21
|
-
This command prepares project configuration. It analyzes the project, asks preference questions, writes `.5/config.json`, and writes a
|
|
21
|
+
This command prepares project configuration. It analyzes the project, asks preference questions, writes `.5/config.json`, points Claude Code plan mode at `.5/planning/`, and writes a plan at `.5/planning/CONFIGURE.md`.
|
|
22
22
|
|
|
23
23
|
After running this command, proceed through the standard phases:
|
|
24
24
|
1. **`/5:configure`** (this command) - Create config and CONFIGURE plan
|
|
25
|
-
2. `/5:implement CONFIGURE` - Execute configuration (uses `configure-
|
|
25
|
+
2. `/5:implement CONFIGURE` - Execute configuration (uses `configure-agents-md` and `configure-rules`)
|
|
26
26
|
3. `/5:review` - Review generated files if desired
|
|
27
27
|
|
|
28
28
|
## ⚠️ CRITICAL SCOPE CONSTRAINT
|
|
@@ -33,19 +33,19 @@ Your job in this command:
|
|
|
33
33
|
✅ Analyze project (detect type, build commands, etc.)
|
|
34
34
|
✅ Gather user preferences via questions
|
|
35
35
|
✅ Write `.5/config.json` directly
|
|
36
|
-
✅
|
|
36
|
+
✅ Set `plansDirectory` in `.claude/settings.json` (Claude Code only)
|
|
37
|
+
✅ Create the plan at `.5/planning/CONFIGURE.md` for remaining work
|
|
37
38
|
✅ Tell user to run /5:implement CONFIGURE
|
|
38
39
|
|
|
39
40
|
Your job is NOT:
|
|
40
|
-
❌
|
|
41
|
-
❌ Generate
|
|
42
|
-
❌ Generate skills directly (/5:implement does this)
|
|
41
|
+
❌ Write AGENTS.md or CLAUDE.md directly (/5:implement does this)
|
|
42
|
+
❌ Generate rules directly (/5:implement does this)
|
|
43
43
|
❌ Skip user interaction
|
|
44
44
|
❌ Assume project structure
|
|
45
45
|
|
|
46
46
|
**After writing config.json, creating the unified plan, and informing the user, YOUR JOB IS COMPLETE. EXIT IMMEDIATELY.**
|
|
47
47
|
|
|
48
|
-
**If you find yourself
|
|
48
|
+
**If you find yourself writing AGENTS.md, CLAUDE.md, or rules, STOP IMMEDIATELY. You should only be writing config.json, the settings key, and the plan.**
|
|
49
49
|
|
|
50
50
|
## Configuration Process
|
|
51
51
|
|
|
@@ -75,23 +75,16 @@ fi
|
|
|
75
75
|
|
|
76
76
|
# Context7 - up-to-date documentation MCP server
|
|
77
77
|
# Check if context7 tools are available (resolve-library-id, query-docs)
|
|
78
|
-
|
|
79
|
-
# skill-creator plugin — helps create better project-specific skills
|
|
80
|
-
# Check if skill-creator tools are available by looking for known tool names
|
|
81
|
-
# in the current session (e.g., create-skill, scaffold-skill).
|
|
82
|
-
# Set skill_creator_available=true if any skill-creator tool is found.
|
|
83
78
|
```
|
|
84
79
|
|
|
85
80
|
**1e. Check AGENTS.md / CLAUDE.md:**
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
**1f. Scan existing skills:**
|
|
90
|
-
- Check `.claude/skills/` for existing project-specific skills
|
|
91
|
-
|
|
92
|
-
**1g. Detect codebase patterns** — Read `.claude/references/configure-tables.md` section "Codebase Pattern Categories to Scan" for the full list and scanning approach.
|
|
81
|
+
- Read `AGENTS.md` and `CLAUDE.md` if they exist. Their content belongs to the repository and stays exactly as it is; the workflow only adds its own marked block to `AGENTS.md` and an `@AGENTS.md` line to `CLAUDE.md`.
|
|
82
|
+
- Note the build/test commands and the commit convention they already document, so the questions below can skip them.
|
|
93
83
|
|
|
94
|
-
**
|
|
84
|
+
**1e2. Find repository standards:**
|
|
85
|
+
- Find the files `.claude/skills/review-style/SKILL.md` step 2 counts as repository standards, such as `CONTRIBUTING.md` or `CODESTYLE.md`. Note each path.
|
|
86
|
+
- These always win over the workflow's own rules. AGENTS.md links them, and generated rules must not contradict them.
|
|
87
|
+
- Note whether one of them documents a commit message convention.
|
|
95
88
|
|
|
96
89
|
### Step 2: Gather User Preferences (interactive via AskUserQuestion)
|
|
97
90
|
|
|
@@ -149,7 +142,9 @@ If "Cancel": Exit immediately with message "Configuration unchanged."
|
|
|
149
142
|
1. "No (recommended)" → `git.autoCommit: false`
|
|
150
143
|
2. "Yes - commit after each implementation step" → `git.autoCommit: true`
|
|
151
144
|
|
|
152
|
-
**2g. Commit message pattern
|
|
145
|
+
**2g. Commit message pattern:**
|
|
146
|
+
|
|
147
|
+
When the repository already documents a commit convention (step 1e or 1e2), that convention wins and AGENTS.md links it. Skip the question, and derive the closest pattern from the convention with the `{ticket-id}` and `{short-description}` placeholders — for example `feat({ticket-id}): {short-description}` for Conventional Commits — and store it as `git.commitMessage.pattern`, so auto-commits follow the convention too. Otherwise ask:
|
|
153
148
|
- "What commit message format would you like?"
|
|
154
149
|
- Options:
|
|
155
150
|
1. "Default: `{ticket-id} {short-description}` (Recommended)"
|
|
@@ -170,23 +165,8 @@ Context7 provides up-to-date, version-specific documentation and code examples d
|
|
|
170
165
|
2. "Skip"
|
|
171
166
|
- If user selects "Install now": execute the install command
|
|
172
167
|
|
|
173
|
-
**2i. skill-creator plugin:**
|
|
174
|
-
|
|
175
|
-
The skill-creator plugin from the official Claude store helps generate higher-quality project-specific skills with structured authoring guidance.
|
|
176
|
-
|
|
177
|
-
- If skill-creator was detected in Step 1d:
|
|
178
|
-
- "skill-creator plugin is already installed. ✓"
|
|
179
|
-
- Set `tools.skillCreator.available = true` in the config
|
|
180
|
-
- If skill-creator was NOT detected:
|
|
181
|
-
- "Would you like to install the skill-creator plugin? It helps generate higher-quality project-specific skills."
|
|
182
|
-
- Options:
|
|
183
|
-
1. "Install now (recommended)" — run `claude plugin install skill-creator@claude-plugins-official` via Bash
|
|
184
|
-
2. "Skip"
|
|
185
|
-
- If user selects "Install now": execute the install command, then set `tools.skillCreator.available = true` in the config
|
|
186
|
-
- If user selects "Skip": `tools.skillCreator.available` remains `false`
|
|
187
|
-
|
|
188
168
|
**2j. Confirm AGENTS.md generation:**
|
|
189
|
-
- "
|
|
169
|
+
- "Add the workflow rules to AGENTS.md? They go into one marked block that links your repository's own standards; nothing else in AGENTS.md or CLAUDE.md changes. CLAUDE.md gets an `@AGENTS.md` line if it lacks one."
|
|
190
170
|
- Options: "Yes (recommended)", "Skip"
|
|
191
171
|
|
|
192
172
|
**2j2. Confirm rules generation:**
|
|
@@ -194,58 +174,12 @@ The skill-creator plugin from the official Claude store helps generate higher-qu
|
|
|
194
174
|
- Options: "Yes (recommended)", "Skip"
|
|
195
175
|
- Note: Rules complement AGENTS.md — they provide focused, file-type-scoped directives derived from your project's actual conventions.
|
|
196
176
|
|
|
197
|
-
**
|
|
198
|
-
|
|
199
|
-
Present ONLY patterns that were actually detected in steps 1g and 1h.
|
|
200
|
-
|
|
201
|
-
**Part 1: Architectural patterns (create-* skills)**
|
|
202
|
-
|
|
203
|
-
"I analyzed your codebase and found these architectural patterns:
|
|
204
|
-
|
|
205
|
-
| Pattern | Files Found | Location | Example |
|
|
206
|
-
|---------|-------------|----------|---------|
|
|
207
|
-
| Controller | 12 files | src/controllers/ | UserController.ts |
|
|
208
|
-
| Service | 8 files | src/services/ | AuthService.ts |
|
|
209
|
-
| Component | 25 files | src/components/ | Button.tsx |
|
|
210
|
-
|
|
211
|
-
Which patterns would you like `create-*` skills generated for?"
|
|
212
|
-
|
|
213
|
-
- Options: Multi-select checkboxes for each detected pattern (use AskUserQuestion with multiSelect: true)
|
|
214
|
-
- Include descriptions like: "Controller (12 files) - Generate `create-controller` skill"
|
|
215
|
-
- Plus "Other" option for patterns not detected but desired
|
|
216
|
-
|
|
217
|
-
**Part 2: Command skills (run-* skills)**
|
|
218
|
-
|
|
219
|
-
"I also found these runnable commands:
|
|
220
|
-
|
|
221
|
-
| Command | Source | Full Command | Variants |
|
|
222
|
-
|---------|--------|--------------|----------|
|
|
223
|
-
| build | package.json | npm run build | build:prod, build:dev |
|
|
224
|
-
| test | package.json | npm test | test:unit, test:e2e |
|
|
225
|
-
| lint | package.json | npm run lint | lint:fix |
|
|
226
|
-
| format | Makefile | make format | - |
|
|
227
|
-
|
|
228
|
-
Which commands would you like `run-*` skills generated for?"
|
|
229
|
-
|
|
230
|
-
- Options: Multi-select checkboxes for each detected command
|
|
231
|
-
- Include descriptions like: "test - Generate `run-tests` skill"
|
|
232
|
-
- Plus "Other" option for commands not detected
|
|
233
|
-
|
|
234
|
-
If no patterns/commands detected:
|
|
235
|
-
- Inform user: "No common patterns detected. Would you like to specify patterns manually?"
|
|
236
|
-
- Allow manual entry of pattern names/locations or command names
|
|
237
|
-
|
|
238
|
-
**2l. Git-ignore `.5/features/` folder:**
|
|
239
|
-
- "The `.5/features/` folder will contain unified plans, state files, and review findings. Would you like to add it to `.gitignore`?"
|
|
177
|
+
**2l. Git-ignore workflow folders:**
|
|
178
|
+
- "`.5/planning/` will hold your plans. `.5/features/` will hold implementation state and review findings. Which should git ignore?"
|
|
240
179
|
- Options:
|
|
241
|
-
1. "
|
|
242
|
-
2. "
|
|
243
|
-
|
|
244
|
-
**2m. Code Conventions:**
|
|
245
|
-
- "Generate `.5/CONVENTIONS.md` with coding conventions for this project? It will include a default set of strict rules (typing, code structure, naming, error handling, testing, and documentation standards) plus project-specific conventions derived from your codebase."
|
|
246
|
-
- Options:
|
|
247
|
-
1. "Yes (recommended)" → `conventions.generate: true`
|
|
248
|
-
2. "Skip" → `conventions.generate: false`
|
|
180
|
+
1. "Both (recommended)" — workflow artifacts stay local
|
|
181
|
+
2. "Only `.5/features/`" — share plans with your team, keep state local
|
|
182
|
+
3. "Neither" — track plans, state, and findings in git
|
|
249
183
|
|
|
250
184
|
### Step 2.5: Write config.json
|
|
251
185
|
|
|
@@ -259,7 +193,7 @@ Using the values gathered from Steps 1 and 2, write `.5/config.json` directly.
|
|
|
259
193
|
mkdir -p .5
|
|
260
194
|
```
|
|
261
195
|
|
|
262
|
-
**Schema:** Read `.claude/references/configure-tables.md` section "Config Schema" for the full JSON structure. Fill all values from user responses (including `rules.generate` from step 2j2
|
|
196
|
+
**Schema:** Read `.claude/references/configure-tables.md` section "Config Schema" for the full JSON structure. Fill all values from user responses (including `rules.generate` from step 2j2). Write with pretty-printed JSON. Read back to verify correctness.
|
|
263
197
|
|
|
264
198
|
**Update `.5/version.json` with configure timestamp:**
|
|
265
199
|
|
|
@@ -269,13 +203,20 @@ After writing config.json, update `.5/version.json` so the reconfigure reminder
|
|
|
269
203
|
3. Set `configuredAtCommit` to the current short commit hash injected at the top of this command
|
|
270
204
|
4. Write back `.5/version.json` preserving all other fields
|
|
271
205
|
|
|
206
|
+
**Point plan mode at `.5/planning/` (Claude Code only — skip on Codex):**
|
|
207
|
+
|
|
208
|
+
Native plan mode must save its plans in `.5/planning/`, where `/5:implement` finds them.
|
|
209
|
+
1. Read `.claude/settings.json` if it exists.
|
|
210
|
+
2. If `plansDirectory` is missing, set it to `".5/planning"` and keep every other key unchanged. Create the file if it does not exist.
|
|
211
|
+
3. If `plansDirectory` already holds a different value, ask whether to switch it to `.5/planning`. Explain that `/5:implement` finds plans only there, unless it gets a plan path.
|
|
212
|
+
4. Inform the user: "Plan mode now saves plans in `.5/planning/`"
|
|
213
|
+
|
|
272
214
|
**Apply `.gitignore` if selected:**
|
|
273
215
|
|
|
274
|
-
|
|
275
|
-
1. Check if `.gitignore` exists in the project root
|
|
276
|
-
2.
|
|
277
|
-
3.
|
|
278
|
-
4. Inform the user: "Added `.5/features/` to `.gitignore`"
|
|
216
|
+
For each folder the user chose to ignore in step 2l (`.5/planning/`, `.5/features/`):
|
|
217
|
+
1. Check if `.gitignore` exists in the project root — create it if not
|
|
218
|
+
2. Check if the folder is already listed — if not, append it on a new line
|
|
219
|
+
3. Inform the user which folders were added to `.gitignore`
|
|
279
220
|
|
|
280
221
|
**Always gitignore `.5/.reconfig-reminder`:**
|
|
281
222
|
|
|
@@ -285,7 +226,7 @@ Ensure `.5/.reconfig-reminder` is gitignored (it's a transient runtime flag that
|
|
|
285
226
|
|
|
286
227
|
### Step 3: Create Configuration Plan
|
|
287
228
|
|
|
288
|
-
Write `.5/
|
|
229
|
+
Write `.5/planning/CONFIGURE.md` containing all gathered data:
|
|
289
230
|
|
|
290
231
|
```markdown
|
|
291
232
|
---
|
|
@@ -297,131 +238,86 @@ created: {ISO-timestamp}
|
|
|
297
238
|
# Plan: CONFIGURE - Project Configuration
|
|
298
239
|
|
|
299
240
|
## Overview
|
|
300
|
-
|
|
241
|
+
Adds the workflow block to AGENTS.md, includes AGENTS.md from CLAUDE.md, and generates scoped rules. (config.json and the plans directory setting are already written.)
|
|
301
242
|
|
|
302
243
|
## What Changes
|
|
303
244
|
|
|
304
|
-
-
|
|
305
|
-
- Generate
|
|
306
|
-
-
|
|
245
|
+
- Write the workflow block into AGENTS.md, linking the repository's own standards.
|
|
246
|
+
- Generate scoped rules from detected conventions, when selected.
|
|
247
|
+
- Leave all existing AGENTS.md/CLAUDE.md content unchanged.
|
|
307
248
|
|
|
308
249
|
## Existing Patterns to Follow
|
|
309
250
|
|
|
310
|
-
- `.claude/skills/configure-
|
|
311
|
-
- `.claude/skills/configure-
|
|
251
|
+
- `.claude/skills/configure-agents-md/SKILL.md` - the AGENTS.md block and the CLAUDE.md include.
|
|
252
|
+
- `.claude/skills/configure-rules/SKILL.md` - rule generation behavior.
|
|
312
253
|
|
|
313
254
|
## Constraints
|
|
314
255
|
|
|
315
256
|
- config.json is already written by `/5:configure`.
|
|
316
|
-
-
|
|
317
|
-
-
|
|
257
|
+
- Repository standards win over the workflow's own rules. Generated rules must not restate or contradict them.
|
|
258
|
+
- Change nothing outside the foifi block in AGENTS.md, and only append `@AGENTS.md` to CLAUDE.md.
|
|
259
|
+
- Never rewrite or delete existing `.5/*.md` docs. Teams may maintain them.
|
|
318
260
|
|
|
319
261
|
## Scope
|
|
320
262
|
|
|
321
263
|
### In
|
|
322
264
|
|
|
323
|
-
-
|
|
324
|
-
- `.5/index/` and rebuild script.
|
|
325
|
-
- AGENTS.md plus CLAUDE.md shim.
|
|
326
|
-
- Selected create/run skills.
|
|
265
|
+
- The foifi block in AGENTS.md plus the CLAUDE.md include.
|
|
327
266
|
- Selected scoped rules.
|
|
328
267
|
|
|
329
268
|
### Out
|
|
330
269
|
|
|
331
270
|
- Changing preferences already saved in `.5/config.json`.
|
|
271
|
+
- Generated architecture, testing, concerns, or conventions docs, codebase indexes, and project-specific skills.
|
|
332
272
|
|
|
333
273
|
## Acceptance Criteria
|
|
334
274
|
|
|
335
|
-
- [ ]
|
|
336
|
-
- [ ]
|
|
337
|
-
- [ ] `.
|
|
338
|
-
- [ ]
|
|
339
|
-
- [ ] `.5/index/rebuild-index.sh` exists and rebuilds the index.
|
|
340
|
-
- [ ] `.5/index/README.md` documents generated index files.
|
|
341
|
-
- [ ] `AGENTS.md` references created `.5/` files and the index rebuild rule.
|
|
342
|
-
- [ ] `CLAUDE.md` contains only `@AGENTS.md`.
|
|
343
|
-
- [ ] Selected project-specific skills are generated in `.claude/skills/`.
|
|
344
|
-
- [ ] Selected scoped rules are generated in `.claude/rules/`.
|
|
345
|
-
- [ ] User-written AGENTS.md/CLAUDE.md content is preserved.
|
|
275
|
+
- [ ] The foifi block in `AGENTS.md` links every repository standard listed below.
|
|
276
|
+
- [ ] `CLAUDE.md` includes `@AGENTS.md`.
|
|
277
|
+
- [ ] Selected scoped rules are generated in `.claude/rules/` — on Codex, as the `File-Scoped Rules` section in the foifi block of `AGENTS.md` instead.
|
|
278
|
+
- [ ] Content outside the foifi block in AGENTS.md and CLAUDE.md is byte-for-byte unchanged.
|
|
346
279
|
|
|
347
280
|
## Decisions
|
|
348
281
|
|
|
349
|
-
- [DECIDED] Use the detected project type, build command, test command, ticket settings,
|
|
350
|
-
- [FLEXIBLE] Omit optional
|
|
282
|
+
- [DECIDED] Use the detected project type, build command, test command, ticket settings, and commit convention from this configure session.
|
|
283
|
+
- [FLEXIBLE] Omit optional rules when no useful project knowledge exists.
|
|
351
284
|
- [DEFERRED] Further preference changes; rerun `/5:configure` for those.
|
|
352
285
|
|
|
353
286
|
## Module Impact
|
|
354
287
|
|
|
355
288
|
| Module/Area | Impact |
|
|
356
289
|
|-------------|--------|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
| `.claude/skills/` | Create selected project-specific skills. |
|
|
360
|
-
| `.claude/rules/` | Create selected scoped rules. |
|
|
290
|
+
| `AGENTS.md` / `CLAUDE.md` | Add or refresh the foifi block; include AGENTS.md from CLAUDE.md. |
|
|
291
|
+
| `.claude/rules/` (Codex: `AGENTS.md`) | Create selected scoped rules. |
|
|
361
292
|
|
|
362
293
|
## Component Checklist
|
|
363
294
|
|
|
364
295
|
| Component | Action | Target Path | Intent |
|
|
365
296
|
|-----------|--------|-------------|--------|
|
|
366
|
-
| configure
|
|
367
|
-
| configure
|
|
297
|
+
| configure agents md | modify | `AGENTS.md` | Write the foifi block into AGENTS.md and include it from CLAUDE.md, linking the repository standards. |
|
|
298
|
+
| configure rules | create | `.claude/rules/` (Codex: `AGENTS.md`) | After configure agents md: generate scoped rules from detected conventions — on Codex, as the `File-Scoped Rules` section in the foifi block of `AGENTS.md`. |
|
|
368
299
|
|
|
369
300
|
## Technical Notes
|
|
370
301
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
**Create documentation files in `.5/` folder:**
|
|
374
|
-
- `.5/ARCHITECTURE.md` - Architecture pattern, layers & data flow, key abstractions, non-obvious conventions, where to add new code
|
|
375
|
-
- `.5/TESTING.md` - Test organization, patterns, mocking approach, gotchas
|
|
376
|
-
- `.5/CONCERNS.md` - Tech debt, known issues, security/integration/performance notes (**only if concerns found — skip file entirely if nothing detected**)
|
|
377
|
-
- `.5/CONVENTIONS.md` - Default strict coding conventions plus project-specific conventions derived from codebase analysis (**only when `conventions.generate` is true**)
|
|
378
|
-
|
|
379
|
-
**Create a rebuildable codebase index in `.5/index/`:**
|
|
380
|
-
- Generate a repository-local script at `.5/index/rebuild-index.sh`
|
|
381
|
-
- Generate multiple focused Markdown index files in `.5/index/` plus `.5/index/README.md`
|
|
382
|
-
- Keep the index generic and adapted to the actual project
|
|
383
|
-
- Skip empty categories; do not create placeholder index files
|
|
384
|
-
- Re-running the script should fully refresh the index in place
|
|
385
|
-
|
|
386
|
-
**Create AGENTS.md** (provider-agnostic instructions file):
|
|
387
|
-
- Use `.claude/templates/AGENTS.md` as the source template
|
|
388
|
-
- Fill `{PROJECT_OVERVIEW}` with 1-2 sentences from README/package.json
|
|
389
|
-
- Fill `{BUILD_RUN_COMMANDS}` with build, test, and other detected commands
|
|
390
|
-
- Fill `{PROJECT_DOCUMENTATION_LINKS}` with whichever `.5/` documentation files were created
|
|
391
|
-
- Fill `{CODEBASE_INDEX_LINKS}` with `.5/index/README.md`, generated index files, and `.5/index/rebuild-index.sh`
|
|
392
|
-
- Fill `{CUSTOM_DOCUMENTATION}` with preserved user-authored sections under `## Custom Documentation`; remove the placeholder if there is no custom content
|
|
393
|
-
- Preserve static template sections exactly as written, including skill usage, commit messages, workflow rules, coding guidelines, simplicity, testing, surgical changes, goal-driven execution, and index freshness
|
|
394
|
-
|
|
395
|
-
**Create CLAUDE.md shim:**
|
|
396
|
-
- Contains only `@AGENTS.md` (Claude Code include syntax)
|
|
397
|
-
|
|
398
|
-
**Migrate and preserve existing content:**
|
|
399
|
-
- If AGENTS.md already exists, preserve user-written custom sections
|
|
400
|
-
- If CLAUDE.md exists with real content (not just `@AGENTS.md`), migrate content to AGENTS.md and replace CLAUDE.md with the shim
|
|
401
|
-
|
|
402
|
-
### Requirement 2: Generate Project-Specific Skills
|
|
403
|
-
Handled by: `configure-skills`
|
|
404
|
-
|
|
405
|
-
**Create-* skills** for each user-selected architectural pattern:
|
|
406
|
-
- Skill name: `create-{pattern}` (e.g., `create-controller`, `create-service`)
|
|
407
|
-
- Analyze 2-3 existing files, extract conventions, generate SKILL.md with project-specific template
|
|
408
|
-
- Set `user-invocable: true`, `model: haiku`
|
|
302
|
+
### Requirement 1: Write AGENTS.md
|
|
303
|
+
Handled by: `configure-agents-md`
|
|
409
304
|
|
|
410
|
-
**
|
|
411
|
-
-
|
|
412
|
-
- Document exact command syntax, variants, flags
|
|
413
|
-
- Set `user-invocable: true`, `model: haiku`
|
|
305
|
+
**Repository standards found:**
|
|
306
|
+
- {one bullet per path from step 1e2, or "none found"}
|
|
414
307
|
|
|
415
|
-
|
|
308
|
+
**Write the foifi block into AGENTS.md** as `configure-agents-md` describes:
|
|
309
|
+
- Fill the template from `.claude/templates/AGENTS.md`: build/run commands, the commit message rule, the repository standards above, and links to existing `.5/*.md` docs
|
|
310
|
+
- Never change content outside the block; append `@AGENTS.md` to CLAUDE.md only when it lacks that line
|
|
416
311
|
|
|
417
|
-
### Requirement
|
|
418
|
-
Handled by: `configure-
|
|
312
|
+
### Requirement 2: Generate Scoped Rules (if selected)
|
|
313
|
+
Handled by: `configure-rules`. Runs after Requirement 1: on Codex, Codex reads only `AGENTS.md`, so the rules go into its foifi block instead of rule files.
|
|
419
314
|
|
|
420
315
|
Generate `.claude/rules/` files with project-specific conventions scoped to relevant file types.
|
|
421
316
|
Rules are concise directives (15-40 lines, NOT documentation) derived from codebase analysis.
|
|
317
|
+
They must not restate or contradict the repository standards above.
|
|
422
318
|
Only generate rules for patterns that were actually detected:
|
|
423
319
|
- `code-style.md` — naming, formatting, import conventions (scoped to source files)
|
|
424
|
-
- `testing.md` — test patterns, mocking, fixtures (scoped to test files)
|
|
320
|
+
- `testing.md` — test patterns, mocking, fixtures, gotchas (scoped to test files)
|
|
425
321
|
- `api-patterns.md` — API conventions, error handling (scoped to API/route/controller files)
|
|
426
322
|
- `dependencies.md` — dependency usage patterns, env var conventions (unconditional)
|
|
427
323
|
|
|
@@ -430,19 +326,19 @@ Only generate rules for patterns that were actually detected:
|
|
|
430
326
|
1. Run `/5:implement CONFIGURE`.
|
|
431
327
|
```
|
|
432
328
|
|
|
433
|
-
**Important:** Use `mkdir -p .5/
|
|
329
|
+
**Important:** Use `mkdir -p .5/planning` before writing the plan.
|
|
434
330
|
|
|
435
331
|
### Step 4: Guide User to Next Phase
|
|
436
332
|
|
|
437
333
|
Tell the user:
|
|
438
334
|
|
|
439
335
|
1. "Configuration saved to `.5/config.json`"
|
|
440
|
-
2. "Configuration plan written to `.5/
|
|
336
|
+
2. "Configuration plan written to `.5/planning/CONFIGURE.md`"
|
|
441
337
|
3. "Next steps:"
|
|
442
338
|
- "Run `/clear` to reset context"
|
|
443
339
|
- "Then run `/5:implement CONFIGURE`"
|
|
444
340
|
4. "After that: Run `/5:review` if you want a review of generated files"
|
|
445
341
|
|
|
446
342
|
## Related Documentation
|
|
447
|
-
- [configure-
|
|
448
|
-
- [configure-
|
|
343
|
+
- [configure-agents-md skill](../../skills/configure-agents-md/SKILL.md)
|
|
344
|
+
- [configure-rules skill](../../skills/configure-rules/SKILL.md)
|
package/src/commands/5/eject.md
CHANGED
|
@@ -54,7 +54,6 @@ Tell the user what ejecting means:
|
|
|
54
54
|
> For Codex installs:
|
|
55
55
|
> - `.codex/skills/5-update/` (update skill)
|
|
56
56
|
> - `.codex/skills/5-eject/` (this skill)
|
|
57
|
-
> - `.codex/instructions.md` is removed only if it is workflow-managed and no longer needed for remaining installed workflow files
|
|
58
57
|
>
|
|
59
58
|
> All other workflow files remain untouched. To restore updates later, reinstall with `npx foifi`.
|
|
60
59
|
|