
linter-driven-development
by buzzdan
ai coding rules for agents
SKILL.md
name: linter-driven-development description: | WHEN: User requests Go code work (implement, fix, add, refactor) or mentions @ldd in a Go project. Orchestrates complete workflow (Phases 1-5): design → test → implement → lint → fix → documentation. Auto-triggers parallel quality analysis and iterative fix loop until code is commit-ready. allowed-tools:
- Skill(go-linter-driven-development:code-designing)
- Skill(go-linter-driven-development:testing)
- Skill(go-linter-driven-development:refactoring)
- Skill(go-linter-driven-development:documentation)
- Task
Reference: See reference.md for agent prompt templates, example reports, and output formats.
<essential_principles> Auto-Pilot Behavior: This skill triggers automatically when Go code work is detected. After permission is granted, announce: "Using go-ldd workflow for this Go code work" and proceed to pre-flight check.
Trigger Conditions:
- User requests Go code work (implement, fix, add, refactor, update, change, modify, etc.)
- User mentions "ldd" or "@ldd" (shorthand for linter-driven-development)
- Working directory contains Go project (go.mod or .go files) </essential_principles>
<quick_start> Immediate Action: Run Pre-Flight Check, then execute phases sequentially until commit-ready.
- Pre-Flight: Verify Go project, find test/lint commands, identify plan context
- Phase 1: Design types (if needed) → Write tests → Implement code
- Phase 2: Run quality-analyzer agent → Route based on status
- Phase 3: Fix loop until CLEAN_STATE
- Phase 4: Documentation
- Phase 5: Present commit summary with options </quick_start>
<pre_flight_check> ALWAYS RUN FIRST
Extract commands:
- Test command:
go test,make test,task test - Lint command:
golangci-lint run --fix,make lint,task lintwithfix - Fallbacks:
go test ./...andgolangci-lint run --fix
<decision_tree> </decision_tree> </pre_flight_check>
Write Tests First:
- Invoke @testing skill for guidance
- Write table-driven tests or testify suites
- Target: 100% coverage on new leaf types
Implement Code:
- Follow coding principles from coding_rules.md
- Keep functions <50 LOC, max 2 nesting levels
- Use self-validating types, prevent primitive obsession
The agent automatically:
- Executes tests, linter, and code review in parallel (40-50% faster)
- Identifies overlapping issues with root cause analysis
- Returns structured report with prioritized fixes
<test_focus_mode> Loop until tests pass:
- Analyze failure root cause
- Apply fix to implementation or tests
- Re-run quality-analyzer (mode: "full")
- Check status → continue or exit loop
Max 10 iterations. If stuck, ask user for guidance. </test_focus_mode>
-
Apply Fix:
- Invoke @refactoring skill with file, function, issues, and root cause
- @refactoring applies patterns: early returns, extract function, storifying, extract type, switch extraction, extract constant
-
Verify Fix (Incremental Mode):
- Re-run quality-analyzer with
mode: incremental - See
reference.md→ "Agent Prompt Templates" for prompt - Agent returns delta report: fixed, remaining, new issues
- Re-run quality-analyzer with
-
Route Based on Status:
TEST_FAILURE→ Enter Test Focus ModeCLEAN_STATE→ Break loop, go to Phase 4ISSUES_FOUND→ Continue to next fix (or retry if no progress)
-
Safety Limits:
- Max 10 iterations per fix loop
- If stuck after 3 attempts → show status, ask user
Loop until agent returns CLEAN_STATE.
Verify: Run go doc -all ./... and ensure examples compile.
Present user with options:
- Commit as-is
- Fix design debt only, then commit
- Fix design + readability debt, then commit
- Fix all findings, then commit
- Refactor entire file, then commit
<workflow_control> </workflow_control>
Agents invoked:
go-linter-driven-development:quality-analyzer(Phase 2 and Phase 3 verification)- Internally delegates to
go-linter-driven-development:go-code-reviewerfor design analysis
- Internally delegates to
After committing:
- Feature complete → Already documented in Phase 4
- More work needed → Run this workflow again for next commit
<success_criteria> Workflow is complete when ALL of the following are true:
- Pre-flight check passed (Go project verified, commands discovered)
- Phase 1 complete (tests written, code implemented)
- Quality-analyzer returns
CLEAN_STATE:- Tests pass
- Linter passes (0 errors)
- Code review clean (0 findings)
- Phase 4 complete (documentation added/updated)
- Commit summary presented to user with options
- User has chosen commit action (or deferred) </success_criteria>
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です