Skip to content

feat: Studio tips, scan redesign, and Agent Skills ecosystem#12

Merged
ABB65 merged 12 commits intomainfrom
feat/studio-tips
Apr 14, 2026
Merged

feat: Studio tips, scan redesign, and Agent Skills ecosystem#12
ABB65 merged 12 commits intomainfrom
feat/studio-tips

Conversation

@ABB65
Copy link
Copy Markdown
Member

@ABB65 ABB65 commented Apr 14, 2026

Summary

  • CLI: Contextual Studio tips for init/generate/diff/status commands, new setup and skills commands, IDE integration utilities
  • MCP: Scan pipeline redesign with confidence scoring & deduplication, tool annotations, git transaction manager, MCP best practices adoption
  • Skills: Agent Skills ecosystem integration across all 15 skills with workflow handoff protocols and normalize guardrails
  • Rules: Essential guardrails and shared normalize/workflow rules
  • SDK: contentrain-query skill with bundler config references
  • Types: Expanded type definitions for scan and workflow features

Packages & Versions

Package Bump
contentrain (cli) patch
@contentrain/mcp minor
@contentrain/skills minor
@contentrain/rules patch
@contentrain/query patch
@contentrain/types patch

Test plan

  • CI passes (lint, typecheck, build, test, release:check)
  • Merge to main triggers Release workflow
  • Changesets action opens Release PR with correct version bumps
  • Merge Release PR publishes all 6 packages to npm

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 14, 2026

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit d04eb20
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/69de7bc4b7636d000894dfb9
😎 Deploy Preview https://deploy-preview-12--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Contentrain and others added 9 commits April 14, 2026 20:26
CLI docs (docs/packages/cli.md):
- validate: add --interactive, --model, --json, --root flags with table
- studio login: add --provider, --url flags with table
- studio login: document CONTENTRAIN_STUDIO_URL env var
- studio connect: add --json flag with table
- studio submissions: add --status filter example

Studio cross-references across docs:
- demo.md: add "Ready for Team Collaboration?" section with connect flow
- normalize.md: add Studio tip after content extraction progression
- serve-ui.md: add connect link in "Beyond Local" section
- reference/field-types.md: add shared vocabulary info box
- reference/model-kinds.md: add unified surfaces tip
- reference/config.md: add shared configuration info box
- packages/types.md: add Studio to ecosystem role list

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cation

Replace binary include/exclude pre-filter with a two-phase pipeline inspired
by i18next-cli's proven approach, adapted to leverage our richer AST metadata.

Phase 1 — shouldSkip(): deterministic non-content removal
- Technical identifier rule (/^[a-z][a-z0-9_-]*$/ < 30 chars, template_text exempt)
- i18n key detection (dot.separated.paths)
- SVG patterns, CSS utilities, URL/path detection
- Known function argument filtering (t/$t → i18n, emit/$emit → events)
- Error codes, placeholders, Vue emit events

Phase 2 — calculateContentScore(): 0-1 confidence scoring
- Context signals: template_text +0.3, translatable attributes +0.2, translatable properties +0.25
- Value signals: multi-word +0.2, punctuation +0.1, non-ASCII +0.15, capitalized +0.1
- Penalties: camelCase -0.3, unknown attributes -0.2, path-like -0.2
- Configurable threshold (default 0.4)

Scanner changes:
- Remove legacy secondary filter (isNonContent)
- Add value-based deduplication with occurrences tracking
- Candidates sorted by contentScore descending
- New stats: skipped, low_confidence, unique_candidates, skip_reasons

Parser fixes (all frameworks):
- Fix ScriptKind for Vue/Svelte/Astro script blocks (lang="ts" → ScriptKind.TS)
- Set parentProperty on JSX attributes in tsx-parser
- Astro frontmatter always resolves as TypeScript

Type updates:
- ScanCandidate: add contentScore, occurrences
- ScanCandidatesResult: add skipped, low_confidence, unique_candidates, skip_reasons

Projection on real Nuxt project (269 files):
- Before: 7971 raw → 6405 candidates (19.6% filter, ~15% precision)
- After: 7971 raw → ~500 unique scored candidates (~94% filter, ~80%+ precision)

Golden benchmark: 10/10 cases pass, overall P=0.917 R=0.917
Tests: 176 passed, tsc 0 errors, oxlint 0 warnings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Header now shows only GitHub icon; other social links (Discord, X,
LinkedIn, YouTube, Instagram, Facebook) moved to footer for a cleaner
navbar. CLI docs updated with all missing flags (--yes, --root, --json,
--open) and corrected default port (3333, not 4321). Every Studio
subcommand now has its own flag reference table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Close the gaps that prevent agents from completing full lifecycle workflows
(normalize, content CRUD, review) across all Contentrain packages.

Types (@contentrain/types):
- Add NormalizePlan, NormalizePlanModel, NormalizePlanExtraction, NormalizePlanPatch
  types as shared contract between CLI serve and MCP

MCP (@contentrain/mcp):
- Add contentrain_merge tool: local git merge for review-mode branches
  (feature → contentrain → update-ref → selective sync, no external platform)
- Add mergeBranch() public function in transaction.ts
- Update next_steps in apply-manager.ts: CLI serve URLs, merge guidance,
  SDK regeneration reminders for both extract and reuse phases
- Fix oxlint: remove unused imports, fix non-ASCII regex

CLI (contentrain):
- Add `contentrain skills` command: install, update, and list skills/rules
  Supports --list (show installed status) and --update (force refresh)
  Auto-detects IDE (Claude Code, Cursor, Windsurf, Copilot)
- Register skills subcommand in CLI entry point

Rules (@contentrain/rules):
- essentials: add contentrain_merge to tool catalog, add CLI serve section,
  add SDK regeneration requirement
- workflow-rules: add branch merge mechanisms section (3 merge paths:
  CLI serve UI, contentrain_merge tool, git platform PR)
- normalize-rules: add normalize-plan.json lifecycle documentation

Skills (@contentrain/skills):
- contentrain (core): ecosystem overview with 6-package map, CLI serve
  pages table, MUST rules, contentrain_merge in tool catalog, related skills
- contentrain-normalize: MUST rules, Steps 5-8 (user review with CLI serve,
  branch merge, Phase 2 prerequisite check, SDK regeneration)
- contentrain-content: MUST rules, SDK regeneration after save, related skills
- contentrain-translate: SDK regeneration after translation, related skills
- contentrain-review: related skills with serve UI reference
- contentrain-diff: browser alternative via serve, related skills
- contentrain-init: post-init serve suggestion, related skills

All quality gates pass:
- tsc: 0 errors (MCP + CLI)
- oxlint: 0 warnings, 0 errors
- vitest: MCP 176 passed, Skills 83 passed, Rules 12 passed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skills (7 files):
- Add Related Skills section to all remaining skills: contentrain-generate,
  contentrain-model, contentrain-validate-fix, contentrain-sdk, contentrain-bulk,
  contentrain-quality, contentrain-doctor
- All 15/15 skills now have cross-references for proper workflow handoffs

Docs (5 files):
- cli.md: add contentrain skills command documentation (--list, --update, IDE
  detection table, tips on rules vs skills)
- mcp.md: add contentrain_merge to tool table
- rules.md: add contentrain skills --update/--list commands
- normalize.md: add Step 9 (merge Phase 1 branch before Phase 2) with 3 merge
  methods (browser, MCP tool, git platform)
- getting-started.md: update MCP tool count to 16, add skills update tip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- contentrain-serve: add Related Skills section (was the only skill without one,
  breaking normalize → serve → review workflow handoff)
- contentrain-init: strengthen SDK generation handoff in final summary — explicit
  "Next step: run contentrain generate" with skill reference
- contentrain-sdk: add contentrain-quality to Related Skills for query best practices

All 15/15 skills now have Related Skills sections.
Skills validation: 83/83 passed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tool annotations, setup command, env var overrides, demo mode, and
comprehensive docs updates — modeled after proven MCP servers (Playwright
30.8K stars, Engram 2.5K, DBHub 2.6K).

Changes:
- MCP: add readOnlyHint/destructiveHint/idempotentHint annotations to all
  16 tools via centralized annotations.ts registry
- CLI: new `contentrain setup <agent>` command auto-configures MCP for
  Claude Code, Cursor, VS Code, Windsurf, Copilot
- CLI: extract shared IDE utils (IDE_CONFIGS, detectIdes, writeMcpConfig)
  from init.ts and skills.ts into utils/ide.ts
- CLI: `contentrain init` now auto-writes MCP config for detected IDEs
- CLI: serve command supports CONTENTRAIN_STDIO, CONTENTRAIN_PORT,
  CONTENTRAIN_HOST, CONTENTRAIN_NO_OPEN environment variable overrides
- CLI: `contentrain serve --demo` creates a temp project for instant trial
- Docs: getting-started.md restructured with setup command as primary path,
  manual config in collapsible details
- Docs: cli.md updated with setup command reference, env vars table,
  demo flag documentation
- Docs: mcp.md updated with annotations-aware tools table and setup command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Close all distribution gaps identified in industry comparison:

- Rewrite AGENTS.md to follow the AGENTS.md standard (agent-discoverable
  skill catalog, essential rules reference, key constraints, framework guides)
- Fix npx skills add path: Contentrain/ai/packages/skills (was wrong repo name)
- Add detailed skills CLI install instructions (--skill, --agent, --list flags)
- Embed Agent Skill in @contentrain/query SDK (SKILL.md + references/bundler-config.md)
- Add ./skills/* subpath export and files entry to SDK package.json
- Add agent-skills, claude-code, cursor, windsurf, copilot, codex keywords to
  rules, skills, and SDK package.json for skills.sh discoverability
- Add Agent Skills badges to all package READMEs and root README
- Add "Agent Skills" section to root README with install commands
- Update docs/packages/rules.md with correct npx skills add commands, AGENTS.md
  section, and embedded SDK skill reference
- Update docs/packages/sdk.md with embedded skill section and skills/* export
- All quality gates pass: oxlint 0/0, tsc 0, vitest 315/315

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ABB65 ABB65 force-pushed the feat/studio-tips branch from 4a9ccac to 001e3ad Compare April 14, 2026 17:27
Contentrain and others added 3 commits April 14, 2026 20:28
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
configureMcp was writing .mcp.json but not git add/commit,
leaving the repository dirty after init completes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ABB65 ABB65 merged commit 9df1de5 into main Apr 14, 2026
5 checks 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