AgentSkillsCN

feedback-loop

自动化反馈收集与学习文档生成。从问题中提炼经验教训,为架构决策生成 ADR,并引导用户进行回顾性思考与洞察。

SKILL.md
--- frontmatter
name: feedback-loop
description: Automated feedback collection and learning documentation. Captures learnings from issues, generates ADRs for architecture decisions, and prompts for retrospective insights.

Feedback Loop Skill

Automates collection of learnings, architectural decisions, and retrospective insights.

Usage

bash
/feedback <command> [options]
CommandDescriptionOutput Location
learningRecord learning from issue/bugdocs/feedback/LEARNINGS.md
adrCreate Architecture Decision Recorddocs/adr/ADR-{N}-{slug}.md
retroGenerate retrospective templatedocs/retros/sprint-N-retro.md
reviewReview recent learnings/decisionsConsole output

/feedback learning

bash
/feedback learning "Database connection pooling prevents timeout errors"
/feedback learning --from-issue ISS-042

Prompts: What was the problem? → Root cause? → What learned? → Future prevention?

Learning Format

markdown
## LRN-{N}: {Title}
**Date**: {date} | **Category**: {category} | **Related**: {issue_id}
### Context / Problem / Root Cause / Learning / Application
### Tags: `{tag1}` `{tag2}`

/feedback adr

bash
/feedback adr "Use PostgreSQL over MySQL"
/feedback adr --title "Authentication Strategy" --status proposed
OptionValues
--titleADR title
--statusproposed, accepted, deprecated, superseded
--supersedesADR number this replaces

Prompts: Context/problem? → Options considered? → Decision? → Consequences?

ADR Format

markdown
# ADR-{N}: {Title}
**Status**: {status} | **Date**: {date} | **Deciders**: {names}
## Context → Decision Drivers → Considered Options → Decision → Consequences

/feedback retro

bash
/feedback retro                    # Current sprint
/feedback retro --milestone "v1.0" # For milestone
/feedback retro --quick            # Quick 3-question
ModeSections
QuickWhat went well? / What could improve? / What to try?
FullKeep / Problem / Try / Action items / Velocity analysis

/feedback review

bash
/feedback review                   # Last 10 items
/feedback review --category bugs   # Filter by category
/feedback review --last 30d        # Last 30 days

Auto-Triggers

TriggerWhenAction
Issue Resolutionfix: or closes # commitPrompt for learning
Architecture ChangeCore infrastructure modifiedPrompt for ADR

Categories

Learning Categories

CategoryKeywordsExample
bugsfix, error, crashMemory leak patterns
performanceslow, optimize, cacheQuery optimization
securityauth, vulnerabilityInput validation
architecturedesign, patternEvent sourcing
toolingbuild, deploy, ciDocker multi-stage
processworkflow, teamCode review practices

ADR Categories

CategoryWhen to Use
infrastructureDatabase, hosting, scaling
architecturePatterns, structure, modules
securityAuth, encryption, compliance
integrationAPIs, third-party, protocols
processDevelopment workflow, tools

File Structure

code
docs/
├── feedback/LEARNINGS.md, INDEX.md
├── adr/INDEX.md, ADR-{N}-{slug}.md, template.md
└── retros/sprint-N-retro.md, milestone-{name}-retro.md

Configuration

json
{
  "feedback": {
    "auto_prompt_on_fix": true,
    "auto_prompt_on_arch_change": true,
    "learning_categories": ["bugs", "performance", "security", "architecture"],
    "adr_auto_number": true,
    "retro_template": "full",
    "review_default_count": 10
  }
}

Best Practices

TypeDODON'T
LearningRecord immediately, include examples, tag for searchSkip "obvious" learnings, be too brief
ADRCreate before implementation, include rejected optionsCreate for trivial decisions, forget consequences
RetroHold within 24h, assign owners to actionsBlame individuals, skip action items

Related

SkillPurpose
/sprintSprint management with retro
/agile-syncInclude feedback in sync
/docGeneral documentation