NOTEDASHBOARD
Forgia-Labs

Forgia

Spec-driven development framework — from Feature Design to agent-ready execution specs. FD → SDD → Code.

7 Stars
GitHub
  ███████╗ ██████╗ ██████╗  ██████╗ ██╗ █████╗
  ██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██║██╔══██╗
  █████╗  ██║   ██║██████╔╝██║  ███╗██║███████║
  ██╔══╝  ██║   ██║██╔══██╗██║   ██║██║██╔══██║
  ██║     ╚██████╔╝██║  ██║╚██████╔╝██║██║  ██║
  ╚═╝      ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚═╝╚═╝  ╚═╝

  Forge specs into code. FD → SDD → Agent execution framework.

Spec-driven development framework for AI agents. Forgia turns human design decisions into execution contracts for autonomous agents.

The Model

You ──→ FD (what & why) ──→ SDD (how, for agents) ──→ Agent ──→ Code
         functional           execution contract        OpenHands
         design               agent-ready prompt        Claude Code
         1 per feature        N per FD                  parallel
LayerWhoWhat
FD (Feature Design)Human + AIArchitecture, trade-offs, interfaces
SDD (Spec-Driven Dev)AI generates, human approvesScope, constraints, tests, acceptance criteria
ConstitutionHumanImmutable project rules
CodeAgentImplementation guided by SDD

Quick Start

# Install with mise (recommended)
mise use github:forgia-labs/forgia

# Or download binary from GitHub Releases
# https://github.com/forgia-labs/forgia/releases

# Or build from source
git clone git@github.com:forgia-labs/forgia.git
cd forgia
mise run go:build
# Or: go install github.com/forgia-labs/forgia/cmd/forgia@latest

# Trust the mise config to allow running tasks
mise trust

# Install Claude Code slash commands
mise run claude:install

# Install optional tools (fswatch, yq)
mise run tools:install

# Install Beads task tracker (optional)
mise run bd:install

# Initialize a new project
cd /path/to/your/project
forgia init

Workflow

Forgia enforces a 3-gate workflow with optional analysis steps:

FD Review ──→ Arch Review ──→ Threat Model ──→ SDD Generation ──→ Implementation ──→ Verification ──→ Close
 /fd-review   /fd-arch-review  /fd-threat-model  /fd-sdd           agent executes     /fd-verify       /fd-close
 GATE 1        (optional)       (optional)                                              GATE 2           GATE 3
  • Gate 1 (/fd-review): FD must pass review before SDDs can be generated
  • Arch Review (/fd-arch-review): Pattern detection, SOLID compliance, dependency graph (advisory)
  • Threat Model (/fd-threat-model): STRIDE security analysis, feeds mitigations into SDD constraints (advisory)
  • Gate 2 (/fd-verify): Acceptance criteria met, tests pass, Work Logs filled
  • Gate 3 (/fd-close): Archive, retrospective, changelog

Vault Structure

After forgia init, your project gets:

your-project/
  .forgia/
    config.toml               # runner, beads, knowledge, watcher config
    constitution.md            # immutable project rules
    _dashboard.md              # Obsidian dataview overview
    guardrails/
      deny.toml                # security deny patterns (read/write/execute)
      ignore                   # files to exclude from agent context
    fd/                        # Feature Designs (what & why)
    sdd/                       # Execution Specs (how, for agents)
      _templates/
        sdd-template.md        # markdown format
        sdd-template.yaml      # YAML format (machine-parseable)
    ops/                       # manual operational tasks
    architecture/              # C4/DDD system design (YAML)
    contexts/                  # bounded context definitions
    learnings/                 # retrospective feedback loop
    dev-guide/
      principles/              # clean-code, SOLID, design-patterns
      lang/                    # per-language conventions (auto-detected)
      coding-conventions.md
      commit-conventions.md
      review-process.md

Spells (Slash Commands)

Claude Code slash commands — the core workflow. Run via /command in Claude Code or forgia skill <name>.

Feature Design

SpellWhat it does
/fd-newForge a new design — create FD from issue or description
/fd-reviewTrial by fire — mandatory review gate (GATE 1)
/fd-arch-reviewInspect the blueprint — pattern detection, SOLID compliance, dependency graph
/fd-threat-modelTest the armor — STRIDE security analysis, guardrails suggestions
/fd-compareWeigh the options — compare competing FDs side-by-side
/fd-sddTemper the specs — generate N SDDs from approved FD
/fd-deepDeep analysis — parallel exploration for complex problems
/fd-exploreStudy the piece — load FD context into session
/fd-verifyQuality check — verify implementation vs spec (GATE 2)
/fd-closeSeal the work — archive FD + retrospective (GATE 3)
/fd-feedbackLearn from the forge — route Work Log insights to architecture/learnings
/fd-statusForge status — FD + SDD dashboard

SDD Execution

SpellWhat it does
/sdd-dry-runTest the fire — simulate SDD execution, feasibility report (GO/NO-GO)
/sdd-assignHand the hammer — assign SDD to agent backend
/sdd-statusCheck the anvil — execution status of all SDDs

Architecture (DDD)

SpellWhat it does
/arch-initLay the foundation — initialize DDD architecture from brief
/arch-reviewSurvey the structure — review coherence across vault
/arch-updateRecord the build — update architecture from SDD Work Logs

Setup

SpellWhat it does
/project-initLight the forge — scaffold vault in current project

CLI Commands

CommandWhat it does
forgia initScaffold the vault in the current project
forgia statusDashboard: FDs, SDDs, OPS tasks, exec logs, Beads, knowledge stats
forgia doctorHealth check: vault, tools, Docker, API keys, knowledge layer
forgia validate <sdd>Validate an SDD before execution
forgia exec <sdd>Execute an SDD (--runner, --dry-run, --mode)
forgia batch <FD-NNN>Execute all pending SDDs for an FD
forgia watch <FD-NNN>Watch and auto-execute new SDDs
forgia syncSync vault with project board (GitHub Projects)
forgia skill <name>Execute a slash command via Claude CLI
forgia skillsList all available slash commands
forgia versionShow version

Runners

# Claude Code — uses your Max subscription
forgia exec .forgia/sdd/FD-001/SDD-001.md --runner=claude

# OpenHands — autonomous, N parallel containers
forgia exec .forgia/sdd/FD-001/SDD-001.md --runner=openhands

# Dry run — simulate without executing
forgia exec .forgia/sdd/FD-001/SDD-001.md --dry-run

# Guardrail enforcement mode
forgia exec .forgia/sdd/FD-001/SDD-001.md --mode=guard

# Default from config.toml
forgia exec .forgia/sdd/FD-001/SDD-001.md
RunnerWhen to use
Claude CodeInteractive, Max subscription, git worktree isolation
OpenHandsAutonomous, N parallel containers, API keys
Dry RunFeasibility check before committing to execution
ManualRead the SDD and implement yourself

Guardrails

Security deny patterns in .forgia/guardrails/deny.toml control what agents can and cannot do:

[read]    # Files agents must NEVER read (.env, *.pem, .ssh/*, etc.)
[execute] # Commands agents must NEVER run (pass show, gpg --export-secret, etc.)
[write]   # Files agents must NEVER modify (constitution.md, config.toml, deny.toml)

Guardrails are fail-closed — if a pattern matches, the action is blocked. Three enforcement modes:

  • careful — warns on destructive commands
  • freeze — restricts writes to SDD boundaries
  • guard — careful + freeze combined

Beads Integration

Beads (bd) manages the dependency graph between SDDs:

# After /fd-sdd: creates epic + subtasks with dependencies
bd ready              # show unblocked tasks
forgia batch FD-001   # execute only ready ones (dependency-aware)

Knowledge Stack

Every agent automatically loads:

.forgia/dev-guide/
  principles/          ← ALWAYS loaded (clean-code, SOLID, design-patterns)
  lang/                ← auto-detected per project (rust, python, ts, go, k8s, shell)
  coding-conventions   ← operational rules
  commit-conventions   ← commit format
  review-process       ← workflow gates

Optional: codebase-memory-mcp provides Tier 3 semantic indexing (symbols, edges, dependency graph). Auto-indexed during forgia init if installed.

Work Log

Every SDD includes a mandatory Work Log — filled by the agent or developer:

work_log:
  executor: claude-code
  started: 2026-03-15T10:00:00
  completed: 2026-03-15T11:30:00
  decisions:
    - what: "Used tower middleware instead of manual auth"
      why: "Composable, testable, idiomatic axum"
  output:
    commits: ["abc123"]
    files_changed: ["src/auth.rs", "tests/auth_test.rs"]
  retrospective:
    worked: "Builder pattern for config was clean"
    suggestions: "Add integration test template to SDD"

Prerequisites

ToolRequiredPurposeInstall
goYesBuild the CLIgo.dev (1.25+)
miseYesTask runnermise.jdx.dev
claudeYesClaude Code CLIclaude.ai/claude-code
dockerOptionalOpenHands runnerdocker.com
bdOptionalBeads task trackermise run bd:install
fswatchOptionalforgia watchbrew install fswatch
yqOptionalYAML SDD validationbrew install yq
codebase-memory-mcpOptionalKnowledge layer (Tier 3)GitHub

Inspired By

  • AutoSpec — YAML specs, auto-validation, session isolation
  • Beads — distributed graph issue tracker for AI agents
  • GitHub Spec Kit — spec/plan separation, constitution
  • OpenHands — sandboxed agent runtime

License

MIT

Related

How to Install

  1. Download the dashboard markdown file from GitHub
  2. Drop it into your vault (anywhere)
  3. Install the Homepage plugin and point it at the file
  4. Enable any listed CSS snippets for the intended look
Open Repository

Stats

Stars

7

Forks

0

License

MIT

Last updated 15d ago