Skip to content

feat: semantic-scan and agent-create skills with official schema validation#30

Merged
bdfinst merged 3 commits into
mainfrom
feat/semantic-duplication-scan
May 14, 2026
Merged

feat: semantic-scan and agent-create skills with official schema validation#30
bdfinst merged 3 commits into
mainfrom
feat/semantic-duplication-scan

Conversation

@bdfinst
Copy link
Copy Markdown
Owner

@bdfinst bdfinst commented May 13, 2026

Summary

  • Adds /semantic-scan — detects business logic reimplemented across architectural layers (the logical duplication problem linters can't catch). Builds a persistent computation-register.json, updated incrementally via git diff, and clusters entries semantically to surface duplicate domain concepts with file:line references and canonical location suggestions.
  • Adds agent-create skill — creates new sub-agent files following the official Claude Code sub-agent schema with token-efficiency budgets (≤ 40 lines review, ≤ 75 lines team). Guided tool selection, conflict detection, /agent-audit validation gate, and automatic registry updates. Updates /agent-add to delegate here and support both review and team agent types.
  • Adds the official agent template (templates/agents/agent-template.md) documenting all 15 frontmatter fields, and extends claude-setup-review to validate agent frontmatter schema compliance against the official spec.

Quality Gate

  • Tests: N/A (markdown/documentation plugin — no test suite)
  • Type check: N/A
  • Lint: N/A
  • Code review: pass — one error fixed (dry-run flag check moved before file write in agent-create); warnings noted but non-blocking

Test Plan

  • Run /semantic-scan against a project with known semantic duplication; verify duplicate cluster reported with canonical: prefixed verdicts and file:line references
  • Run /semantic-scan twice with no code changes; verify "No changes since last scan — register up to date" and byte-identical register
  • Run /agent-add "Detect unused CSS classes" --dry; verify agent content displayed without file written to disk
  • Run /agent-add "Detect unused CSS classes"; verify generated review agent body ≤ 40 lines, passes /agent-audit, and registry is updated
  • Run /agent-add "Schema migration planner" --type team; verify team agent body ≤ 75 lines with ## Responsibilities and no JSON output block
  • Verify /help lists /semantic-scan with correct argument hint
  • Run /agent-audit on a new agent with an invalid model: field; verify claude-setup-review flags it

🤖 Generated with Claude Code

bdfinst and others added 3 commits May 13, 2026 11:21
…ng logical duplication

Adds a new skill that detects business logic reimplemented multiple times across
architectural layers — a gap that linters (syntactic) and domain-review (single
instance) cannot catch. Builds a persistent computation-register.json, updated
incrementally via git diff, and clusters entries semantically to surface duplicate
domain concepts with file:line references and canonical location suggestions.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…and schema validation

Adds the agent-create skill for producing new sub-agent files following the
official Claude Code sub-agent schema with token-efficiency budgets (≤ 40
lines for review agents, ≤ 75 for team agents). Extends /agent-add to cover
both review and team agents by delegating to the skill. Adds the canonical
agent template with all 15 official frontmatter fields documented, and
extends claude-setup-review to validate agent frontmatter schema compliance.

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

Fixes structural defect where --dry flag was checked in Step 12 after
Step 11 had already written the file to disk. --dry now short-circuits at
the top of Step 11 before any disk write or audit invocation.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@bdfinst bdfinst changed the title feat(semantic-scan): add /semantic-scan skill for detecting logical duplication across layers feat: semantic-scan and agent-create skills with official schema validation May 14, 2026
@bdfinst bdfinst merged commit cc1b6b3 into main May 14, 2026
1 check passed
@bdfinst bdfinst deleted the feat/semantic-duplication-scan branch May 14, 2026 16:52
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