Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
Added spec/web-dashboard.md describing a task management dashboard:
- Dashboard page with header, create form, task list
- Styled task cards with priority/status badges
- Analytics stats panel
- Responsive CSS with custom properties
Phoenix bootstrap: 3 spec files → 48 canonical nodes → 11 IUs → 3 services:
- Analytics API (:3000)
- Tasks API (:3001)
- Web Dashboard (:3002/4000) — serves complete HTML with inline CSS+JS
Run: cd examples/taskflow && PORT=4000 node dist/generated/web-dashboard/server.js
Open: http://localhost:4000
- New example: examples/taskflow/ — task management + analytics
2 spec files → 29 canonical nodes → 7 IUs → working TypeScript
Generated via Claude Sonnet with typecheck-and-retry
Clean tsc --noEmit, drift detection, provenance tracing
- Fixed scaffold generator: renamed internal vars metrics→_svcMetrics,
modules→_svcModules to avoid collisions with generated module names
Phase 2: Real LLM Integration
- Added canonicalizer-llm.ts: LLM-enhanced canonical node extraction
with structured JSON prompts, batch processing, and graceful fallback
to rule-based extraction when LLM is unavailable or fails
- Added classifier-llm.ts: LLM-enhanced D-class resolution that
escalates uncertain changes to Claude/GPT for semantic classification,
reducing D-rate in the trust loop
- Wired LLM-enhanced canonicalization into CLI bootstrap and canonicalize
commands (auto-detects provider from ANTHROPIC_API_KEY/OPENAI_API_KEY)
- Added llm_resolved field to ChangeClassification model
Phase 1: E2E Integration Tests (PRD §19 Success Criteria)
- §19.1: Delete generated code → full regen succeeds
- §19.2: Clause change invalidates only dependent IU subtree
- §19.3: Boundary linter catches undeclared coupling
- §19.4: Drift detection blocks unlabeled edits
- §19.5: D-rate within acceptable bounds
- §19.6: Shadow pipeline upgrade produces classified diff
- §19.7: Compaction preserves ancestry
- §19.8: Freeq bots perform ingest/canon/plan/regen/status safely
- Multi-spec project lifecycle tests
- Evidence & cascade pipeline E2E
- Full provenance traceability: spec line → clause → canon → IU → file
Added test fixtures: spec-gateway.md, spec-notifications.md
233 tests passing across 28 test files (was 201 across 25)
- LLM provider interface (src/llm/provider.ts)
- Anthropic (Claude) and OpenAI (GPT) providers
- Auto-detection: ANTHROPIC_API_KEY > OPENAI_API_KEY
- Preference saved in .phoenix/config.json
- Override with PHOENIX_LLM_PROVIDER env var
Regen engine now has two modes:
- Stub mode (no LLM): typed skeletons with throw stubs
- LLM mode: sends IU contract + canonical requirements to LLM,
gets back real implementations
Typecheck-and-retry loop:
- After generating code, runs tsc --noEmit on the file
- If errors, feeds them back to the LLM for fix (up to 2 retries)
- Falls back to stubs if LLM fails entirely
CLI changes:
- bootstrap/regen show provider info
- phoenix regen --stubs forces stub mode
- Progress indicators for LLM generation
Tests: 201 passing (updated for async generateIU/generateAll)
Regenerative version control system: causal compiler for intent.
Core engine (Phases A–F):
- Spec ingestion, clause extraction, semantic hashing
- Canonicalization, warm context hashing, A/B/C/D classification
- IU planning, code generation, drift detection
- Boundary validation, dependency extraction
- Evidence/policy engine, cascade propagation
- Shadow pipeline, compaction
- Bot router (SpecBot, ImplBot, PolicyBot)
Stores: content-addressed objects, spec graph, canonical graph, evidence
CLI (16 commands):
init, bootstrap, status, ingest, diff, clauses, canonicalize, canon,
plan, regen, drift, evaluate, cascade, graph, bot, help
Scaffold generator:
- Per-service index.ts, server.ts (health/metrics/modules), tests
- Project package.json, tsconfig.json, vitest.config.ts
Examples:
- microservices: API gateway, user service, notification service (3 specs)
- tictactoe: game engine, multiplayer, web client (3 specs)
201 unit/functional tests, all passing.