ECC/skills
Affaan Mustafa 8511d84042
feat(skills): add rules-distill skill (rebased #561) (#678)
* feat(skills): add rules-distill — extract cross-cutting principles from skills into rules

Applies the skill-stocktake pattern to rules maintenance:
scan skills → extract shared principles → propose rule changes.

Key design decisions:
- Deterministic collection (scan scripts) + LLM judgment (cross-read & verdict)
- 6 verdict types: Append, Revise, New Section, New File, Already Covered, Too Specific
- Anti-abstraction safeguard: 2+ skills evidence, actionable behavior test, violation risk
- Rules full text passed to LLM (no grep pre-filter) for accurate matching
- Never modifies rules automatically — always requires user approval

* fix(skills): address review feedback for rules-distill

Fixes raised by CodeRabbit, Greptile, and cubic:

- Add Prerequisites section documenting skill-stocktake dependency
- Add fallback command when skill-stocktake is not installed
- Fix shell quoting: add IFS= and -r to while-read loops
- Replace hardcoded paths with env var placeholders ($CLAUDE_RULES_DIR, $SKILL_STOCKTAKE_DIR)
- Add json language identifier to code blocks
- Add "How It Works" parent heading for Phase 1/2/3
- Add "Example" section with end-to-end run output
- Add revision.reason/before/after fields to output schema for Revise verdict
- Document timestamp format (date -u +%Y-%m-%dT%H:%M:%SZ)
- Document candidate-id format (kebab-case from principle)
- Use concrete examples in results.json schema

* fix(skills): remove skill-stocktake dependency, add self-contained scripts

Address P1 review feedback:
- Add scan-skills.sh and scan-rules.sh directly in rules-distill/scripts/
  (no external dependency on skill-stocktake)
- Remove Prerequisites section (no longer needed)
- Add cross-batch merge step to prevent 2+ skills requirement
  from being silently broken across batch boundaries
- Fix nested triple-backtick fences (use quadruple backticks)
- Remove head -100 cap (silent truncation)
- Rename "When to Activate" → "When to Use" (ECC standard)
- Remove unnecessary env var placeholders (SKILL.md is a prompt, not a script)

* fix: update skill/command counts in README.md and AGENTS.md

rules-distill added 1 skill + 1 command:
- skills: 108 → 109
- commands: 57 → 58

Updates all count references to pass CI catalog validation.

* fix(skills): address Servitor review feedback for rules-distill

1. Rename SKILL_STOCKTAKE_* env vars to RULES_DISTILL_* for consistency
2. Remove unnecessary observation counting (use_7d/use_30d) from scan-skills.sh
3. Fix header comment: scan.sh → scan-skills.sh
4. Use jq for JSON construction in scan-rules.sh to properly escape
   headings containing special characters (", \)

* fix(skills): address CodeRabbit review — portability and scan scope

1. scan-rules.sh: use jq for error JSON output (proper escaping)
2. scan-rules.sh: replace GNU-only sort -z with portable sort (BSD compat)
3. scan-rules.sh: fix pipefail crash on files without H2 headings
4. scan-skills.sh: scan only SKILL.md files (skip learned/*.md and
   auxiliary docs that lack frontmatter)
5. scan-skills.sh: add portable get_mtime helper (GNU stat/date
   fallback to BSD stat/date)

* fix: sync catalog counts with filesystem (27 agents, 114 skills, 59 commands)

---------

Co-authored-by: Tatsuya Shimomoto <shimo4228@gmail.com>
2026-03-20 01:44:55 -07:00
..
agent-eval feat(skills): add agent-eval for head-to-head coding agent comparison (#540) 2026-03-20 00:20:18 -07:00
agent-harness-construction feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
agentic-engineering feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
ai-first-engineering feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
ai-regression-testing feat: add ai-regression-testing skill (#433) 2026-03-16 13:35:31 -07:00
android-clean-architecture fix: address PR review comments for Kotlin/Android/KMP docs 2026-03-10 20:53:39 -07:00
api-design fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
architecture-decision-records feat(skills): add architecture-decision-records skill (#555) 2026-03-20 00:20:25 -07:00
article-writing feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
autonomous-loops feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
backend-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
blueprint docs: tighten blueprint install guidance 2026-03-10 19:23:00 -07:00
bun-runtime fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty 2026-03-16 14:03:40 -07:00
carrier-relationship-management docs: resolve remaining operational skill comments 2026-03-10 21:13:55 -07:00
claude-api feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
claude-devfleet Add Claude DevFleet multi-agent orchestration skill (#505) 2026-03-16 13:35:50 -07:00
clickhouse-io fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
codebase-onboarding feat(skills): add codebase-onboarding skill (#553) 2026-03-20 00:20:20 -07:00
coding-standards fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
compose-multiplatform-patterns docs: tighten kotlin support examples 2026-03-10 20:53:39 -07:00
configure-ecc feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
content-engine feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
content-hash-cache-pattern fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
context-budget feat(commands): add /context-budget optimizer command (#554) 2026-03-20 00:20:23 -07:00
continuous-agent-loop feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
continuous-learning feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
continuous-learning-v2 Merge pull request #664 from ymdvsymd/fix/observer-sandbox-access-661 2026-03-20 00:16:42 -07:00
cost-aware-llm-pipeline fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
cpp-coding-standards fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
cpp-testing chore: replace external repo links with @username attribution 2026-03-03 12:32:35 -08:00
crosspost feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
customs-trade-compliance docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
data-scraper-agent feat(skill): add data-scraper-agent — AI-powered public data collection for any source (#503) 2026-03-16 13:35:44 -07:00
database-migrations fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
deep-research feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
deployment-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-security fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-tdd fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-verification fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
dmux-workflows fix: address remaining orchestration review comments 2026-03-12 15:34:05 -07:00
docker-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
documentation-lookup fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty 2026-03-16 14:03:40 -07:00
e2e-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
energy-procurement docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
enterprise-agent-ops feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
eval-harness feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
exa-search feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
fal-ai-media feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
foundation-models-on-device fix(skills): improve code examples in iOS 26 skills 2026-02-24 14:39:25 +09:00
frontend-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
frontend-slides chore: replace external repo links with @username attribution 2026-03-03 12:32:35 -08:00
golang-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
golang-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
inventory-demand-planning docs: resolve remaining operational skill comments 2026-03-10 21:13:55 -07:00
investor-materials feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
investor-outreach feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
iterative-retrieval fix: harden hook portability and plugin docs 2026-03-09 22:49:43 -07:00
java-coding-standards fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
jpa-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
kotlin-coroutines-flows docs: tighten kotlin support examples 2026-03-10 20:53:39 -07:00
kotlin-exposed-patterns feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
kotlin-ktor-patterns feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
kotlin-patterns feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
kotlin-testing fix: align kotlin diagnostics and heading hierarchy 2026-03-12 23:53:23 -07:00
laravel-patterns feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
laravel-security feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
laravel-tdd feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
laravel-verification feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
liquid-glass-design fix(skills): improve code examples in iOS 26 skills 2026-02-24 14:39:25 +09:00
logistics-exception-management docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
market-research feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
mcp-server-patterns feat(skills): add mcp-server-patterns (#531) 2026-03-16 13:35:11 -07:00
nanoclaw-repl feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
nextjs-turbopack fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty 2026-03-16 14:03:40 -07:00
nutrient-document-processing feat: add security guides and sanitize external links across repo 2026-02-25 07:20:42 -08:00
perl-patterns docs: tighten perl support guidance 2026-03-10 20:42:54 -07:00
perl-security docs: tighten perl support guidance 2026-03-10 20:42:54 -07:00
perl-testing feat: add Perl skills (patterns, security, testing) 2026-03-10 20:42:54 -07:00
plankton-code-quality feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
postgres-patterns chore: replace external repo links with @username attribution 2026-03-03 12:32:35 -08:00
production-scheduling docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
project-guidelines-example fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
prompt-optimizer feat(skills): add prompt-optimizer skill and /prompt-optimize command (#418) 2026-03-12 23:40:02 -07:00
python-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
python-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
pytorch-patterns feat(skills): add pytorch-patterns skill (#550) 2026-03-19 20:49:34 -07:00
quality-nonconformance docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
ralphinho-rfc-pipeline feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
regex-vs-llm-structured-text fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
returns-reverse-logistics docs: resolve remaining operational skill comments 2026-03-10 21:13:55 -07:00
rules-distill feat(skills): add rules-distill skill (rebased #561) (#678) 2026-03-20 01:44:55 -07:00
rust-patterns fix: resolve Windows CI failures and markdown lint (#667) 2026-03-20 00:29:17 -07:00
rust-testing feat(agents): add Rust language support (#523) 2026-03-16 13:34:25 -07:00
search-first feat: separate core vs niche skills and enforce research-first default 2026-02-28 10:06:43 -08:00
security-review fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
security-scan fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
skill-stocktake docs: add skill-stocktake agent invocation example 2026-03-10 20:15:38 -07:00
springboot-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
springboot-security fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
springboot-tdd fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
springboot-verification fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
strategic-compact feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
swift-actor-persistence fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
swift-concurrency-6-2 fix(skills): improve code examples in iOS 26 skills 2026-02-24 14:39:25 +09:00
swift-protocol-di-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
swiftui-patterns fix: correct SwiftUI skill ViewModel injection and Equatable comparison 2026-02-17 17:04:31 +02:00
tdd-workflow fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
team-builder feat(skills): add team-builder skill (#501) 2026-03-16 13:35:38 -07:00
verification-loop fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
video-editing feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
videodb feat: add /aside command (#407) 2026-03-12 23:52:46 -07:00
visa-doc-translate feat(skills): add visa-doc-translate skill 2026-02-20 16:25:23 +08:00
x-api fix: harden orchestration status and skill docs 2026-03-12 15:07:57 -07:00