Skip to content

Commit c0c76ef

Browse files
committed
Initial commit
1 parent 1789f85 commit c0c76ef

37 files changed

+1488
-0
lines changed

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Codex Feature-Driven-Flow
2+
3+
Script-free Codex package for one-command feature workflow orchestration with a rules-based extension system.
4+
5+
## Includes
6+
7+
1. Skills:
8+
- `skills/feature-driven-flow`
9+
- `skills/fdf-code-explorer`
10+
- `skills/fdf-implementation-planner`
11+
- `skills/fdf-change-auditor`
12+
2. Prompt:
13+
- `prompts/feature-driven-flow.md`
14+
3. Shared rules:
15+
- `skills/feature-driven-flow/extensions/rules/*.md`
16+
4. Optional repository-local rules:
17+
- `<repo>/.codex/feature-driven-flow/rules/*.md`
18+
19+
## Install
20+
21+
1. Ensure Codex CLI works:
22+
```text
23+
codex --help
24+
```
25+
2. Resolve `CODEX_HOME`:
26+
- Windows default: `%USERPROFILE%\\.codex`
27+
- macOS/Linux default: `~/.codex`
28+
3. Create folders:
29+
- `CODEX_HOME/skills`
30+
- `CODEX_HOME/prompts`
31+
4. Copy:
32+
- `codex/feature-driven-flow/skills/*` -> `CODEX_HOME/skills/`
33+
- `codex/feature-driven-flow/prompts/*.md` -> `CODEX_HOME/prompts/`
34+
5. Restart Codex session.
35+
36+
## Use
37+
38+
Run the prompt:
39+
40+
```text
41+
/prompts:feature-driven-flow Implement financial services
42+
```
43+
44+
Select shared rules in the request:
45+
46+
```text
47+
/prompts:feature-driven-flow Implement financial services using rules scope-baseline, explore-baseline, clarify-policy, architect-policy, implement-baseline, verify-policy, summarize-policy, security-baseline
48+
```
49+
50+
Repository-local baseline rule (auto-applied when present):
51+
52+
```text
53+
<repo>/.codex/feature-driven-flow/rules/project-baseline.md
54+
```
55+
56+
At Scope, Codex infers execution context and proposes a phase-by-phase rule matrix. The user can accept or adjust before Explore.
57+
58+
## Core vs Rules
59+
60+
Core is a light skeleton that enforces:
61+
62+
1. Seven-phase order.
63+
2. Clarify-before-Architect/Implement gate.
64+
3. Explicit approval before Implement.
65+
4. Verify before Summarize.
66+
5. Decision UX (numbered options with recommended default).
67+
6. Checklist-driven gates where phase checklist items are derived from active rule `checks`.
68+
69+
Everything else should live in rules.
70+
71+
## Simple Rule Model
72+
73+
Each rule should define:
74+
75+
1. `id`
76+
2. `title`
77+
3. `applies_to_phases`
78+
4. `intent`
79+
5. `guidance`
80+
6. `checks` (also used to derive phase checklist items)
81+
7. `outputs`
82+
8. `examples` (optional)
83+
84+
## Rule Precedence
85+
86+
1. Core skeleton invariants.
87+
2. Repository policy constraints in `AGENTS.md`.
88+
3. User-confirmed phase-by-phase rule matrix.
89+
4. Within active rules, repository-local rules refine shared rules.
90+
91+
## Diagnostics
92+
93+
1. If `codex` is not found, run `codex --help`.
94+
2. If prompt does not appear, confirm `CODEX_HOME/prompts/feature-driven-flow.md` exists and restart.
95+
3. If shared rules are not detected, check `CODEX_HOME/skills/feature-driven-flow/extensions/rules/`.
96+
4. If local baseline rule is not applied, check `<repo>/.codex/feature-driven-flow/rules/project-baseline.md`.

prompts/feature-driven-flow.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Run the feature-driven-flow workflow using the installed `feature-driven-flow` skill.
2+
3+
Task:
4+
$ARGUMENTS
5+
6+
Requirements:
7+
1. Execute all 7 phases in fixed order; do not skip or reorder phases, and honor phase gates/hard stops before advancing.
8+
2. Keep core skeleton invariants intact (clarify gate, approval gate, verify-before-summary).
9+
3. Infer execution context from request text, repository signals, and `AGENTS.md`.
10+
4. In Scope, propose a phase-by-phase rule matrix with one recommended baseline set.
11+
5. Ask user to accept or adjust rules before moving to Explore.
12+
6. Apply rules per phase using extension precedence: selected shared rules, then applicable repository-local rules (including local baseline when present).
13+
7. If rule guidance conflicts or is ambiguous, ask user to choose.
14+
8. Treat `AGENTS.md` policy constraints as mandatory; if guidance conflicts, follow `AGENTS.md` and record the override.
15+
9. Use specialist skills when selected rules require them:
16+
- `fdf-code-explorer`
17+
- `fdf-implementation-planner`
18+
- `fdf-change-auditor`
19+
10. At every decision point, present numbered options, mark one as recommended, and ask the user to reply with a number or custom choice.

skills/fdf-change-auditor/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: fdf-change-auditor
3+
description: Audit implementation changes for correctness and reliability. Use when validating provided diffs or ranges and producing evidence-backed findings before closure.
4+
---
5+
6+
# FDF Change Auditor
7+
8+
Audit changed code with high precision and low noise.
9+
10+
## Audit Scope
11+
12+
1. Audit the provided diff or range.
13+
2. If no diff/range is provided, follow active Verify-phase rule policy for default scope.
14+
15+
## Process
16+
17+
1. Verify behavior correctness.
18+
2. Inspect edge cases and failure behavior.
19+
3. Inspect quality dimensions required by active Verify-phase rules.
20+
4. Suggest the minimal safe remediation set.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 1
2+
policy:
3+
allow_implicit_invocation: true
4+
interface:
5+
display_name: FDF Change Auditor
6+
short_description: Audit implementation diffs for correctness and reliability using active verify rules.
7+
default_prompt: Audit the provided changes, collect evidence-backed findings, and propose minimal safe remediation.

skills/fdf-code-explorer/SKILL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: fdf-code-explorer
3+
description: Trace how the current repository behaves for a target feature. Use for discovery/behavior tracing of trigger points, execution paths, data contracts, system boundaries, and must-read files before changing code.
4+
---
5+
6+
# FDF Code Explorer
7+
8+
Build a precise behavior-trace view of the current implementation landscape.
9+
10+
## Process
11+
12+
1. Discover where behavior starts (API handlers, UI actions, jobs, commands).
13+
2. Trace execution branches through domain logic to infrastructure seams.
14+
3. Capture repository behavior signals required by active Explore-phase rules.
15+
4. Return a concise change-surface brief and dependency map.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 1
2+
policy:
3+
allow_implicit_invocation: true
4+
interface:
5+
display_name: FDF Code Explorer
6+
short_description: Discovery/behavior tracing for trigger points, runtime paths, and boundaries in the target feature area.
7+
default_prompt: Trace the current implementation behavior and return a change-surface brief with key files.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: fdf-implementation-planner
3+
description: Turn clarified requirements into an implementation strategy anchored in repository realities. Use when defining module boundaries, interface updates, file-level work maps, and sequencing.
4+
---
5+
6+
# FDF Implementation Planner
7+
8+
Produce an actionable delivery blueprint.
9+
10+
## Process
11+
12+
1. Reconcile user requirements with codebase constraints.
13+
2. Build implementation blueprint details required by active Architect-phase rules.
14+
3. Return concrete, evidence-backed planning outputs for the selected architecture direction.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 1
2+
policy:
3+
allow_implicit_invocation: true
4+
interface:
5+
display_name: FDF Implementation Planner
6+
short_description: Produce an implementation strategy with explicit module and file-level changes.
7+
default_prompt: Create a delivery blueprint with strategy options, boundary decisions, and ordered execution steps.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: feature-driven-flow
3+
description: Coordinate a structured 7-phase feature delivery workflow in Codex for non-trivial work. Use when a task needs scoped intent, repository behavior tracing, ambiguity resolution, design choices, controlled implementation, assurance, and end-state reporting.
4+
---
5+
6+
# Feature-Driven-Flow Conductor
7+
8+
Execute feature delivery in seven phases with explicit checkpoints.
9+
10+
## Workflow Contract
11+
12+
1. Run Phase 1 Scope.
13+
2. Run Phase 2 Explore.
14+
3. Run Phase 3 Clarify.
15+
4. Run Phase 4 Architect.
16+
5. Run Phase 5 Implement.
17+
6. Run Phase 6 Verify.
18+
7. Run Phase 7 Summarize.
19+
20+
Read `references/phase-contracts.md` before running phases.
21+
Read `references/checklists.md` before finalizing.
22+
Read `references/extension-system.md` and `references/rule-model.md` before applying rules.
23+
24+
## Core Skeleton Invariants
25+
26+
1. Do not change phase order.
27+
2. Do not begin Implement without explicit user approval.
28+
3. Do not leave Clarify while decision-critical ambiguity remains unresolved.
29+
4. Do not close workflow before Verify disposition and final Summarize output.
30+
31+
## Interactive Decision UX
32+
33+
1. When a user decision is needed, provide 2-4 numbered options.
34+
2. Mark one option as recommended and include a one-line rationale/tradeoff.
35+
3. Ask the user to reply with the option number or a custom answer.
36+
4. Do not move forward until the decision is explicitly captured.
37+
38+
## Rule System
39+
40+
1. Use one extension dimension: rules.
41+
2. Infer execution context from request text, repository signals, and `AGENTS.md`.
42+
3. In Scope, propose a phase-by-phase rule matrix with a recommended baseline set.
43+
4. Ask user to accept or adjust the proposed rule matrix before Explore.
44+
5. Apply rules in this order:
45+
- selected shared rules in `extensions/rules/*.md`
46+
- repository-local rules in `.codex/feature-driven-flow/rules/*.md`
47+
6. If rules disagree, ask user which direction to follow.
48+
7. `AGENTS.md` policy constraints remain mandatory.
49+
50+
## Phase Skeleton
51+
52+
### Phase 1 Scope
53+
54+
1. Open a phase tracker for all seven phases.
55+
2. Execute active Scope-phase rules.
56+
3. Capture user-confirmed rule matrix before Phase 2.
57+
58+
### Phase 2 Explore
59+
60+
1. Execute active Explore-phase rules.
61+
62+
### Phase 3 Clarify
63+
64+
1. Execute active Clarify-phase rules.
65+
66+
### Phase 4 Architect
67+
68+
1. Execute active Architect-phase rules.
69+
70+
### Phase 5 Implement
71+
72+
1. Confirm explicit approval.
73+
2. Execute active Implement-phase rules.
74+
75+
### Phase 6 Verify
76+
77+
1. Execute active Verify-phase rules.
78+
79+
### Phase 7 Summarize
80+
81+
1. Execute active Summarize-phase rules.
82+
2. Close phase tracker.
83+
84+
## Output Templates
85+
86+
Use templates in:
87+
88+
1. `templates/clarifying-questions.md`
89+
2. `templates/architecture-options.md`
90+
3. `templates/review-report.md`
91+
4. `templates/structured-phase-output.md`
92+
5. `templates/test-strategy-gate.md`
93+
6. `templates/release-readiness-gate.md`
94+
7. `templates/execution-metrics.md`
95+
8. `extensions/rules/*.md`
96+
9. `.codex/feature-driven-flow/rules/*.md` (when present)
97+
98+
## Tooling Expectations
99+
100+
1. Prefer fast file search and targeted reads.
101+
2. Keep outputs concise but complete.
102+
3. Enforce phase checkpoints through explicit outputs and decisions.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 1
2+
policy:
3+
allow_implicit_invocation: false
4+
interface:
5+
display_name: FDF Feature-Driven-Flow Conductor
6+
short_description: Coordinate a 7-phase workflow with explicit decisions and phase-by-phase rule selection.
7+
default_prompt: Deliver this feature with feature-driven-flow, propose a phase-by-phase rule matrix, and enforce core checkpoints.

0 commit comments

Comments
 (0)