Skip to content

Phase R2: align every package README with current public surface#43

Merged
ABB65 merged 2 commits intonext-mcpfrom
chore/r2-package-readmes
Apr 18, 2026
Merged

Phase R2: align every package README with current public surface#43
ABB65 merged 2 commits intonext-mcpfrom
chore/r2-package-readmes

Conversation

@ABB65
Copy link
Copy Markdown
Member

@ABB65 ABB65 commented Apr 17, 2026

Stacked on top of PR #42 (R1). Every package README was cross-checked against source and rewritten where stale.

Verified against source

Each README was diffed against:

  • src/ exports (every public symbol documented)
  • package.json exports map (every subpath listed)
  • For MCP: TOOL_ANNOTATIONS registry (17 tools)
  • For CLI: src/index.ts subCommands + per-command flags

Per-package changes

@contentrain/types — Adds provider contracts section (RepoProvider, RepoReader, RepoWriter, ProviderCapabilities, MergeResult.sync), NormalizePlan* types, CONTENTRAIN_BRANCH constant, SECRET_PATTERNS, ModelSummary.

@contentrain/mcp — Tool count 13 → 17, new contentrain_doctor row, subpath exports now complete (/core/doctor, /core/contracts, /core/ops, /core/overlay-reader, /tools/annotations).

contentrain (CLI) — Global --debug flag documented; full flag matrix for --json/--watch/--yes/--demo/--mcpHttp; setup/skills/merge/describe/describe-format/scaffold commands in command table.

@contentrain/querycontentrain generate is now the recommended entry (was contentrain-query generate); programmatic API snippet added.

@contentrain/rules — MCP_TOOLS length corrected to 17, new Parity section, shared/ directory catalog (11 rule files), context bridge includes stack templates.

@contentrain/skills — Reference discovery pattern, progressive-disclosure tier table, Parity section mirroring rules.

Test plan

  • oxlint across every package → 0 warnings on 413 files
  • No code changes — docs only

No code, no tests, no behavior change.

🤖 Generated with Claude Code

Contentrain and others added 2 commits April 18, 2026 02:06
… + cr/* branches + parity tests

Closes the two P1 drift findings and installs a drift-detection
mechanism so they don't come back:

1. contentrain_merge missing from public catalog — @contentrain/rules
   MCP_TOOLS listed 15 tools while @contentrain/mcp registers 17
   (merge + doctor). Skills tool reference also jumped submit → bulk
   with no merge section.
2. Legacy contentrain/{operation}/... branch namespace still taught
   by essentials, review/normalize prompts, and multiple skills.
   MCP's buildBranchName() returns cr/... (Phase 7). Agents following
   shipped guidance would look for branches that don't exist.

### @contentrain/mcp

- Public export TOOL_NAMES in ./tools/annotations (frozen, derived
  from TOOL_ANNOTATIONS). Single source of truth.
- New ./tools/annotations subpath export. Build script emits it.

### @contentrain/rules

- MCP_TOOLS extended to 17 (contentrain_merge + contentrain_doctor).
- essentials: doctor row added; feature-branch pattern → cr/...;
  health-threshold language mentions cr/*.
- review-mode prompt: every legacy contentrain/<op>/... → cr/<op>/...
- normalize-mode prompt: branch pattern table rewritten.
- shared/workflow-rules: branch pattern spec rewritten.
- tests/mcp-parity.test.ts (new, 4 tests): MCP_TOOLS ↔ TOOL_NAMES
  match, essentials cite every tool, buildBranchName emits cr/,
  docs contain no legacy branch prefix.
- package.json: @contentrain/mcp workspace devDep for parity test.

### @contentrain/skills

- references/mcp-tools.md: new contentrain_merge (after submit) +
  contentrain_doctor (new Doctor Tools subsection). Submit description
  updated to cr/*.
- references/mcp-pipelines.md + workflow.md: branch spec + examples
  rewritten to cr/*.
- contentrain-normalize SKILL + references (extraction, reuse):
  4 stale contentrain/normalize/* → cr/normalize/*.
- contentrain-translate SKILL: translate branch pattern updated.
- tests/mcp-parity.test.ts (new, 2 tests): references/mcp-tools.md
  has ### <tool> heading for every MCP tool; 7 skill docs contain no
  legacy branch prefix.
- package.json: workspace devDep.

### Monorepo

- tsconfig.json paths: @contentrain/mcp/tools/* alias so TS + vitest
  resolve the new subpath from source during dev.

### Verification

- oxlint rules + skills + mcp/tools → 0 warnings
- tsc --noEmit rules + skills + mcp → 0 errors
- @contentrain/rules vitest → 16/16 (was 12, +4 parity)
- @contentrain/skills vitest → 85/85 (was 83, +2 parity)

Tool surface: no behaviour changes. TOOL_NAMES export is additive;
everything else is documentation + tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Every package README cross-checked against src/ exports, package.json
exports map, and (for MCP) TOOL_ANNOTATIONS registry. Every claim in
the rewritten READMEs is verified against current code.

### types
- Provider contracts section (RepoProvider, RepoReader, RepoWriter,
  ProviderCapabilities, Commit, Branch, FileDiff, MergeResult with
  optional sync?: SyncResult, LOCAL_CAPABILITIES).
- NormalizePlan* types, CONTENTRAIN_BRANCH, SECRET_PATTERNS, ModelSummary.
- Browser-compatible validate/serialize surface for Studio integration.

### mcp
- Tool count corrected to 17 (was 13/16 in different sections).
  contentrain_doctor row added to annotations table.
- Subpath export list now lists every entry in package.json:
  /core/doctor, /core/contracts, /core/ops, /core/overlay-reader,
  /tools/annotations.
- mergeBranch description uses cr/* branch naming.
- Capability gates section mentions doctor alongside scan/apply.

### cli (contentrain)
- Global --debug flag + CONTENTRAIN_DEBUG env var.
- Flag matrix: --json on status/doctor/validate/generate/diff/describe/
  scaffold; --watch on validate/generate; --demo and --mcpHttp /
  --authToken on serve.
- setup, skills, merge, describe, describe-format, scaffold commands
  in command table.
- Secure-by-default HTTP transport auth described.

### sdk (@contentrain/query)
- contentrain generate (CLI) is now the recommended entry point;
  contentrain-query generate clarified as programmatic path.
- Added programmatic generate() API snippet.

### rules
- MCP_TOOLS length corrected to 17 (+merge +doctor).
- New Parity section explaining tests/mcp-parity.test.ts.
- shared/ directory catalog added (11 rule files, previously
  undocumented).
- Context bridge section mentions the 4 stack templates.

### skills
- Reference discovery pattern (references/*.md on-demand, tier table
  for progressive disclosure).
- New Parity section mirroring rules package.
- Public Exports includes discovery snippet.

No code changes — READMEs only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ABB65 ABB65 merged commit f342e3c into next-mcp Apr 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant