- Status: active
- Source of truth:
package.json,AGENTS.md,llms.txt - Verified with:
npm run build,npm run test:unit,npm run validate:docs - Last verified: 2026-03-25
Keep the repository simple to navigate for both humans and agents while leaving room for future expansion.
Spec2Flow/
├─ .github/
│ ├─ copilot-instructions.md
│ └─ instructions/
│ ├─ typescript-cli.instructions.md
│ ├─ schemas.instructions.md
│ └─ docs.instructions.md
├─ AGENTS.md
├─ llms.txt
├─ package.json
├─ tsconfig.json
├─ tsconfig.build.json
├─ vitest.config.ts
├─ README.md
├─ docs/
│ ├─ index.md
│ ├─ structure.md
│ ├─ copilot.md
│ ├─ Harness_engineering.md
│ ├─ adr/
│ │ ├─ index.md
│ │ ├─ 0001-orchestrator-is-system-of-record.md
│ │ ├─ 0002-adapter-execution-is-task-scoped.md
│ │ ├─ 0003-runtime-contracts-are-schema-backed.md
│ │ └─ 0004-compiled-dist-cli-is-the-default-runtime.md
│ ├─ playbooks/
│ │ ├─ index.md
│ │ ├─ requirements-analysis.md
│ │ ├─ code-implementation.md
│ │ ├─ test-design.md
│ │ ├─ automated-execution.md
│ │ ├─ defect-feedback.md
│ │ └─ collaboration.md
│ ├─ ui/
│ │ ├─ index.md
│ │ ├─ operator-console.md
│ │ ├─ visual-language.md
│ │ ├─ interaction-concepts.md
│ │ └─ reference/
│ │ └─ README.md
│ ├─ plans/
│ │ ├─ index.md
│ │ ├─ completed/
│ │ │ └─ index.md
│ │ └─ historical/
│ │ ├─ index.md
│ │ ├─ mvp.md
│ │ ├─ roadmap.md
│ │ ├─ implementation-plan.md
│ │ ├─ full-implementation-plan.md
│ │ ├─ typescript-migration-plan.md
│ │ └─ cli-refactor-plan.md
│ ├─ architecture.md
│ ├─ agent-orchestration-platform-design.md
│ ├─ collaboration.md
│ ├─ object-store-local-first-design.md
│ ├─ project-workspace-autonomous-delivery-design.md
│ ├─ runtime-config-reference.md
│ ├─ usage-guide.md
│ ├─ synapse-integration-automation-design.md
│ ├─ examples/
│ │ ├─ synapse-network/
│ │ │ ├─ README.md
│ │ │ ├─ changes/
│ │ │ │ ├─ frontend-change.txt
│ │ │ │ └─ withdrawal-change.txt
│ │ │ ├─ project.yaml
│ │ │ ├─ topology.yaml
│ │ │ ├─ risk.yaml
│ │ │ ├─ model-adapter-capability.json
│ │ │ ├─ model-adapter-runtime.json
│ │ │ └─ generated/
│ │ │ ├─ onboarding-validator-result.json
│ │ │ ├─ task-graph.json
│ │ │ ├─ task-graph-frontend-change.json
│ │ │ ├─ task-graph-withdrawal-change.json
│ │ │ ├─ execution-state.json
│ │ │ └─ workflow-loop-summary.json
├─ schemas/
│ ├─ project-adapter.schema.json
│ ├─ system-topology.schema.json
│ ├─ risk-policy.schema.json
│ ├─ task-graph.schema.json
│ ├─ environment-preparation-report.schema.json
│ ├─ onboarding-validator-result.schema.json
│ ├─ execution-state.schema.json
│ ├─ requirement-summary.schema.json
│ ├─ implementation-task.schema.json
│ ├─ test-plan.schema.json
│ ├─ test-case.schema.json
│ ├─ execution-report.schema.json
│ ├─ model-adapter-capability.schema.json
│ └─ model-adapter-runtime.schema.json
├─ packages/
│ ├─ cli/
│ │ ├─ dist/
│ │ └─ src/
│ │ ├─ adapters/
│ │ ├─ cli/
│ │ ├─ onboarding/
│ │ ├─ planning/
│ │ ├─ runtime/
│ │ ├─ shared/
│ │ └─ types/
│ └─ web/
│ ├─ src/
│ ├─ index.html
│ ├─ package.json
│ ├─ tsconfig.json
│ └─ vite.config.ts
This file should describe the current repository map first. Future package splits or optional integrations belong in architecture or roadmap docs, not in the primary structure map.
.github/copilot-instructions.md: repository-wide Copilot execution rules.github/instructions/: scoped instructions for TypeScript, schemas, and docsREADME.md: product overview and quick start contextAGENTS.md: repository rules, design principles, and documentation disciplinellms.txt: machine-readable repository map for AI agents and external toolingpackage.json: CLI entrypoints and example workflow commandspackage.json: root scripts for CLI workflows plus frontend workspace entrypointstsconfig.json: phase 0 TypeScript configuration for NodeNext typechecking without changing the current runtime entrypointtsconfig.build.json: build configuration that emits runnable CLI artifacts intopackages/cli/dist/vitest.config.ts: unit-test runner configuration for the TypeScript source tree
Versioned record system for product intent, architecture, usage, and examples.
Recommended reading order:
llms.txtfor machine-readable repository discoveryREADME.mdfor product overviewAGENTS.mdfor repository rules and doc governancedocs/index.mdfor the shortest AI-facing docs mapdocs/copilot.mdfor Copilot customization and maintenance policydocs/Harness_engineering.mdfor AI-facing repository optimization guidancedocs/adr/index.mdfor stable architecture decisionsdocs/playbooks/index.mdfor stage-scoped execution guidancedocs/plans/index.mdfor plan placement and archive rulesdocs/architecture.mdfor runtime boundariesdocs/agent-orchestration-platform-design.mdfor the target platform upgrade pathdocs/object-store-local-first-design.mdfor local-first artifact storage and the MinIO upgrade pathdocs/project-workspace-autonomous-delivery-design.mdfor the V1 local product shape built around projects, workspaces, worktrees, and review-ready autonomous runsdocs/ui/index.mdfor the UI docs map and reference-asset routingdocs/ui/operator-console.mdfor the operator-facing product UI built around projects, runs, tasks, evidence, and review packetsdocs/ui/visual-language.mdfor the visual system used to implement the web control planedocs/runtime-config-reference.mdfor runtime field semantics and override rulesdocs/usage-guide.mdfor adoption flowdocs/synapse-integration-automation-design.mdfor complex-system integration
Small accepted decisions that should remain stable across refactors. These files are the shortest durable answer when a contributor or agent asks why a major architectural boundary exists.
Short operational guides for each route stage. These files are the preferred AI-facing context once a task has already been claimed and the stage is known.
Planning and migration material that should not crowd the active docs root.
docs/plans/index.md: placement rules and archive policy for plan docsdocs/plans/completed/: short-lived holding area for plans that were just completeddocs/plans/historical/: superseded or completed plans kept only for archaeology
UI product design, visual-language guidance, and reference explorations for the web control plane.
docs/ui/index.md: shortest map for UI docs and exploration assetsdocs/ui/operator-console.md: canonical product UI behavior and page responsibilitiesdocs/ui/visual-language.md: canonical look-and-feel rules for implementationdocs/ui/interaction-concepts.md: supporting naming and interaction ideasdocs/ui/reference/: exported mockups, screenshots, and prototype HTML kept as non-canonical reference assets
Structured definitions for:
- project adapters
- system topologies
- risk policies
- task graphs
- environment preparation reports
- onboarding validator results
- execution states
- model adapter capabilities
- model adapter runtimes
Reference onboarding configuration for a complex multi-service target system, plus generated validator, task graph, and runtime outputs.
Sample changed-file lists for diff-aware and requirement-aware route selection examples.
Developer-facing CLI entrypoints. This is the current implementation surface for validation, task graph generation, execution-state lifecycle, task claiming, adapter execution, and workflow-loop orchestration.
Frontend operator shell for the web control plane.
This package currently provides the first React and Vite-based UI scaffold for run submission, run list, run detail, observability panels, task-level operator actions, and DAG preview work.
Generated build output for the TypeScript runtime. This directory is now the default CLI runtime surface used by the package bin and repository scripts.
The primary CLI entrypoint is packages/cli/dist/cli/spec2flow-dist-entrypoint.js.
Thin CLI shell helpers such as argument parsing, command dispatch, and the TypeScript source entrypoint that emits the compiled runtime.
Onboarding validation rules and repository configuration checks.
Planning-domain logic for requirement interpretation, route selection, risk-aware task bundling, and task graph construction.
Runtime-domain logic for execution-state initialization, task claims, task results, and workflow-loop progression.
This directory also contains the first unit tests for runtime state and routing behavior.
Adapter infrastructure for external model/runtime invocation, adapter payload normalization, and Copilot CLI preflight checks.
This directory also contains adapter policy enforcement unit tests.
Phase 1 TypeScript domain types for the workflow model, execution state, task claims, task results, adapter contracts, and workflow loop summaries.
Shared infrastructure utilities for filesystem IO, schema loading, and common output helpers.
- Keep
docs/root for active source-of-truth docs, indexes, ADRs, playbooks, and examples. - Put new plan, migration, and rollout documents under
docs/plans/, not in the docs root. - Move completed plans out of the root as soon as stable docs, code, and commands reflect the result.
- Archive superseded plans under
docs/plans/historical/instead of leaving them in primary navigation. - When two docs overlap, one must defer to the other and link outward rather than repeating behavior.
- New top-level docs should answer one dominant question and be wired into
README.md,llms.txt, ordocs/index.mdonly if they are active navigation targets. - Active docs must keep a metadata block with
Status,Source of truth,Verified with, andLast verified. - Key API or design docs should use
SupersedesandSuperseded bywhen canonical ownership moves from one file to another. Last verifiedmust useYYYY-MM-DDand stay within the active-doc freshness window enforced bynpm run validate:docs.Source of truthentries for active docs must stay concrete. Whole directories such aspackages/cli/src/runtime,packages/web, orschemasare treated as overbroad whether they appear with or without a trailing slash and should be narrowed to the owning files.
These placement rules are not advisory only. npm run validate:docs fails when plan-like docs appear directly under docs/ root or when root-level docs are marked completed or historical.
npm run validate:docs also fails when active or canonical docs link directly to specific archived plan files or cite them as source of truth. Historical references must flow through the plan index pages instead.
npm run validate:docs now also fails when an active doc is missing Last verified, uses a non-ISO date, points that date into the future, lets the freshness window expire, references a deprecated npm run script, or keeps an overbroad Source of truth path. It also validates reciprocal Supersedes and Superseded by relationships when those metadata lines are present. This is intentional friction: an active doc that nobody has re-checked recently is operational drift, not harmless prose.
For the first implementation, keep the map narrow and current. Start with:
README.mdAGENTS.mddocs/schemas/packages/cli/
Then expand only when real usage appears.
If future package splits become real, add them after the implementation exists and after the docs, commands, and contracts all point to the same structure.