Skip to content

refactor: improve create-expert definition quality guardrails#764

Merged
FL4TLiN3 merged 1 commit intomainfrom
refactor/improve-create-expert-definition-quality
Mar 13, 2026
Merged

refactor: improve create-expert definition quality guardrails#764
FL4TLiN3 merged 1 commit intomainfrom
refactor/improve-create-expert-definition-quality

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

  • design-roles: add Delegation Tree Design section with software design principles (cohesion, coupling, information hiding); require pick lists and defaultModelTier in architecture output
  • write-definition: add Instruction Quality Rules (what belongs vs what does not), Description Rules, require delegation tree comment header, require explicit pick and defaultModelTier
  • verify-test: add Definition Quality Verification step — bloated instructions, missing pick/modelTier, unjustified flat delegation, procedural instructions all trigger CONTINUE verdict

Motivation

Generated definitions (e.g., bash-gaming) had recurring issues: instructions full of code snippets the LLM already knows, missing pick lists granting all tools, no defaultModelTier, and flat delegation trees without cohesion rationale. Root cause was that plan's knowledge about good instructions wasn't reaching write-definition as actionable rules, and verify-test only checked test results, not definition quality.

Test plan

  • Run npx perstack start create-expert with the bash-gaming prompt and verify generated perstack.toml has concise domain-knowledge-only instructions, explicit pick lists, defaultModelTier on every expert, and delegation tree comment header
  • Verify verify-test returns CONTINUE when definition quality issues are present

🤖 Generated with Claude Code

The generated perstack.toml definitions had recurring quality issues:
bloated instructions full of code snippets, missing pick lists, no
defaultModelTier, and flat delegation trees without cohesion rationale.

Root cause: the knowledge about what makes a good instruction (defined
in @create-expert/plan) was not reaching @create-expert/write-definition
as actionable rules, and @create-expert/verify-test only checked test
results, not definition quality itself.

Changes to three delegates:

- design-roles: add Delegation Tree Design section with software design
  principles (cohesion, coupling, information hiding); require pick
  lists and defaultModelTier in architecture output

- write-definition: add Instruction Quality Rules (what belongs vs what
  does not — code snippets, general knowledge, procedures, file specs);
  add Description Rules (caller-facing); require delegation tree comment
  header; require explicit pick and defaultModelTier

- verify-test: add Definition Quality Verification step that checks for
  bloated instructions, missing pick, missing modelTier, unjustified
  flat delegation, and procedural instructions — any violation triggers
  CONTINUE verdict for the build loop to fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 merged commit 1320980 into main Mar 13, 2026
11 checks passed
@FL4TLiN3 FL4TLiN3 deleted the refactor/improve-create-expert-definition-quality branch March 13, 2026 10:58
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