feat: semantic-scan and agent-create skills with official schema validation#30
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/semantic-scan— detects business logic reimplemented across architectural layers (the logical duplication problem linters can't catch). Builds a persistentcomputation-register.json, updated incrementally viagit diff, and clusters entries semantically to surface duplicate domain concepts withfile:linereferences and canonical location suggestions.agent-createskill — 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-auditvalidation gate, and automatic registry updates. Updates/agent-addto delegate here and support both review and team agent types.templates/agents/agent-template.md) documenting all 15 frontmatter fields, and extendsclaude-setup-reviewto validate agent frontmatter schema compliance against the official spec.Quality Gate
Test Plan
/semantic-scanagainst a project with known semantic duplication; verify duplicate cluster reported withcanonical:prefixed verdicts andfile:linereferences/semantic-scantwice with no code changes; verify"No changes since last scan — register up to date"and byte-identical register/agent-add "Detect unused CSS classes" --dry; verify agent content displayed without file written to disk/agent-add "Detect unused CSS classes"; verify generated review agent body ≤ 40 lines, passes/agent-audit, and registry is updated/agent-add "Schema migration planner" --type team; verify team agent body ≤ 75 lines with## Responsibilitiesand no JSON output block/helplists/semantic-scanwith correct argument hint/agent-auditon a new agent with an invalidmodel:field; verifyclaude-setup-reviewflags it🤖 Generated with Claude Code