SpecForge is a specification-driven engineering CLI for turning ideas, repository context, and review state into deterministic, artifact-backed workflows.
It treats software engineering more like a build system than a chat session: inspect the repository, generate explicit artifacts, explain lineage, apply policy, and keep status observable.
| Golden Demo | Policy Configuration | Architecture | Roadmap | Contributing |
|---|
Most engineering assistants are optimized for fast answers. SpecForge is optimized for disciplined change.
It is built around a few strong ideas:
- deterministic artifacts over hidden state
- bounded repository inspection over unscoped codebase guessing
- explainable planning and execution over opaque orchestration
- conservative policy and approval boundaries over silent autonomy
- provider adapters and skill boundaries over one giant monolith
If you care about traceability, reproducibility, and reviewable outputs, that tradeoff is the point.
SpecForge already has a meaningful local workflow surface.
specforge doctor- validate Node, pnpm, git, repository readiness, and policy shape before work begins
specforge inspect- profile an existing repository and write bounded architecture artifacts under
.specforge/ - optionally refresh maintained architecture docs and Mermaid diagrams
- profile an existing repository and write bounded architecture artifacts under
specforge explain- render evidence-based explanations from artifact lineage plus optional policy and scheduler context
specforge status- read review-request state and CI outcomes from GitHub or GitLab
- optionally emit webhook notifications for status events
pnpm demo:golden- run the canonical end-to-end demo and write a regression manifest
Under the hood, the repo also includes the core planning and execution primitives needed for:
- idea interview and PRD generation
- spec pack generation and validation
- work-graph decomposition and context-pack building
- conservative scheduling and workspace isolation
- bounded repair loops and replay/drift diagnostics
- skill registry, selection policy, built-ins, and external skill-pack adapters
SpecForge is in a strong source-first developer preview state.
What that means in practice:
- the core v1 and v1.1 foundations are implemented
- the CLI is usable locally today
- the repo has good automated coverage and a canonical demo path
- the remaining open issues are mostly future or research-oriented
- the package is not published to npm yet
This is a good point to evaluate the product, test workflows, and refine user experience before packaging it for broader installation.
- Node.js
>=22 pnpmgit- optional:
ghfor GitHub-backedstatus - optional:
glabfor GitLab-backedstatus
git clone https://github.com/iKwesi/SpecForge.git
cd SpecForge
pnpm install
pnpm build
node dist/cli.js --helpFor local development without a build step:
pnpm exec tsx src/cli.ts --helpNote:
- the current install path is source-first
package.jsonstill marks the project as private- build
dist/locally before relying on the packaged CLI entrypoint
node dist/cli.js doctorUse this first. It checks the runtime/tooling surface and fails clearly when something important is missing or malformed.
node dist/cli.js inspect --repository-root . --artifact-dir .This writes bounded repository artifacts such as:
.specforge/repo_profile.json.specforge/architecture_summary.json
For a deeper bounded scan:
node dist/cli.js inspect --repository-root . --artifact-dir . --deepTo refresh maintained architecture docs from inspect artifacts:
node dist/cli.js inspect --repository-root . --artifact-dir . --write-architecture-docsThat can update:
.specforge/architecture_summary.mddocs/ARCHITECTURE.md
node dist/cli.js explain --artifact-file path/to/artifact.jsonUse this when you need a human-readable explanation grounded in artifact lineage instead of reverse-engineering the workflow by hand.
GitHub:
node dist/cli.js status --repo iKwesi/SpecForge --pr 123
node dist/cli.js status --pr https://github.com/iKwesi/SpecForge/pull/123
node dist/cli.js status --repo iKwesi/SpecForge --pr feat/task-1GitLab:
node dist/cli.js status --provider gitlab --repo gitlab-org/cli --pr 42
node dist/cli.js status --pr https://gitlab.example.com/group/project/-/merge_requests/42Webhook notification:
node dist/cli.js status --repo iKwesi/SpecForge --pr 123 --notify-webhook https://hooks.example.test/specforgepnpm demo:goldenThe golden demo is the fastest way to see the current product story end to end. It exercises repository inspection, artifact generation, explainability, task execution artifacts, and status reporting in one repeatable flow.
See docs/GOLDEN_DEMO.md for the full walkthrough.
In the table below, specforge ... refers to the built CLI command. From a source checkout, run the same commands as node dist/cli.js ... after pnpm build, or use pnpm exec tsx src/cli.ts ... during development.
| Command | Purpose | Notes |
|---|---|---|
specforge doctor |
Validate environment, repository readiness, and policy shape | Good first command on any machine |
specforge inspect |
Produce repository profile and architecture artifacts | Supports --deep, --dry-run, and --write-architecture-docs |
specforge explain |
Explain artifact lineage and supporting evidence | Reads one or more artifact files plus optional policy/schedule files |
specforge status |
Report PR/MR state and CI outcomes | Supports GitHub, GitLab, and webhook notifications |
pnpm demo:golden |
Run the canonical existing-repo workflow | Best end-to-end evaluation path today |
Artifacts are first-class outputs with ids, versions, lineage, generators, and checksums. That gives SpecForge a concrete execution history instead of relying on transient chat memory.
Operations are the deterministic core workflow units inside the engine. Examples include repository profiling, PRD generation, spec-pack generation, planning, validation, and bounded repair loops.
Skills are reusable capability plugins behind a registry and selection-policy boundary. SpecForge already has:
- a skill registry
- built-in skill bootstrap
- selection policy
- external skill-pack/provider adapter foundations
Policy is part of product behavior, not an afterthought. Current policy surface includes:
- changed-lines coverage enforcement
- conservative parallelism defaults
- gate applicability by project mode
See docs/POLICY_CONFIG.md for the current contract and example configuration.
src/
cli.ts CLI entrypoint
core/
operations/ Deterministic workflow primitives
diagnostics/ doctor, inspect, explain, status, risk, replay/drift
execution/ scheduler and workspace isolation
skills/ registry, built-ins, selection, external adapters
trackers/ provider-agnostic issue-tracker contracts
git/ native git provider abstractions
github/ GitHub issue-tracker provider
gitlab/ GitLab issue-tracker provider
notifiers/ outbound status notification adapters
demo/ Golden demo orchestration
docs/
GOLDEN_DEMO.md
POLICY_CONFIG.md
ARCHITECTURE.md
tests/
cli/
diagnostics/
documentation/
integration/
planning/
repository/
| Document | Purpose |
|---|---|
| docs/GOLDEN_DEMO.md | Canonical end-to-end walkthrough |
| docs/POLICY_CONFIG.md | Current policy contract and example file |
| docs/ARCHITECTURE.md | Engine architecture plus generated repository snapshots |
| ROADMAP.md | Contributor-facing phase roadmap |
| CONTRIBUTING.md | Contribution workflow and expectations |
For local validation, the main commands are:
pnpm test
pnpm typecheck
pnpm build
pnpm ci:policySpecForge is deliberately strict about:
- deterministic behavior
- narrow, reviewable diffs
- tests alongside behavior changes
- documentation staying aligned with reality
The current phase view lives in ROADMAP.md. For active prioritization, use it together with:
If you want to contribute, start with CONTRIBUTING.md.
Short version:
- pick a scoped issue
- comment first so work does not overlap
- keep changes narrow and test-backed
- run local validation before opening a PR
- use
Squash and mergeorRebase and mergeon protectedmain
Licensed under Apache-2.0. See LICENSE.