5-phase-workflow 1.9.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +68 -420
  2. package/bin/install.js +294 -64
  3. package/bin/sync-agents.js +50 -11
  4. package/docs/findings.md +3 -3
  5. package/docs/workflow-guide.md +110 -1046
  6. package/package.json +6 -5
  7. package/src/agents/step-executor-agent.md +49 -0
  8. package/src/agents/step-orchestrator-agent.md +111 -0
  9. package/src/agents/verification-agent.md +78 -0
  10. package/src/commands/5/address-review-findings.md +69 -403
  11. package/src/commands/5/apply-review-findings.md +66 -0
  12. package/src/commands/5/configure.md +110 -76
  13. package/src/commands/5/discuss-feature.md +47 -57
  14. package/src/commands/5/eject.md +7 -6
  15. package/src/commands/5/implement.md +202 -0
  16. package/src/commands/5/plan.md +164 -0
  17. package/src/commands/5/reconfigure.md +30 -29
  18. package/src/commands/5/reply-pr-comments.md +46 -0
  19. package/src/commands/5/review.md +95 -0
  20. package/src/commands/5/split.md +190 -0
  21. package/src/commands/5/synchronize-agents.md +4 -4
  22. package/src/commands/5/triage-pr-comments.md +70 -0
  23. package/src/commands/5/update.md +8 -8
  24. package/src/hooks/check-updates.js +50 -7
  25. package/src/hooks/plan-guard.js +28 -22
  26. package/src/hooks/statusline.js +50 -4
  27. package/src/skills/configure-docs-index/SKILL.md +16 -20
  28. package/src/skills/configure-skills/SKILL.md +12 -12
  29. package/src/templates/AGENTS.md +94 -0
  30. package/src/templates/workflow/FIX-PLAN.md +1 -1
  31. package/src/templates/workflow/PLAN-COMPACT.md +42 -0
  32. package/src/templates/workflow/PLAN.md +58 -34
  33. package/src/templates/workflow/REVIEW-FINDINGS.md +7 -16
  34. package/src/templates/workflow/REVIEW-SUMMARY.md +5 -0
  35. package/src/templates/workflow/STATE.json +32 -3
  36. package/src/agents/component-executor.md +0 -57
  37. package/src/commands/5/implement-feature.md +0 -381
  38. package/src/commands/5/plan-feature.md +0 -293
  39. package/src/commands/5/plan-implementation.md +0 -333
  40. package/src/commands/5/quick-implement.md +0 -375
  41. package/src/commands/5/review-code.md +0 -212
  42. package/src/commands/5/verify-implementation.md +0 -277
  43. package/src/templates/workflow/FEATURE-SPEC.md +0 -100
  44. package/src/templates/workflow/VERIFICATION-REPORT.md +0 -103
@@ -27,13 +27,15 @@ const log = {
27
27
 
28
28
  const WORKFLOW_MANAGED_SKILLS = new Set([
29
29
  'configure-docs-index',
30
- 'configure-project',
31
30
  'configure-skills',
32
31
  'generate-readme'
33
32
  ]);
34
33
 
35
34
  const WORKFLOW_MANAGED_AGENTS = new Set([
36
- 'component-executor.md'
35
+ 'component-executor.md',
36
+ 'step-executor-agent.md',
37
+ 'step-orchestrator-agent.md',
38
+ 'verification-agent.md'
37
39
  ]);
38
40
 
39
41
  const RULES_SYNC_START = '<!-- 5-sync:rules-start -->';
@@ -56,9 +58,30 @@ function extractFrontmatterField(frontmatter, field) {
56
58
  }
57
59
 
58
60
  function claudeToCodexContent(content) {
59
- return content
61
+ const converted = content
60
62
  .replace(/\/5:([a-z0-9-]+)/g, (_, name) => `$5-${name}`)
61
63
  .replace(/\.claude\//g, '.codex/');
64
+ return convertClaudeSetupCommandsToCodexNotes(converted);
65
+ }
66
+
67
+ function convertClaudeSetupCommandsToCodexNotes(content) {
68
+ return content
69
+ .replace(
70
+ /1\. "Install now \(recommended\)" — run `claude mcp add context7 -- npx -y @anthropic-ai\/claude-code-mcp-server-context7` via Bash/g,
71
+ '1. "Install now" — not supported automatically in Codex; install Context7 using your Codex MCP setup outside this workflow, then rerun configuration'
72
+ )
73
+ .replace(
74
+ /- If user selects "Install now": execute the install command/g,
75
+ '- If user selects "Install now": explain that Codex cannot run the Claude Code installer command; leave `tools.context7.available = false` unless Context7 is already detected'
76
+ )
77
+ .replace(
78
+ /1\. "Install now \(recommended\)" — run `claude plugin install skill-creator@claude-plugins-official` via Bash/g,
79
+ '1. "Install now" — not supported automatically in Codex; install an equivalent skill authoring workflow outside this command, then rerun configuration'
80
+ )
81
+ .replace(
82
+ /- If user selects "Install now": execute the install command, then set `tools\.skillCreator\.available = true` in the config/g,
83
+ '- If user selects "Install now": explain that Codex cannot run the Claude Code plugin installer; leave `tools.skillCreator.available = false` unless an equivalent tool is already detected'
84
+ );
62
85
  }
63
86
 
64
87
  function codexToClaudeContent(content) {
@@ -81,8 +104,10 @@ This skill was authored for Claude Code. Map these tool references:
81
104
  | Claude Code | Codex Equivalent |
82
105
  |-------------|------------------|
83
106
  | \`AskUserQuestion\` | Ask the user directly in conversation |
84
- | \`Agent(subagent_type="Explore")\` | Research the codebase yourself using available tools |
85
- | \`Agent(prompt="...")\` | \`spawn_agent(message="...")\` |
107
+ | \`Agent(subagent_type="Explore")\` | \`spawn_agent(agent_type="explorer", model="gpt-5.4-mini", reasoning_effort="low", message="...")\` |
108
+ | \`Agent(prompt="...", model="haiku")\` | \`spawn_agent(model="gpt-5.4-mini", reasoning_effort="low", message="...")\` |
109
+ | \`Agent(prompt="...", model="sonnet")\` | \`spawn_agent(model="gpt-5.4", reasoning_effort="medium", message="...")\` |
110
+ | \`Agent(prompt="...")\` | \`spawn_agent(model="gpt-5.4-mini", reasoning_effort="low", message="...")\` unless the prompt explicitly requires complex reasoning |
86
111
  | \`Read\` | \`read_file\` |
87
112
  | \`Write\` | \`write_file\` |
88
113
  | \`Edit\` | \`patch\` |
@@ -91,6 +116,18 @@ This skill was authored for Claude Code. Map these tool references:
91
116
  | \`Grep\` | \`grep\` / \`search\` |
92
117
  | \`TaskCreate/TaskUpdate\` | Track progress internally |
93
118
  | \`EnterPlanMode\` | Not available — use structured output instead |
119
+
120
+ ## Codex Token Budget
121
+ - Default to \`gpt-5.4-mini\` with \`reasoning_effort: low\` for exploration, orchestration, simple implementation, and mechanical file edits.
122
+ - Use \`gpt-5.4\` with \`reasoning_effort: medium\` only for complex logic, cross-module behavior, security-sensitive changes, data migrations, final verification with meaningful logic review, or retries after failure.
123
+ - Use stronger models only when a previous cheaper attempt failed for reasoning reasons.
124
+ - Keep the parent skill context lean: delegate read-heavy exploration to explorer agents and pass only compact findings, target paths, pattern references, and command summaries between agents.
125
+
126
+ ## Guard Rules
127
+ During the planning phase ($5-plan):
128
+ - Do NOT write source code.
129
+ - Do NOT write files outside \`.5/\`.
130
+ - Do NOT spawn implementation agents.
94
131
  </codex_skill_adapter>`;
95
132
  }
96
133
 
@@ -193,11 +230,13 @@ function findProjectRoot() {
193
230
  }
194
231
 
195
232
  function isClaudeInstalled(root) {
196
- return fs.existsSync(path.join(root, '.claude', 'commands', '5', 'plan-feature.md'));
233
+ return fs.existsSync(path.join(root, '.claude', 'commands', '5', 'plan.md')) ||
234
+ fs.existsSync(path.join(root, '.claude', 'commands', '5', 'plan-feature.md'));
197
235
  }
198
236
 
199
237
  function isCodexInstalled(root) {
200
- return fs.existsSync(path.join(root, '.codex', 'skills', '5-plan-feature', 'SKILL.md'));
238
+ return fs.existsSync(path.join(root, '.codex', 'skills', '5-plan', 'SKILL.md')) ||
239
+ fs.existsSync(path.join(root, '.codex', 'skills', '5-plan-feature', 'SKILL.md'));
201
240
  }
202
241
 
203
242
  function getClaudeUserSkills(root) {
@@ -573,20 +612,20 @@ function main() {
573
612
 
574
613
  if (!hasClaude && !hasCodex) {
575
614
  log.error('No runtime installations found.');
576
- log.info('Install Claude Code: npx 5-phase-workflow');
577
- log.info('Install Codex: npx 5-phase-workflow --codex');
615
+ log.info('Install Claude Code: npx foifi');
616
+ log.info('Install Codex: npx foifi --codex');
578
617
  process.exit(1);
579
618
  }
580
619
 
581
620
  if (!hasClaude) {
582
621
  log.error('Claude Code runtime not installed.');
583
- log.info('Install with: npx 5-phase-workflow');
622
+ log.info('Install with: npx foifi');
584
623
  process.exit(1);
585
624
  }
586
625
 
587
626
  if (!hasCodex) {
588
627
  log.error('Codex runtime not installed.');
589
- log.info('Install with: npx 5-phase-workflow --codex');
628
+ log.info('Install with: npx foifi --codex');
590
629
  process.exit(1);
591
630
  }
592
631
 
package/docs/findings.md CHANGED
@@ -1,8 +1,8 @@
1
- # Critical Analysis: 5-Phase Workflow System
1
+ # Critical Analysis: dev-workflow System
2
2
 
3
3
  ## Executive Summary
4
4
 
5
- The 5-Phase Workflow is an ambitious, well-intentioned system for structured AI-assisted feature development. While it demonstrates sophisticated architectural thinking, it suffers from significant over-engineering and complexity that may undermine its practical utility. This analysis identifies strengths, weaknesses, and concrete opportunities for improvement.
5
+ dev-workflow is an ambitious, well-intentioned system for structured AI-assisted feature development. While it demonstrates sophisticated architectural thinking, it suffers from significant over-engineering and complexity that may undermine its practical utility. This analysis identifies strengths, weaknesses, and concrete opportunities for improvement.
6
6
 
7
7
  ---
8
8
 
@@ -343,7 +343,7 @@ Better: If no matching skill, use direct Write/Edit with the prompt
343
343
 
344
344
  ## Conclusion
345
345
 
346
- The 5-Phase Workflow demonstrates thoughtful design around token efficiency, state management, and separation of concerns. However, it has evolved into an over-engineered system that creates more friction than it removes.
346
+ dev-workflow demonstrates thoughtful design around token efficiency, state management, and separation of concerns. However, it has evolved into an over-engineered system that creates more friction than it removes.
347
347
 
348
348
  The core insight - that AI-assisted development benefits from structured phases - is valid. But the implementation has become so complex that:
349
349