todo2code

Participant: codex (AI agent)

Understanding

Todo2code already contains the three underlying deterministic boundaries and exports their modules from the package root. The missing part is a uniform, discoverable product-level facade: AST takes an options object, configuration takes a positional root, and documentation requires callers to resolve files themselves. None of those names expresses that its result is a valid but source-limited Intent DSL document.

The smallest compatible change is to add one named facade in each owning extractor module. Each facade delegates to the mature extractor, validates the complete returned record array with the existing strict runtime validator and preserves warnings and cache evidence. This avoids duplicating parsing or creating dependencies between the three adapters.

The Wellmanifest review sharpens that boundary. ExtractionResult is an adapter envelope, while each records element is the canonical t2c.intent/v1 JSON document. SSOT requires delegation plus parity rather than copied converters; Modularity requires acyclic adapter dependencies and one contract owner; DSL and POA require descriptive output with no authority or execution effect. Env DSL is currently uncommitted and blocked, so only its safe data/no-evaluation direction is applicable. Exact evidence and adoption limits are in STANDARDS.md.

Execution plan after approval

  1. Add code2dsl({ root }, config) beside the AST coordinator.
  2. Add docs2dsl({ root, files?, patterns?, excludes? }, config), resolving patterns only when explicit files are absent.
  3. Add config2dsl({ root }, config) beside the configuration extractor.
  4. Require explicit T2CConfig at every facade so deterministic extraction never imports or reads ambient provider/secret environment configuration; fail closed when the root or emitted DSL is invalid.
  5. Add one public-root regression test proving independent invocation, strict record validation, source-channel isolation, facade/canonical parity and preservation of warnings/cache evidence.
  6. Prove that actual .env secret material remains outside configuration DSL extraction and that no adapter imports another.
  7. Run the focused test, npm run verify (including module boundaries), ./project/governance-check.sh and make docker-smoke.

Actual changes

Risks

Blockers