This repository is the KFC CLI source plus dogfooding workspace.
- QUICKSTART.md
- CLIENT_KICKOFF_PROMPT.md
- resources/docs/QUICKSTART.md (SSOT)
- resources/docs/CLIENT_KICKOFF_PROMPT.md (SSOT)
- Build and evolve the publishable CLI package.
- Dogfood the package in local fixtures.
- Keep
resources/as SSOT for portable Codex assets.
bin/: CLI executable entrypoint.src/: command and runtime source.dogfood/: in-repo consumer fixtures.scripts/: maintainer automation.resources/: SSOT docs/rules/skills.
kfc initkfc doctorkfc plan init|serve|validatekfc flow ensure-plan|ready|apply|nextkfc client(default client setup + Codex-ready handoff + one smart-recovery cycle)kfc client done(cleanup)kfc client update|upgrade(source-aware client-project refresh or reinstall + rebootstrap)kfc client lessons capture|pending|show|promote|list(private raw lessons + curated client memory)kfc client bootstrap|doctor [--fix](advanced/manual)kfc session where|find|copy(find/copy Codex session files and folders between locations)kfc remote serve|stop|token(mobile-first remote server for mirrored session + queued prompts)kfc-session(separate web-first Codex session manager utility)kfc-chat(separate web-first bound Codex session chat utility)kfc run(guardrails + deterministic route loop with Codex execution and runlog evidence)kfis an alias forkfc
Global option: --cwd <path>
Use npm run ... for maintainer and dogfooding workflows.
Use kfc ... (or npx --no-install kfc ...).
Do not run this repo's npm run ... scripts in client projects.
npm install
npm run bootstrapIf you need fixture dogfooding:
npm run dogfood:link
npm run dogfood:smokeTest paths:
# fast default (no live Codex invocation)
npm run test
# explicit integration (live Codex path)
npm run test:integration
# fast + integration
npm run test:fullIf you want the desktop shell for KFC Plan UI (single window with restore):
npm run ui:desktopIf you want the separate Codex session manager utility:
npm run kfc-session:serveIf you want the separate bound-session chat utility:
npm run kfc-chat:serve -- --project .If you need client linking, prepare the package from this repo:
npm run link:selfMaintainer convenience:
npm run client:link-bootstrap -- --project <path-to-client-project>npm link @kamishino/kamiflow-codex
kfc clientThen tell Codex:
- Read
.kfc/CODEX_READY.mdand execute the mission. - Read
.kfc/LESSONS.mdwhen present for durable project-specific lessons. - Use the project-local runtime skill at
.agents/skills/kamiflow-core/SKILL.md. - Run routine
kfc ...flow commands autonomously (no user reminder loop). - Run check validation before final response and report
Check: PASS|BLOCK.
To store project-specific lessons:
kfc client lessons capture --project . --type incident --title "Broken setup" --lesson "Use KFC bootstrap first"
kfc client lessons pending --project .
kfc client lessons promote --project . --id LESSON-20260307-001 --summary "Bootstrap KFC before custom setup"
kfc client lessons list --project .Raw lesson history stays private in .local/kfc-lessons/. Curated durable memory lives in .kfc/LESSONS.md.
After Codex finishes:
kfc client doneTo refresh or upgrade KFC inside a client repo:
kfc client update --project .
kfc client update --project . --applyupdate is preview-first. upgrade is an alias.
# show default local sessions root
kfc session where
# find exact session file by id
kfc session find --id 019caccc-f25d-7151-ad1d-6eab893d714d
# copy exact session file by id into transfer folder
kfc session copy --id 019caccc-f25d-7151-ad1d-6eab893d714d --to E:/transfer/codex-sessions
# copy one day from this machine into a transfer folder
kfc session copy --to E:/transfer/codex-sessions --date 2026-03-04
# on another machine, restore into local Codex sessions
kfc session copy --from E:/transfer/codex-sessions --to ~/.codex/sessions --mergeKFC Session is separate from KFC:
kfc: workflow/bootstrap/plan disciplinekfc-session: Codex session browser, import/export, and restore helper
kfc-session serve
kfc-session index
kfc-session find --id 019caccc-f25d-7151-ad1d-6eab893d714d
kfc-session export --id 019caccc-f25d-7151-ad1d-6eab893d714d --to E:/transfer/codex-sessions
kfc-session import --from E:/transfer/codex-sessions
kfc-session restore --id 019caccc-f25d-7151-ad1d-6eab893d714dRunbook: resources/docs/KFC_SESSION_RUNBOOK.md
KFC Chat is also separate from KFC:
kfc: workflow/bootstrap/plan disciplinekfc-chat: one bound Codex session per project with guarded browser prompting
kfc-chat bind --project . --session-id 019caccc-f25d-7151-ad1d-6eab893d714d
kfc-chat bind show --project .
kfc-chat serve --project .
kfc-chat unbind --project .Runbook: resources/docs/KFC_CHAT_RUNBOOK.md
kfc remote serve --project . --host 127.0.0.1 --port 4320Phase 1 is a private mobile web surface for:
- mirrored session state
- transcript viewing
- serialized prompt submission through the workstation
Recommended network model: Tailscale or another private network layer.
Runbook: resources/docs/REMOTE_RUNBOOK.md
- SemVer release bump workflow:
resources/docs/VERSIONING_RUNBOOK.md - Useful commands:
npm run version:next
npm run release:plan
npm run release:cut -- --bump <major|minor|patch>
npm run pack:commit- Commit flow:
resources/docs/CODEX_COMMIT_FLOW.md - Hooks:
npm run hooks:enable
npm run hooks:check- Codex-safe commit helper:
npm run commit:codex -- --message "type(scope): summary"npm run portability:smoke -- --project <path-to-external-repo> --linkSee resources/docs/PORTABILITY_RUNBOOK.md.
resources/docs/QUICKSTART.mdresources/docs/CLIENT_KICKOFF_PROMPT.mdresources/docs/CLIENT_A2Z_PLAYBOOK.mdresources/docs/COMMAND_BOUNDARY_POLICY.mdresources/docs/CODEX_KFC_PLAN_RUNBOOK.mdresources/docs/CODEX_RULES_RUNBOOK.mdresources/docs/CODEX_ANTI_PATTERNS.mdresources/docs/CODEX_INCIDENT_LEDGER.mdresources/docs/PLAN_CONTRACT_V1.mdresources/docs/ROUTE_PROMPTS.mdresources/docs/CONTRIBUTOR_BOOTSTRAP.mdresources/docs/CODEX_COMMIT_FLOW.mdresources/docs/VERSIONING_RUNBOOK.mdresources/docs/PORTABILITY_RUNBOOK.mdresources/docs/REMOTE_RUNBOOK.mdresources/docs/KFC_CHAT_RUNBOOK.mdresources/docs/KFC_SESSION_RUNBOOK.md
Commit templates and structure:
.codex/config.example.toml
Keep local/private runtime config untracked:
.codex/config.toml
Skills policy:
- Keep SSOT in
resources/skills. - Treat
.agents/skillsas generated runtime output.
Rules policy:
- Keep SSOT in
resources/rules/base.rulesandresources/rules/profiles/*.rules. - Treat
.codex/rules/kamiflow.rulesas generated runtime output. - Keep
.codex/rules/default.rulesfor Codex-managed approvals; do not overwrite it from SSOT.