Skip to content

/reflect

Per-project self-improvement - reads the .harness ledger and feedback memories, then proposes gated rule/threshold/ADR changes so the project stops repeating mistakes. Run periodically.

From plugin
agent-starter
758 skills5 hooks

Claude Code

$ npx -y skills add sneg55/agent-starter --skill reflect --agent claude-code

SKILL.md

reflect.SKILL.md
name: reflect
description: Per-project self-improvement - reads the .harness ledger and feedback memories, then proposes gated rule/threshold/ADR changes so the project stops repeating mistakes. Run periodically.
user_invocable: true
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep

Reflect: Per-Project Self-Improvement

You are performing a reflection - turning the signal this project has captured into durable improvements. Nothing is applied without the developer's approval.

Phase 1 - Orient (gather signal)

  • Run the stats script over the ledger:

`~/.claude/hooks/harness-ledger-stats.sh --ledger .harness/ledger.jsonl --min-recurr 3` If that path doesn't exist, the hooks aren't installed at `~/.claude/hooks/` - run the copy from wherever this project keeps them. If the script prints all zeros there is no ledger yet (no signal captured) - stop; there is nothing to reflect on.

  • Read the current project rules in `CLAUDE.md` so you improve them rather than duplicate.
  • Read recent `feedback`-type memory files - these are the developer's explicit

corrections and are the highest-value signal. Locate the memory directory first (it sits next to `MEMORY.md`; `find . -name MEMORY.md` if unsure), then `grep -l 'type: feedback' <memory-dir>/*.md`.

  • Read the most recent `.harness/reflections/*.md` report (if any) to recall the last

metric snapshot and what was already changed.

Phase 2 - Cluster

From the stats output and feedback memories, identify recurring problems:

  • Each `recurring <rule> <prefix> <count>` line is a friction cluster - the same check

keeps firing in the same area.

  • Group related feedback corrections by theme.
  • Ignore one-off events; focus on what repeats.

Phase 3 - Propose (one candidate per cluster)

For each cluster, draft exactly one proposed change, choosing the fitting type:

| Type | When | Where it lands | |------|------|----------------| | **Project rule** | a convention would stop the repeat | append to `CLAUDE.md` project-specific section | | **Threshold change** | a guardrail is too strict/loose | a diff to `.claude/settings.json` or the hook - **shown, never auto-applied** | | **Lint rule** | the mistake is mechanically catchable | a diff to `eslint.config.mjs` / `biome.jsonc` | | **ADR / knowledge** | durable "why" worth keeping | a new memory file or `docs/adr/` note |

Present all proposals together as a numbered list with the concrete change for each.

Phase 4 - Gate & Record

  • Ask the developer to approve, edit, or reject each proposal (like `/remember`).
  • Apply only the approved ones, then commit them (use `/commit`).
  • Create `.harness/reflections/` if needed (`mkdir -p .harness/reflections`), then write a

reflection report to `.harness/reflections/YYYY-MM-DD.md` containing:

  • the full stats output (the **metric snapshot**, so the next reflection can compare),
  • the clusters you found,
  • which proposals were approved / rejected and why.

The report is committed; the raw `.harness/ledger.jsonl` stays gitignored. Signal is private; wisdom is shared.

Measuring success

The headline metric is `recurring_events` from the stats output. Compare it to the value in the previous reflection report. If a rule you promoted last time worked, the cluster it targeted should have shrunk. Note the trend explicitly in the new report.

Read more
@sneg55
Ships withagent-starter

Skills, hooks, templates, and engineering guides for bootstrapping AI-agent-friendly projects, with a per-project self-improvement loop.

Stars on GitHub

Momentum

stars in total
75
Star history of sneg55/agent-starter on GitHub, a chart by star-history.com

Other skills on agent-starter.

adopt-project
Auto-invoked

adopt-project

Apply agent-starter patterns to an EXISTING project - audits the codebase, proposes components by invasiveness tier (hooks,…

commit-push-pr
Auto-invoked

commit-push-pr

Full git workflow - creates branch, commits, pushes, and creates or updates a PR with summary and test plan.

commit
Auto-invoked

commit

Create a single well-crafted git commit from current changes. Analyzes diff, follows repo's commit style, and writes a concise…

dream
Auto-invoked

dream

Memory consolidation - review, merge, prune, and index memory files. Run periodically to keep memories organized and up-to-date.

new-project
Auto-invoked

new-project

Full project bootstrap - interviews the developer (name, description, stack, components), then scaffolds directory structure,…

remember
Auto-invoked

remember

Review auto-memory entries and propose promotions to CLAUDE.md, CLAUDE.local.md, or shared memory. Also detects outdated,…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about reflect.

Which coding agents can use reflect?
reflect installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.