refactor: declarative cleanup of all primitives-plugin prompts#19
Closed
refactor: declarative cleanup of all primitives-plugin prompts#19
Conversation
Mirror sdlc-plugin eval infrastructure with structural assertions for 14 prompts across commands and skills. Files created: - eval/eval.types.ts - Type definitions - eval/eval.config.ts - Configuration - eval/shared-assertions.ts - Common structural assertions - eval/run-eval.ts - Main runner - eval/eval.test.ts - Self-test suite - eval/.gitignore - Ignore results except baseline - eval/cases/*.eval.ts - 14 eval cases covering all prompts - eval/results/baseline/structural-baseline.json - Baseline snapshot Updated package.json: - Added @anthropic-ai/sdk devDependency - Added npm scripts: eval, eval:baseline Baseline results (52/61 assertions pass): - 9 failures expected (prompts missing priorities sections) - Will track improvements through rewrites
Phase 1b of declarative cleanup - extract embedded reference material (>100 lines) from SKILL.md files into separate references/ directories. Created 7 new reference files: - skills/de-slop/references/slop-patterns.md (~220 lines) - skills/avoid-feature-creep/references/feature-creep-frameworks.md (~236 lines) - skills/agent-ready-repo-setup/references/repo-setup-patterns.md (~263 lines) - skills/ask-oracle/references/oracle-cli-reference.md (~125 lines) - skills/check-env-keys/references/env-check-commands.md (~29 lines) - skills/worktree/references/worktree-procedure.md (~223 lines) - skills/agent-native-architecture/references/anti-patterns.md (~132 lines) Note: SKILL.md files remain unchanged. They will be rewritten in Phase 3 to reference these new files.
…tive structure Reduced debug.md from 190 lines to 28 lines by removing procedural steps and templates. Reduced worktree.md from 49 lines to 17 lines by removing usage examples and error handling details. Reduced install.md from 17 lines to 15 lines by adding priorities line. Reduced prime.md from 19 lines to 17 lines by adding priorities line. All commands now follow 5-layer declarative structure: description frontmatter, title, priorities, goal, constraints, output. All eval tests pass (7/7 for debug, 2/2 for install, 2/2 for prime, 1/1 for worktree).
All skills now follow the 5-layer declarative structure: Priorities, Goal, Constraints, Output, References. Reference files with detailed procedures, patterns, and examples have been extracted to skills/*/references/ directories. The structural eval suite passes with 61/61 assertions.
- Restore default branch detection in de-slop (was hardcoded to main/master) - Tighten check-env-keys eval assertions (no longer short-circuit on "reference") - Add commonStructural() to install/prime eval cases - Fix eval .gitignore paths (relative to eval/ directory) - Remove tracked eval result files - Add LLM skip counting in eval runner - Update baseline to post-refactor state (67/67 passing)
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
Rewrite all primitives-plugin prompt files (14 total) to the 5-layer declarative structure (Priorities → Goal → Constraints → Output → References), extract embedded reference material to
references/directories, and add an eval harness for structural validation.Key Changes
Commands rewritten (4): debug.md (190→26), worktree.md (49→17), install.md (17→15), prime.md (19→17)
Skills rewritten (7): de-slop (445→34), agent-ready-repo-setup (314→27), avoid-feature-creep (308→22), ask-oracle (252→24), worktree (253→23), agent-native-architecture (346→180), check-env-keys (107→29)
Reference files created (7): slop-patterns.md, feature-creep-frameworks.md, repo-setup-patterns.md, oracle-cli-reference.md, worktree-procedure.md, env-check-commands.md, anti-patterns.md
Commits
test:Add eval harness infrastructure for primitives-pluginchore:Extract reference files from skill SKILL.md filesrefactor:Rewrite debug, worktree, install, prime commands to declarative structurerefactor:Rewrite all 7 skill SKILL.md files to declarative structurefix:Address code review findings from Codex and GeminiPlan
plans/declarative-cleanup-primitives-plugin.md
Test plan
bun run validatepasses — plugin structure intactbun run evalpasses — 67/67 structural assertions