apply-dreaming
Skill42 starsChanged 4 months agoApache-2.0View on GitHub
Read the latest session-indexer dreaming report and
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debugSkill
- doubt-driven-developmentSkill
- find-bugsSkill
- fix-reviewSkill
- grill-meSkill
- housekeepingSkill
- improveSkill
- revivalSkill
- self-learnSkill
- session-endSkill
- shipSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Read REPORT. For each numbered sub-item under a section, extract:
- Very specific: line 64
Confidence inheritance: If a sub-item has no explicit confidence field, inherit it from the enclosing section.
- Very specific: line 68
Idempotency — skip already-marked items: If the next non-blank line after an item starts with > [applied …], > [planned …], > [skipped …], …
- Very specific: line 109
Direct branch+PR path: only for branch-hygiene cleanup (no code change, just a git-history fix) and .claude/dreaming/*.sh script edits that …
- Very specific: line 120
Don't implement directly — /ship owns the issue → implement → /fix-review → merge → close pipeline.
- Very specific: line 127
If a commit landed on it after merge, that commit's changes need to move to a fresh branch off main — cherry-pick onto git checkout main && …
- Distinctive: line 139
Commit, push, open a PR, merge per the project's normal PR convention.
- Distinctive: line 149
After each applied item, append (never rewrite the original):
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/apply-dreaming (session-indexer)
Walks each dreaming-report finding interactively and leaves an audit
trail ([applied YYYY-MM-DD] / [planned …] / [skipped …] markers
appended to the report).
When to invoke
- Monday morning after the Sunday cron-run produced a fresh report.
- Or any time after a manual
.claude/dreaming/dreaming.shrun. - Or
/apply-dreaming(with optionallatestor2026-W##argument).
Inputs
- Optional argument:
latest(default) orYYYY-W##. - Project root:
~/wrk/projects/session-indexer/session-indexer/.
Steps
1. Locate report
WEEK="${1:-latest}"
DIR=".claude/dreaming/reports"
if [[ "$WEEK" == "latest" ]]; then
REPORT=$(find "$DIR" -maxdepth 1 -type f -name '[0-9][0-9][0-9][0-9]-W*.md' \
-printf '%T@ %p\n' 2>/dev/null \
| sort -rn | head -1 | cut -d' ' -f2-)
else
REPORT="$DIR/$WEEK.md"
fi2. Parse into structured items
Read REPORT. For each numbered sub-item under a section, extract:
id,title,confidence(high/medium/low)evidence— file:line / commit shasuggestioncategory— infer from the suggestion:- any Key Constraints violation (CGO, Go patch pin, 60s budget,
per-project isolation) →
constraint-fix— this project is deployed via systemd across 8+ other projects; treat as highest-priority regardless of stated confidence - "update
docs/architecture.md" / schema drift →update-docs - "code change / fix drift / implement" →
code-change - "merge skills / new convention" →
update-tooling - "stale-branch commit" →
branch-hygiene - else →
other
- any Key Constraints violation (CGO, Go patch pin, 60s budget,
per-project isolation) →
Confidence inheritance. If a sub-item has no explicit confidence
field, inherit it from the enclosing section. Default medium only
when neither declares one.
Idempotency — skip already-marked items. If the next non-blank
line after an item starts with > [applied …], > [planned …],
> [skipped …], or > [manual-review-required …], skip it silently.
The report is appended to (never rewritten) on each pass. Print a
summary at the start: 2026-W##: M new items (N already-processed
skipped).
3. Show TL;DR + counts
2026-W##: N items (X high, Y medium, Z low)
TL;DR: ...
Process all? [y/select/skip-low/abort]4. Triage walk
Iterate high → medium → low, but surface any constraint-fix item
first regardless of its stated confidence — this binary runs inside
other projects' Stop hooks; a regression here is a multi-project
outage, not a local inconvenience.
[H 1/N] §<id> <title>
Evidence: <file:line / commit>
Suggestion: <suggestion>
[a]pply / [s]kip / [v]erify-first / [e]vidence / [q]uitFor low (non-constraint): skip silently unless the user opted in.
5. Apply per category
Routing rule. Two paths — this project has no /backlog step, so
"plan-and-gate" means a GitHub issue directly, not a plan file:
- Issue-and-ship path for anything touching correctness or the
Key Constraints:
constraint-fix,code-change,update-docs,update-tooling.gh issue createwith a body citing the dreaming finding, then/ship <issue-number>. - Direct branch+PR path only for
branch-hygienecleanup (no code change, just a git-history fix) and.claude/dreaming/*.shscript edits that don't touchCLAUDE.md's Key Constraints.
constraint-fix / code-change / update-docs / update-tooling — issue-and-ship
gh issue create --title "<slug>" --body "..."citing report§<id>, evidence (file:line/commit), suggested fix, acceptance criteria. Forconstraint-fix, explicitly name which Key Constraint is at risk.- Tell the user: "Created issue #
<N>. Run/ship <N>to implement." - Don't implement directly —
/shipowns the issue → implement →/fix-review→ merge → close pipeline.
branch-hygiene — direct fix, no code change
- Confirm the branch has a merged PR (
gh pr list --state merged --search "head:<branch>"). - If a commit landed on it after merge, that commit's changes need to
move to a fresh branch off
main— cherry-pick ontogit checkout main && git pull --ff-only && git checkout -b <new-branch>, verify, open a fresh PR. Don't leave orphaned commits on the stale branch.
update-tooling (dreaming script only, not the prompt) — branch+PR
For fixes to dreaming.sh itself:
git switch -c fix-dreaming-w##-<slug>offmain.- Edit the script; smoke-test with
bash -n .claude/dreaming/dreaming.sh. - Commit, push, open a PR, merge per the project's normal PR convention.
other — manual review
Print suggestion + evidence. Don't apply. Annotate
[manual-review-required 2026-MM-DD].
6. Annotate report
After each applied item, append (never rewrite the original):
> [applied 2026-MM-DD: <action>; commit <sha>; PR <num>]For created issues:
> [planned 2026-MM-DD: issue #<N>; awaiting /ship]For skipped:
> [skipped 2026-MM-DD: <reason>]7. Final summary
Applied: N (direct branch-hygiene / tooling PRs)
Issues created: M (awaiting /ship)
Manual review: K
Skipped: P
PRs opened: <list>
Issues pending: <list>
Next steps: run /ship on each issue (constraint-fix issues first).Constraints (CRITICAL)
- NEVER commit or push directly to
main. - NEVER downgrade a
constraint-fixitem's priority based on stated confidence — surface it first regardless. This binary's behavior is load-bearing for 8+ other projects' Stop hooks. - NEVER auto-apply low confidence (non-constraint) without explicit request.
- ALWAYS cite report-section (
§<id>) in issue bodies, commit messages, and PR bodies. - Confirm before destructive ops even at high confidence.
- Check for the stale-branch anti-pattern (
CLAUDE.md's "Before Any Commit" section) before committing anything onto an existing branch, not just forbranch-hygieneitems.
Anti-patterns
- ❌ Commit or push to
maindirectly, tooling included. - ❌ Treat a
constraint-fixfinding as routine — it needs the same scrutiny as a multi-project regression report, not a shrug because the model's confidence label said "low." - ❌ Commit onto a branch that already has a merged PR.
- ❌ Modify the report's original suggestions (annotate only).
- ❌ Apply a finding without verifying it against current code first.
Companion skills
/ship— issue → implement →/fix-review→ merge → close./fix-review— parallel multi-model review + Claude Arbiter (part of/ship)./revival,/find-bugs,/improve— complementary read-only checks.
See also
.claude/dreaming/dreaming-prompt.md— what the dreaming pass looks for..claude/dreaming/dreaming.sh— how the pass is run (systemd timer).CLAUDE.md"Key Constraints" section — target ofconstraint-fixfindings.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

