T-3TAJ-bump-markdown-contract-text-constraints-pin
Status: closed/done · Impact: medium · Complexity: small
The skill-prose migration needs markdown-contract’s requires /
forbids text-constraint vocabulary (decision D-0011, capability
C-0009) to express the constraints that the 14 invariants.yaml
sidecars assert today. This task pins the dependency from the current
#v0.1.0-pre.2 to a markdown-contract commit hash that includes the
text predicate builders, so the rest of M-0008 can author and run the
contract against a stable upstream surface. The builders are already on
main (PR #71), so the pin targets a commit — no release tag is needed
or waited on.
| Location | Role today |
|---|---|
package.json | Pins markdown-contract to git+ssh://...#v0.1.0-pre.2 — pre-dates the requires / forbids text-constraint vocabulary |
Upstream status
Section titled “Upstream status”No blocker — the builders are merged on markdown-contract main. PR #50
accepted the design (D-0011, surface (A)); PR #71 (feat(core): text predicate builders) landed the requires / forbids / textRule TS API (impl commit
a8fc0c8, merge 9cc0edd); the declarative-YAML surface (T-TXYL, PR #87) has
since merged too — current main is c462dfb. The contract is authored in
TypeScript (T-FQFJ), so the declarative YAML surface is not required.
markdown-contract is a separate vault, so these references are prose, not
resolvable wikilinks; there is no internal depends_on.
Approach
Section titled “Approach”A bare-commit git pin does not work with markdown-contract’s current
packaging, so this is not a one-line edit:
- The import resolves through
package.jsonexports→./dist/index.js, butdist/is git-ignored and is not committed onmain(verified:.gitignorelistsdist/;git ls-tree origin/mainshows onlysrc/+package.json). The scripts arebuild(tsc -p tsconfig.build.json) andprepublishOnly, with noprepare— sobun installfrom a raw commit fetches source with no built output and the import fails. The working#v0.1.0-pre.2pin resolves only because it is a vendored-dist tag (the builtdist/was force-added at the tag). - So produce an installable artifact at a builder-bearing commit (≥
a8fc0c8/9cc0edd; currentmainc462dfbis fine), then bump the pin to it. Two routes:- Vendored-dist tag (recommended — matches the proven pre-2 mechanism). In
the
markdown-contractrepo, builddist/at the target commit and cut a tag (e.g.v0.1.0-pre.3) withdist/force-added; pin here to that tag. - Add a
preparebuild script upstream so git installs builddist/automatically, then pin to a commit SHA. Cleaner long-term, larger upstream change.
- Vendored-dist tag (recommended — matches the proven pre-2 mechanism). In
the
- Bump
package.json, runbun install, confirmmarkdown-contractand Zod still dedupe to a single v4, and smoke-importrequires/forbids/textRule.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
package.json | modify | Repoint the markdown-contract dependency from #v0.1.0-pre.2 to the new vendored-dist tag (or builder commit, route 2) |
bun.lock | modify | Re-resolve via bun install; confirm a single markdown-contract and one Zod v4 (no duplicate) |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
package.json’smarkdown-contractdependency resolves to an installable artifact that (a) contains therequires/forbids/textRulebuilders and (b) ships a builtdist/— i.e. a vendored-dist tag at a builder-bearing commit (recommended), or a commit made installable via an upstreampreparescript. No longer#v0.1.0-pre.2. - AC-2:
bun installresolves cleanly and dedupes the lockfile — onemarkdown-contractand a single Zod v4. - AC-3: A smoke import of
requires/forbids/textRulefrommarkdown-contractresolves at runtime (the symbols T-FQFJ needs are present).
Out of scope
Section titled “Out of scope”- Authoring the skill-prose contract itself — that is the next task.
- Any change to the gate op, the matcher, or the
invariants.yamlfiles.
Dependencies
Section titled “Dependencies”- None blocking: the builders are already on
markdown-contractmain; the pin targets a commit hash. No internaldepends_on.