| name | loopany-reflect |
| description | Self-improvement loop for loopany. Reads recent task outcomes + dismissed signals, discovers patterns, writes learning and skill-proposal artifacts. Also handles accepting/rejecting proposals. Triggers: 'reflect', 'what have we learned', 'improve yourself', โฅ3 tasks done recently, 'accept <proposal-id>', 'reject <proposal-id>', 'review proposals', writing a learning or skill-proposal from any source. |
loopany-reflect โ self-improvement loop
Two modes: reflect (discover patterns โ write learnings + proposals)
and proposal-apply (accept or reject a pending proposal).
Part 1: Reflect
When to run
- User asks: "reflect", "what have we learned", "improve yourself"
- Weekly cadence (monthly structural review โ
loopany-review)
- After โฅ 3 tasks flip to
done in a short window
Don't run reactively after every single task.
Step 1 โ Gather evidence
loopany artifact list --kind task --status done
loopany artifact list --kind signal
loopany artifact list --kind signal --status dismissed
loopany artifact list --kind learning --status active
loopany artifact list --kind skill-proposal --status rejected
Filter to recent by createdAt (newest first). Default window โ 1 week.
Filter out already-processed evidence. Union evidence fields from
active learnings and non-rejected proposals โ subtract from candidates.
Exception: learning revalidation on checkAt belongs in
loopany-review ยง Daily, not here. Reflect looks forward; daily review
looks back.
For each fresh candidate: loopany artifact get <id>
Step 2 โ Look for patterns
| Pattern | Threshold |
|---|
| Same class of outcome | โฅ 3 tasks |
| A belief is refuted | โฅ 2 tasks where old learning predicts wrong |
| A belief needs a caveat | โฅ 2 tasks |
| Signal keeps being dismissed but recurs | โฅ 3 dismissals over โฅ 2 weeks |
Good: 4 metric tasks without baselines โ learning about unfalsifiable outcomes โ proposal to require ## Before.
Bad: 1 bad outcome โ not a pattern. Already-rejected proposal โ don't re-suggest.
Step 3 โ Write a learning
โ See ../loopany-core/kinds/learning.md ยง Playbook for schema.
loopany artifact create --kind learning \
--slug short-attention-spans-2026 \
--title "<declarative belief sentence>" \
--evidence "<task-slug-1>,<task-slug-2>" \
--mentions "<mission-slug>" \
--check-at 2026-07-22 \
--content "$(cat <<'EOF'
## Observation
<what you saw across evidence>
## Evidence
- <task-slug-1> โ "<outcome summary>"
- <task-slug-2> โ "<outcome summary>"
## Scope
<when this applies and doesn't>
## Check-at
<why this date; what question to answer>
EOF
)"
Key fields: title = belief itself, evidence โฅ 2 IDs, checkAt 1-3 months.
Always --slug learnings โ they get [[cited]] a lot.
Step 4 โ Write a skill-proposal (if warranted)
Only if the learning implies a concrete skill edit. Many learnings stop
at "now I know."
โ See ../loopany-core/kinds/skill-proposal.md for schema.
Required body sections:
## Motivation โ cite the learning
## Proposed change โ target file, intent, location, approximate content
## Expected effect โ short-term and long-term
## Check-at โ why this date
When changeType: add (new skill):
--target-skill = to-be-created path
## Proposed change must name existing skills considered and why rejected
- Add
## Skill draft (full SKILL.md with frontmatter) + ## Resolver entry
Step 5 โ Verify evidence chain
loopany trace <proposal-slug> --direction backward
If learning supersedes an older one:
loopany refs add --from <new-learning> --to <old-learning> --relation supersedes
loopany artifact status <old-learning> superseded --reason "superseded by <new-learning>"
Part 2: Proposal Apply
When to run
- "accept ", "reject ", "let's take that proposal"
- Batch review of pending proposals
loopany artifact list --kind skill-proposal --status pending
Accept flow
- Read proposal:
loopany artifact get <proposal-slug>
- Read cited learning:
loopany refs <proposal-slug> --direction out --relation mentions
- Read current target file
- Apply edit faithfully โ only the described change
- Append
## Outcome to proposal (what literally changed, interpretations)
- Flip status:
loopany artifact status <proposal-slug> accepted --reason "..."
- Git commit: target file + proposal together
Reject flow
- Read proposal
- Append
## Outcome with reason โ future reflect reads this
- Flip status:
loopany artifact status <proposal-slug> rejected --reason "..."
Edge cases
- Target file doesn't exist โ reject
- Cited learning superseded โ reject
- Multiple proposals same file โ accept one at a time, re-read between
Anti-patterns
- โ Reflecting on single task โ not a pattern.
- โ Skipping fresh-evidence filter โ produces duplicates.
- โ Proposing without a learning โ no evidence trail.
- โ Re-suggesting rejected proposal โ check list first.
- โ
add without ## Resolver entry โ dead code.
- โ Trigger phrases in jargon โ mirror real user language.
- โ Editing skill file directly โ always go through proposals.
- โ Editing beyond proposal scope โ the proposal is the contract.
- โ Accept without reading learning โ can't verify scope.
- โ Empty Outcome on accept/reject.
Quick reference
REFLECT: evidence โ pattern โ learning โ (optional) proposal โ user accept โ edit
ACCEPT: read spr โ read lrn โ read target โ edit โ Outcome โ status โ commit
REJECT: read spr โ Outcome (with reason) โ status