|
| 1 | +# Ticket 076: Add standalone code2dsl docs2dsl and config2dsl APIs |
| 2 | + |
| 3 | +- **ID**: ticket-076 |
| 4 | +- **Owner**: unresolved:human |
| 5 | +- **Status**: IN_PROGRESS |
| 6 | +- **Workflow state**: PUBLICATION |
| 7 | +- **Created**: 2026-08-14 |
| 8 | + |
| 9 | +## Goal and scope |
| 10 | + |
| 11 | +Expose three small, independently callable source-to-DSL APIs over the existing |
| 12 | +extractors: |
| 13 | + |
| 14 | +- `code2dsl` converts supported repository source files through the current |
| 15 | + multi-language AST coordinator; |
| 16 | +- `docs2dsl` resolves explicitly supplied files or documentation patterns and |
| 17 | + runs the deterministic documentation converter; |
| 18 | +- `config2dsl` converts supported repository configuration and infrastructure |
| 19 | + files. |
| 20 | + |
| 21 | +Every API accepts a repository root plus an explicit `T2CConfig`, can be called |
| 22 | +without constructing the full pipeline, and returns the existing |
| 23 | +`ExtractionResult` contract. Requiring explicit configuration preserves the |
| 24 | +deterministic no-LLM/no-secret-environment import boundary; a standalone |
| 25 | +converter must not silently read ambient provider configuration. Before the |
| 26 | +result crosses the new API boundary, all emitted records are validated as |
| 27 | +`t2c.intent/v1`. The result is intentionally partial: it contains only evidence |
| 28 | +owned by that input channel and makes no repository-completeness claim. |
| 29 | + |
| 30 | +`ExtractionResult` remains an adapter envelope; each item in `records` is the |
| 31 | +canonical DSL document. The ticket does not invent a second collection schema |
| 32 | +or mislabel warnings/cache metadata as semantic DSL content. |
| 33 | + |
| 34 | +The existing `extractAstIntent`, `extractDocumentationBaseline` and |
| 35 | +`extractConfigurationIntent` functions remain compatible. Because their |
| 36 | +modules are already re-exported by `src/index.ts`, the additive APIs require no |
| 37 | +package-manifest, root-export or pipeline change. |
| 38 | + |
| 39 | +The inspected Wellmanifest standards and their exact applicability are recorded |
| 40 | +in [STANDARDS.md](STANDARDS.md). They require facade parity with the existing |
| 41 | +SSOT, one-way module dependencies, strict canonical-record validation and a |
| 42 | +descriptive/no-authority boundary. Experimental or uncommitted standards remain |
| 43 | +design inputs only; this ticket does not fabricate a standards lock or claim |
| 44 | +formal conformance. |
| 45 | + |
| 46 | +## Acceptance criteria |
| 47 | + |
| 48 | +- [x] AC-01: The human owner approves this bounded API design. |
| 49 | +- [x] AC-02: `code2dsl`, `docs2dsl` and `config2dsl` are independently |
| 50 | + callable from the package root with a common `{ root }` entry shape and |
| 51 | + a required explicit `T2CConfig`. |
| 52 | +- [x] AC-03: Each API returns only its own channel's records plus warnings (and |
| 53 | + existing AST cache evidence where applicable), without invoking the full |
| 54 | + pipeline, graph, synthesis, LLM or mutation paths. |
| 55 | +- [x] AC-04: Every returned record passes the existing strict |
| 56 | + `assertIntentRecords` validator and retains source provenance. |
| 57 | +- [x] AC-05: `docs2dsl` accepts explicit resolved files or resolves bounded |
| 58 | + include/exclude patterns, using the configured documentation patterns by |
| 59 | + default. |
| 60 | +- [x] AC-06: Existing extractor APIs and pipeline behavior remain unchanged. |
| 61 | +- [x] AC-07: For identical explicit inputs and configuration, each facade has |
| 62 | + record, warning and applicable cache parity with its canonical extractor; |
| 63 | + no extraction logic is copied into a facade. |
| 64 | +- [x] AC-08: The facades do not import one another, mutate the analyzed |
| 65 | + repository, produce authority/execution artifacts or expose actual `.env` |
| 66 | + secret material. |
| 67 | +- [x] AC-09: Focused tests, full Node verification, module-boundary validation, |
| 68 | + governance and Docker smoke |
| 69 | + pass before completion is reported. |
| 70 | + |
| 71 | +## Participants |
| 72 | + |
| 73 | +- Human participant: unresolved; no `user-*` file was created. |
| 74 | +- Agent participant: [ai-codex.md](ai-codex.md) |
| 75 | + |
| 76 | +## Approval gate |
| 77 | + |
| 78 | +The human owner explicitly approved ticket-076 and requested implementation on |
| 79 | +2026-08-14. The ticket is now `IN_PROGRESS / PUBLICATION`. Conversation |
| 80 | +approval is an audit note, not trusted merge authorization. |
| 81 | + |
| 82 | +## Verification evidence |
| 83 | + |
| 84 | +- Public-root regression tests prove facade/canonical parity, strict record |
| 85 | + validation, source-channel isolation, bounded documentation discovery and |
| 86 | + rejection of foreign paths. |
| 87 | +- The configuration fixture proves `.env.example` remains discoverable while |
| 88 | + actual `.env` content is neither emitted nor leaked. |
| 89 | +- `npm run verify` passed, including TypeScript build, the full Node suite, |
| 90 | + transitive no-LLM checks and module-boundary validation (124 modules, 545 |
| 91 | + internal imports, no cycles and independent `core`). The existing JDK-only |
| 92 | + Java test remained skipped because the JDK is not installed. |
| 93 | +- `./project/governance-check.sh`, `make docker-smoke` and `git diff --check` |
| 94 | + passed on 2026-08-14. |
| 95 | +- The implementation is ready for protected exact-head review and remains |
| 96 | + `IN_PROGRESS / PUBLICATION` until that external delivery boundary completes. |
| 97 | + |
| 98 | +## Non-goals |
| 99 | + |
| 100 | +- No separate npm packages, repository split or runtime dependency. |
| 101 | +- No new DSL schema or envelope; the canonical record schema remains |
| 102 | + `t2c.intent/v1`. |
| 103 | +- No claim of formal conformance with experimental standards and no dependency |
| 104 | + on their local working-tree paths. |
| 105 | +- No `dsl-manifest.json`, modularity workspace or standards lock; those belong |
| 106 | + to a separately approved integration ticket with immutable revisions and |
| 107 | + artifact digests. |
| 108 | +- No CLI, MCP, A2A, pipeline, graph, synthesis or LLM behavior change. |
| 109 | +- No claim that a single source channel represents the complete repository. |
| 110 | +- No removal or signature change of existing extractor functions. |
0 commit comments