Version: 1.1.0
Feature-Driven-Flow is a markdown-first AI delivery framework for non-trivial changes.
It runs a fixed seven-phase workflow, compiles selected policies into a concrete rule matrix, and records auditable outputs through explicit gates.
- Install FDF prompts + skill into
CODEX_HOME:skills/* -> $CODEX_HOME/skills/prompts/*.md -> $CODEX_HOME/prompts/(commands arefdf-*, entrypoint isfdf-start)
- Run FDF:
/prompts:fdf-start Create a simple console Java app that prints factorial(n). Use JDK 25 and Maven. Read n from argv.
- (Optional) Validate this repo before changes:
pwsh -NoProfile -File tools/run-validation-cycle.ps1- A stable micro-core conductor with hard invariants.
- A rule system (
.mdfiles) for phase-scoped behavior. - Optional profile selection that compiles into a per-phase rule matrix.
- Optional Effective Rule Matrix reuse at Scope (file path or inline block input).
- Optional Effective Instructions reuse (directory bundle or compact file).
- Pack-based asset bundles (rules/profiles/templates/references).
- JSON settings with global defaults and repo-local overrides.
- Optional persistence and async handoff artifacts.
- Generated manifests for fast asset discovery.
- Validation tooling and governance playbooks.
FDF always runs in this order:
Scope -> Explore -> Clarify -> Architect -> Implement -> Verify -> Summarize
Mermaid overview:
flowchart LR
S[Scope] --> E[Explore] --> C[Clarify] --> A[Architect] --> I[Implement] --> V[Verify] --> Z[Summarize]
C -. clarify gate .- C
I -. approval gate .- I
V -. verify-before-close .- V
Core invariants:
- Do not reorder or skip phases.
- Do not leave Clarify with decision-critical ambiguity.
- Do not start Implement without explicit user approval.
- Do not close before Verify and Summarize.
Entry points:
- Prompt:
prompts/fdf-start.md - Conductor skill:
skills/feature-driven-flow/SKILL.md
- Prompts (commands):
prompts/fdf-*.md - Conductor skill:
skills/feature-driven-flow/SKILL.md - Rules/profiles:
skills/feature-driven-flow/extensions/{rules,profiles}/*.md - Packs:
skills/feature-driven-flow/packs/<pack_id>/... - Schemas:
schemas/*.json - Tools:
tools/*.ps1
- Core shared rules:
skills/feature-driven-flow/extensions/rules/*.md - Core shared profiles:
skills/feature-driven-flow/extensions/profiles/*.md - Optional packs:
skills/feature-driven-flow/packs/<pack_id>/... - Repo-local overlays in target repositories:
<repo>/.codex/feature-driven-flow/settings.json
<repo>/.codex/feature-driven-flow/rules/*.md
<repo>/.codex/feature-driven-flow/profiles/*.md
<repo>/.codex/feature-driven-flow/packs/*
Rule precedence (high to low):
- Core invariants.
AGENTS.mdpolicy.- Settings and enabled packs.
- User-confirmed Effective Rule Matrix.
- Active rules (shared first, then local refinements when allowed).
Rule schema fields:
id,title,applies_to_phases,intent,guidance,checks,outputs- Optional:
examples,tags,requires,conflicts_with
Profile model:
- Profiles are reusable selection bundles.
- Profiles are inputs, not runtime behavior by themselves.
- Canonical execution artifact is the compiled matrix:
phase -> [rule_id...]
Further reading:
- Specification:
docs/specification.md - Core references:
skills/feature-driven-flow/references/*.md
At Scope, Codex:
- Infers context (strictness, change type, delivery surface, sensitivity flags).
- If supplied by user, validates imported Effective Rule Matrix candidate (file or inline block).
- Recommends profile selection (base + optional overlays) when no valid import is supplied.
- Compiles and presents the phase-by-phase rule matrix as the Effective Rule Matrix.
- Waits for user acceptance/adjustment before Explore.
- Exports confirmed matrix when auto-generation is enabled or user asks to save/export it.
- Can export compiled instructions as directory bundle or compact file with content mode
reference|portable|hybrid.
async-collab: persistence, async packets, portability exports.quality: engineering principles and test strategy policy.hardening: security/performance/operations/release/compatibility policies.presets: convenience profiles (baseline,hardened) and overlays.observability-lite: lightweight workflow observability notes.
Packs only affect asset availability. They do not change core invariants.
Canonical format: JSON (schemas/fdf-settings.schema.json)
Settings files:
- Distribution defaults:
skills/feature-driven-flow/settings.json - Repo-local overrides:
.codex/feature-driven-flow/settings.json - Optional run snapshot:
<run_root_dir>/<run_id>/settings.snapshot.json
Key settings groups:
persistenceandasync_packetsexports(RUNBOOK.md,state.json, optional conversation export)packs(enabled packs and pack directories)local_rules,local_profiles,local_extensionsoverrides,matrix_import,matrix_export,effective_instructions,evidence,outputs
Default packs.enabled in this distribution:
["async-collab","hardening","observability-lite","presets","quality"]
- Verify Codex CLI:
codex --help
- Resolve
CODEX_HOME:%USERPROFILE%\.codex(Windows) or~/.codex(macOS/Linux) - Copy assets:
skills/* -> $CODEX_HOME/skills/
prompts/*.md -> $CODEX_HOME/prompts/ - Restart Codex session.
Run:
/prompts:fdf-start Create a simple console Java app that prints factorial(n). Use JDK 25 and Maven. Read n from argv.
Optional explicit profile request:
/prompts:fdf-start Build a small internal CLI tool. Use profile hardened and overlays security-overlay, operations-overlay.
Optional Effective Rule Matrix file reuse:
/prompts:fdf-start Implement my feature using matrix file .codex/feature-driven-flow/effective-rule-matrix.json
Equivalent phrasing for import intent is supported, for example:
Load matrix from .codex/feature-driven-flow/effective-rule-matrix.json
Optional inline matrix reuse:
/prompts:fdf-start Create a simple console Java app that prints factorial(n). Use JDK 25 and Maven. Read n from argv.
Use this matrix (inline JSON block):
{
"schema": "fdf/effective-rule-matrix.v1",
"fdf_version": "1.1.0",
"created_at": "2026-03-03T00:00:00Z",
"selected_profiles": [],
"profile_overrides": {},
"enabled_packs": [],
"rule_matrix": {
"scope": [],
"explore": [],
"clarify": [],
"architect": [],
"implement": [],
"verify": [],
"summarize": []
}
}Optional save/export after matrix confirmation:
Save current effective matrix for reuse.
Optional save/export to custom path:
Export active matrix to .codex/feature-driven-flow/matrices/release-candidate.json
Optional save/export compiled instructions (directory bundle):
Export compiled instructions bundle to .codex/feature-driven-flow/effective-instructions-bundle
Optional save/export compiled instructions (compact file):
Export compiled instructions compact to .codex/feature-driven-flow/effective-instructions-compact.json
Optional include user custom instructions before export:
Export compiled instructions and include my custom prompts.
Expected decision flow:
- Add new custom instruction(s).
- Modify/rephrase candidate custom instruction(s).
- Continue without custom instructions.
If effective_instructions.export.require_custom_instructions_approval=true, Codex must get explicit user approval before writing export files.
If effective_instructions.export.require_all_custom_instruction_items_approved=true (default), Codex must block or filter out non-approved custom items before export and ask whether to improve, skip unapproved, or cancel.
Optional save/export portable (embedded-content) bundle:
Export portable instructions bundle to .codex/feature-driven-flow/effective-instructions-bundle-portable
Optional save/export portable (embedded-content) compact file:
Export portable instructions compact to .codex/feature-driven-flow/effective-instructions-compact-portable.json
Convert bundle -> compact:
pwsh -NoProfile -File tools/convert-effective-instructions.ps1 -Mode directory-to-compact -InputPath .codex/feature-driven-flow/effective-instructions-bundle -OutputPath .codex/feature-driven-flow/effective-instructions-compact.jsonConvert bundle -> compact (portable embedded-content):
pwsh -NoProfile -File tools/convert-effective-instructions.ps1 -Mode directory-to-compact -InputPath .codex/feature-driven-flow/effective-instructions-bundle -OutputPath .codex/feature-driven-flow/effective-instructions-compact-portable.json -ContentMode portableConvert compact -> bundle:
pwsh -NoProfile -File tools/convert-effective-instructions.ps1 -Mode compact-to-directory -InputPath .codex/feature-driven-flow/effective-instructions-compact.json -OutputPath .codex/feature-driven-flow/effective-instructions-bundleIf user says only save state or export compiled state, Codex should ask whether you mean Effective Rule Matrix export, Effective Instructions export, or state.json export.
referencemode keeps artifacts small, but depends on local repository paths/files.portablemode embeds source content and is better for cross-environment sharing.hybridmode includes both references and embedded content.portable|hybridartifacts are larger and can expose sensitive/internal source material. Review before sharing externally.- By default, portable/hybrid embeds only provenance-listed files (
embed_only_referenced_sources=true), so review for completeness. - Artifacts can include
custom_instructionswith approval metadata for reusable user-defined prompts/phrases/rules.
Available utility prompts in this repository:
/prompts:fdf-import-effective-matrix <path-or-inline-hint>/prompts:fdf-export-effective-matrix [output-path]/prompts:fdf-import-effective-instructions-bundle [bundle-dir]/prompts:fdf-export-effective-instructions-bundle [bundle-dir]/prompts:fdf-import-effective-instructions-compact [compact-json-file]/prompts:fdf-export-effective-instructions-compact [compact-json-file]/prompts:fdf-import-effective-instructions-bundle-portable [bundle-dir]/prompts:fdf-export-effective-instructions-bundle-portable [bundle-dir]/prompts:fdf-import-effective-instructions-compact-portable [compact-json-file]/prompts:fdf-export-effective-instructions-compact-portable [compact-json-file]/prompts:fdf-show-effective-matrix/prompts:fdf-diff-effective-matrix <old> <new>/prompts:fdf-validate-effective-artifacts [path]/prompts:fdf-convert-effective-instructions <from> <to> [input] [output]/prompts:fdf-refresh-effective-instructions [bundle|compact] [output-path]/prompts:fdf-explain-effective-instructions/prompts:fdf-doctor-effective-reuse/prompts:fdf-preview-scope-candidates
Examples:
/prompts:fdf-import-effective-matrix .codex/feature-driven-flow/effective-rule-matrix.json
/prompts:fdf-export-effective-matrix .codex/feature-driven-flow/effective-rule-matrix.json
/prompts:fdf-import-effective-instructions-bundle .codex/feature-driven-flow/effective-instructions-bundle
/prompts:fdf-export-effective-instructions-bundle .codex/feature-driven-flow/effective-instructions-bundle
/prompts:fdf-import-effective-instructions-compact .codex/feature-driven-flow/effective-instructions-compact.json
/prompts:fdf-export-effective-instructions-compact .codex/feature-driven-flow/effective-instructions-compact.json
/prompts:fdf-import-effective-instructions-bundle-portable .codex/feature-driven-flow/effective-instructions-bundle-portable
/prompts:fdf-export-effective-instructions-bundle-portable .codex/feature-driven-flow/effective-instructions-bundle-portable
/prompts:fdf-import-effective-instructions-compact-portable .codex/feature-driven-flow/effective-instructions-compact-portable.json
/prompts:fdf-export-effective-instructions-compact-portable .codex/feature-driven-flow/effective-instructions-compact-portable.json
/prompts:fdf-show-effective-matrix
/prompts:fdf-diff-effective-matrix .codex/feature-driven-flow/old.json .codex/feature-driven-flow/new.json
/prompts:fdf-validate-effective-artifacts
/prompts:fdf-convert-effective-instructions bundle compact .codex/feature-driven-flow/effective-instructions-bundle .codex/feature-driven-flow/effective-instructions-compact.json
/prompts:fdf-refresh-effective-instructions compact .codex/feature-driven-flow/effective-instructions-compact.json
/prompts:fdf-explain-effective-instructions
/prompts:fdf-doctor-effective-reuse
/prompts:fdf-preview-scope-candidates
Enable packs in target repo settings (example):
{
"packs": {
"enabled": ["async-collab", "hardening", "observability-lite", "presets", "quality"]
}
}When enabled (typically via async-collab pack), run artifacts are written under:
<run_root_dir>/<run_id>/...
Typical outputs:
- Phase files:
01-scope.md...07-summarize.md - Shared logs:
decision-log.md,risk-register.md,open-questions.md,traceability.md - Team packets:
<packets_dir>/... - Exports:
RUNBOOK.md,state.json, optionalconversation-export.md
Generated manifests provide machine-readable asset discovery.
- Combined:
skills/feature-driven-flow/extensions/manifest.json - Core pack:
skills/feature-driven-flow/manifest.json - Per-pack:
skills/feature-driven-flow/packs/<pack_id>/manifest.json
Regenerate:
pwsh -NoProfile -File tools/generate-fdf-manifest.ps1Use PowerShell 7 (pwsh) for repo tooling.
Full validation cycle (recommended):
pwsh -NoProfile -File tools/run-validation-cycle.ps1Strict gate (fails if worktree is dirty):
pwsh -NoProfile -File tools/run-validation-cycle.ps1 -FailOnDirtyWorktree -SkipManifestRegenerationAsset validation:
pwsh -NoProfile -File tools/validate-fdf-assets.ps1Validation playbook:
docs/validation-types-playbook.md
- Effective Rule Matrix: the confirmed per-phase list of active rule ids (
phase -> [rule_id...]). - Effective Instructions: compiled per-phase instruction text derived from the confirmed matrix (bundle or compact format).
- Content mode (
reference|portable|hybrid): how Effective Instructions store sources (paths only vs embedded content). - Custom instructions: optional user-defined prompts/phrases stored in Effective Instructions for reuse, with explicit approval.
skills/fdf-code-explorer: behavior tracing and dependency map.skills/fdf-implementation-planner: implementation strategy and sequencing.skills/fdf-change-auditor: verification and risk-focused audit.
These are accelerators; active phase rules remain authoritative.
- Specification:
docs/specification.md - Core references:
skills/feature-driven-flow/references/*.md - Templates:
skills/feature-driven-flow/templates/*.md - Schemas:
schemas/*.json - Tools:
tools/*.ps1 - Validation playbook:
docs/validation-types-playbook.md
- Prompt missing:
verify
fdf-start.mdis in$CODEX_HOME/promptsand restart session. - Packs not available:
check
packs.enabledand manifest presence under pack directories. - Validation script errors under Windows PowerShell:
run scripts with
pwsh(PowerShell 7). - Phase blocked:
inspect active rule
checks, then resolve missing inputs/decisions. - Imported matrix rejected:
ensure file/inline content matches
schemas/fdf-effective-matrix.schema.jsonand uses valid rule ids/phases. - Matrix was not auto-saved:
check
matrix_export.auto_generate_on_scope_confirmed(defaultfalse) in settings. - Compiled instructions import/export rejected:
check
schemas/fdf-effective-instructions-bundle.schema.json,schemas/fdf-effective-instructions-compact.schema.json, portable schema variants, andeffective_instructions.*settings (content_mode,accept_content_modes).
LinkedIn: https://www.linkedin.com/in/taluyev/
