feat(engine): Forge Graph Engine — design + Phase 0 DOT types#1
Merged
Conversation
Preserve the Forge Graph Engine design doc (docs/graph-engine.md) — the single source of truth for converting the linear state machine into a generic .forge (DOT) graph engine with lean skills, pi.dev agent runtime, graph-enforced red-green-refactor, templated commits, and namespace-based context. Includes the four workflows (pipeline, atdd, tdd-slice, inception) and phased TDD breakdown. Phase 0 first artifact: src/engine/graph/dot-types.ts — the parsed DOT model types (NodeKind, KIND_TO_SHAPE/SHAPE_TO_KIND, DotNode/Edge/Subgraph/Digraph, GraphVersion, kindFromAttrs) that the parser/validator/class-resolver/loader will build on. Co-Authored-By: Oz <oz-agent@warp.dev>
Companion to docs/graph-engine.md (the architecture/why). This is the executable how — written so a fresh implementing agent with only this repo + this file can execute the cutover: - repo orientation (stack, quality-gate commands, Mock* test harness, source layout, config seam) - conventions & guardrails (strict TDD, no new deps, deny-by-default tools, context required on agent nodes, direct cutover, commit format) - the spec: DOT grammar subset + Forge extensions, node kinds/shape derivation, attribute catalog, class_defaults specificity, context namespaces, VerifierResult/Verifier registry, GraphExecution/NodeStatus, condition grammar, expand_from/expand_key, commit template, and the four .forge workflows verbatim - existing-code map: per-file fate (create/modify/delete) by phase - phased TDD plan (0-6): per phase goal, deps, test-first files, acceptance tests, green gate, commit message - continuity & verification (the projection test as the cutover gate) - risks and done criteria Co-Authored-By: Oz <oz-agent@warp.dev>
yaman
marked this pull request as ready for review
July 23, 2026 22:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forge Graph Engine — design + Phase 0 kickoff
Begins converting Forge's hardcoded 14-state linear state machine into a generic, DOT-driven graph engine (workflows in
.forgefiles) that activates agent nodes through the existing pi.dev runtime, verifies each node's outcome, and owns all control flow — while skills demote to pure domain expertise. Direct cutover, no back-compat aliases.This PR lands the design documents and the first Phase 0 artifact. Implementation proceeds phase-by-phase under strict TDD per the playbook.
What's in this PR
docs/graph-engine.md— the architecture/why: Forge Workflow Language (DOT +kind=+ Forge extensions), lean skills demotion, pi.dev integration, verifiers as engine-side checks, namespace-based context, graph-enforced red-green-refactor, templated commits, the four workflows, phased plan, decisions, and resolved open questions.docs/graph-engine-implementation.md— a self-contained executable playbook for a fresh implementer: repo orientation, conventions/guardrails, the full spec (DOT grammar subset, node kinds, attribute catalog,class_defaultsspecificity, context namespaces,VerifierResult,GraphExecution/NodeStatus, condition grammar,expand_from/expand_key, commit template, the four.forgesources verbatim), an existing-code map (per-file create/modify/delete by phase), and a phased TDD plan (0–6) with acceptance tests and green gates.src/engine/graph/dot-types.ts— Phase 0 first artifact: the parsed-DOT type model (NodeKind,KIND_TO_SHAPE/SHAPE_TO_KIND,DotNode/DotEdge/DotSubgraph/Digraph,GraphVersion,kindFromAttrs) that the parser/validator/class-resolver/loader build on.Key decisions locked in
kind=node types (Graphvizshapederived for rendering only); Forge owns the hand-written DOT parser (no Fabro binary, no DOT library).contextis required on everyagentnode; subworkflows propagate a context pool + the expanded-item namespace, sotdd-slice.forgealways has the sub-slice context.feat({story.id}): AC{ac.index} — {ac.summary}); the agent only supplies{ac.summary}.all-of(test-green, lint-clean).pipeline.forgeis the real default (noderiveDefaultGraph()); continuity is guaranteed by a projection test reproducing today's 14-state transitions.Status
Design complete and reviewed; Phase 0 (parser/validator/class-resolver/loader +
pipeline.forge) is the next implementation step, to be executed test-first against the playbook.Conversation: https://app.warp.dev/conversation/bdc6c8e7-9ae3-473d-9244-e4bd95b5a2d2
Run: https://oz.warp.dev/runs/019f8a5b-9143-7d6a-ae3f-0a2249e74a75
Plans:
This PR was generated with Oz.