Skip to content

CodeWizarz/specflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpecFlow

SpecFlow is a simplified, open-source implementation of a spec-driven planning and verification layer for AI-assisted software development.

It explores the core idea behind tools like Traycer: making intent explicit, executable, and verifiable before AI-generated code reaches production.


Why SpecFlow Exists

Most AI coding tools jump directly from a vague prompt to code. This often leads to:

  • Agent drift
  • Unexpected file changes
  • Violated constraints
  • Costly rework

SpecFlow introduces a lightweight workflow layer that sits between intent and execution:

Plan → Execute → Verify → Repeat


Core Concepts

1. Artifacts (Intent as a Contract)

Artifacts are structured, versioned specifications that capture intent explicitly.

They include:

  • Scope
  • Constraints
  • Acceptance criteria

All planning, execution, and verification is anchored to an Artifact. Agents are never allowed to freestyle.


2. Deterministic Planning

Artifacts are decomposed into a structured plan consisting of phases:

  • DESIGN
  • IMPLEMENTATION
  • VERIFICATION

Each phase contains explicit, traceable tasks. The same Artifact always produces the same Plan.


3. Agent Orchestration (Plan Here, Execute Anywhere)

SpecFlow does not own AI agents.

Instead, it defines a clean adapter interface that allows:

  • Mock agents
  • CLI-based agents
  • AI coding tools (Cursor, Claude Code, etc.)

This mirrors real-world workflows where teams use multiple tools.


4. Verification & Drift Detection

After each task execution, SpecFlow verifies results against the original Artifact.

Verification rules:

  • Detect scope drift
  • Enforce hard constraints
  • Track acceptance criteria

Issues are categorized by severity:

  • Info
  • Warning
  • Error

Critical violations halt the workflow immediately.


Example Workflow

  1. Define an Artifact (e.g., "Add JWT authentication")
  2. Generate a deterministic Plan
  3. Execute tasks via an external agent
  4. Verify each result against intent
  5. Stop early if violations are detected

This ensures no surprises and production-ready changes.


Why This Matters

SpecFlow demonstrates how AI-assisted development can scale safely on complex codebases by:

  • Anchoring work to explicit specs
  • Reducing hallucinations
  • Making verification a first-class concern

Tech Stack

  • TypeScript
  • Node.js
  • Zod (schema validation)
  • Deterministic mock agents

Status

This project is a conceptual prototype intended to demonstrate workflow design and system thinking, not a full production tool.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published