Planning bootstrap for AI agents that need to turn rough requirements into a first architecture, initial ADR candidates, and an implementation backlog.
Status: Production-ready. All planned hardening tasks complete. Open enhancements tracked as GitHub Issues.
agent-planforge is open source under the MIT license. Contribution, security reporting, and community expectations are documented in this repository.
project-forge uses agent-planforge as its planning backbone. When a user describes a project, project-forge calls the planforge API, runs the full planning pipeline, and surfaces the results — architecture overview, task backlog, delivery plan, and scaffold status — in an interactive preview before any code is generated.
agent-planforge works best as part of a three-tool chain:
| Tool | Role |
|---|---|
| agent-planforge | Planning — turns rough requirements into architecture, tasks, and delivery plan |
| scaffoldkit | Scaffolding — generates the initial repository structure from the planforge output |
| agent-engineering-playbook | Execution — provides the coding agent with workflow, testing, and governance playbooks |
planforge produces an exports/scaffoldkit-input.json that wires directly into scaffoldkit. The generated root AGENTS.md points agents into .ai/ and the grouped planning outputs so the downstream coding agent has a clean starting point from day one.
agent-planforge is a lightweight planning layer for the earliest engineering phase of a project.
Given rough input such as:
- product goal
- target users
- core features
- constraints
- data sensitivity
- integrations
- timeline
- planning profile
it produces a first planning package:
- intake completeness and targeted follow-up questions
- project charter
- architecture overview with scored options
- initial ADR candidate
- task backlog with dependencies
- delivery plan with execution waves
- prompt pack for downstream agents
- multi-agent handoff manifest for orchestrated follow-on work
- runner contract and per-step status templates
- rerun and resume metadata
- machine-readable planning output
- phase rationale and recommended artifacts
- explicit guidance areas beyond the local planning playbook
- downstream exports for ScaffoldKit, DevReview, and
.ai/
The point is not perfect planning. The point is a repeatable and reviewable starting point.
This first version includes:
- a planning playbook
- an external planner ruleset in
config/planner-config.json - partial config override merge semantics
- JSON schemas for planning input and output
- a Node CLI that bootstraps planning artifacts from JSON, text, or markdown input
- gap detection for missing planning context
- reusable markdown templates for generated planning artifacts
- profile-aware planning modes for startup, product, enterprise, and platform work
- prompt exports for downstream agent execution
- handoff manifest generation for staged or parallel downstream agents
- schema validation for input, config, and generated output
.ai/context export for downstream coding agents- playbook-aware charter and prompt references
- runner contract, rerun/resume reporting, and integration exports
This repository is public-facing and contribution-ready, but still early.
- Core planning flow: usable
- Schema validation: implemented
- Test coverage: automated
.ai/context generation: implemented- Playbook integration: implemented
- Remaining enhancements tracked in
tasks/ - API and output compatibility: not yet guaranteed across minor revisions
Requirements:
- Node.js 18+
Run:
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--outdir out/sampleMarkdown input:
node scripts/bootstrap-plan.js \
--input examples/sample-input.md \
--format markdown \
--outdir out/sample-mdOptional override:
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--outdir out/sample-custom \
--config examples/planner-config.override.jsonValidation-only mode:
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--validate-onlyClarification pass before planning:
node scripts/bootstrap-plan.js \
--input examples/minimal-input.json \
--clarifyAuto-accept default clarifications and continue:
node scripts/bootstrap-plan.js \
--input examples/minimal-input.json \
--outdir out/sample-clarified \
--auto-clarifyConcise summary mode:
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--outdir out/sample \
--summaryRerun with change tracking:
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--outdir out/sample-rerun \
--rerun-from out/sampleResume while preserving runner state:
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--outdir out/sample-resume \
--resume-from out/sampleConsistency analysis after generation:
node scripts/analyze-artifacts.js --outdir out/sampleSkip npm install (useful for CI or when package.json not generated):
node scripts/bootstrap-plan.js \
--input examples/sample-input.json \
--outdir out/sample \
--no-installNote: By default, if a package.json file exists in the output directory after generation, bootstrap-plan will run npm install there. If that install fails, the command now exits non-zero. Use --no-install when you only want planning artifacts.
This creates:
out/sample/AGENTS.mdout/sample/CLAUDE.mdout/sample/planforge-index.jsonout/sample/planning/plan-output.jsonout/sample/planning/structured-input.jsonout/sample/PROJECT.mdout/sample/intake-questionnaire.mdout/sample/project-charter.mdout/sample/architecture-overview.mdout/sample/delivery-plan.mdout/sample/handoff/runner-contract.jsonout/sample/planning/rerun-report.jsonout/sample/planning/rerun-summary.mdout/sample/exports/scaffoldkit-input.jsonout/sample/exports/devreview.jsonout/sample/.ai/out/sample/prompts/out/sample/specs/clarifications.mdwhen--clarifyor--auto-clarifyis usedout/sample/handoff/manifest.jsonout/sample/handoff/runner/out/sample/adrs/out/sample/tasks/out/sample/outputs/consistency-report.mdwhenanalyze-artifacts.jsis runout/sample/governance/for enterprise-path starter docs when relevantout/sample/runbooks/for production-oriented starter runbooks when relevant
out/ is intentionally gitignored. To refresh the local example outputs so they match the current generator behavior, run:
npm run plan:refresh-examplesIf you are updating scripts or agents from the older flat root layout, see docs/output-layout-migration.md.
.github/CODE_OF_CONDUCT.mdCONTRIBUTING.mdLICENSESECURITY.mdconfig/planner-config.jsondocs/operational-workflow.mdexamples/sample-input.jsonexamples/sample-input.mdmodels/planning-input.schema.jsonmodels/planning-output.schema.jsonmodels/planner-config.schema.jsonplaybooks/planning-and-scoping.mdscripts/bootstrap-plan.jstemplates/tasks/
- small, reviewable outputs beat ambitious but opaque planning
- default to the smallest architecture that satisfies current risk
- expose open questions and risks instead of pretending certainty
- keep generated artifacts editable by humans and agents
- ask for missing information explicitly when confidence would otherwise be fake
agent-planforge follows the same delivery model as the broader playbook:
- spec-driven planning: make the intended outcome, scope, constraints, acceptance criteria, and risks explicit before implementation starts
- context-driven execution: provide enough architecture, domain, security, and operational context for downstream agents and humans to make sound decisions
- eval-driven delivery: carry forward the evidence needed to ship safely through tests, review, rollout readiness, and operational verification
Planner config overrides are merged onto the base config instead of replacing it wholesale.
Rules:
- top-level scalars like
defaultProfilereplace the base value when provided - guidance and artifact arrays are merged as ordered unions
- per-phase guidance and artifact maps merge by phase key, then union their arrays
- profile
intakePolicymerges by key governanceDefaultsmerges by key
Example:
examples/planner-config.override.json overrides only a few fields. Running with --config keeps the base config and adds:
founder feedback looptostartup.phase_1guidancethird-party risk reviewtocommon.guidanceAreasByPhase.phase_3- a custom
breakGlassCadence
The end-to-end operating model for planning, handoff, review, and replanning is documented in docs/operational-workflow.md.
Contribution guidelines live in CONTRIBUTING.md.
For now, the most useful contributions are:
- orchestration refinements
- replanning semantics
- downstream integration polish
Security reporting guidance lives in SECURITY.md. Do not open a public issue for a suspected vulnerability affecting confidentiality, integrity, or access control.
Community expectations live in CODE_OF_CONDUCT.md.
This project is licensed under the MIT license. See LICENSE.
The initial hardening backlog is complete. Add new task files in tasks/ when follow-on work needs to be tracked.
Run the automated suite with:
npm testThe tests cover:
- golden-path planning for
sample,minimal,platform, and markdown inputs - schema validation failures for bad input and bad config
- config merge behavior
- rerun and resume metadata
- dependency graph, runner contract, and handoff policy structure
- playbook references and
.ai/artifact generation
docker build -t agent-planforge .