ramstack 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/agents/comment-sicko.md +32 -0
- package/agents/poteto-agent.md +9 -0
- package/cli/rstack.mjs +539 -0
- package/package.json +29 -0
- package/skills/architect/README.md +25 -0
- package/skills/architect/SKILL.md +83 -0
- package/skills/architect/agents/openai.yaml +5 -0
- package/skills/architect/references/design-red-flags.md +33 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/README.md +21 -0
- package/skills/arena/SKILL.md +71 -0
- package/skills/arena/agents/openai.yaml +5 -0
- package/skills/automate-me/README.md +21 -0
- package/skills/automate-me/SKILL.md +109 -0
- package/skills/automate-me/agents/openai.yaml +5 -0
- package/skills/blast-radius/README.md +21 -0
- package/skills/blast-radius/SKILL.md +50 -0
- package/skills/blast-radius/agents/openai.yaml +5 -0
- package/skills/bro/README.md +16 -0
- package/skills/bro/SKILL.md +7 -0
- package/skills/bro/agents/openai.yaml +5 -0
- package/skills/create-verification-skill/README.md +22 -0
- package/skills/create-verification-skill/SKILL.md +44 -0
- package/skills/create-verification-skill/agents/openai.yaml +5 -0
- package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/skills/figure-it-out/README.md +22 -0
- package/skills/figure-it-out/SKILL.md +55 -0
- package/skills/figure-it-out/agents/openai.yaml +5 -0
- package/skills/how/README.md +25 -0
- package/skills/how/SKILL.md +134 -0
- package/skills/how/agents/openai.yaml +3 -0
- package/skills/how/references/critic-prompt.md +59 -0
- package/skills/how/references/critique-rubric.md +58 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +52 -0
- package/skills/interrogate/README.md +21 -0
- package/skills/interrogate/SKILL.md +112 -0
- package/skills/interrogate/agents/openai.yaml +5 -0
- package/skills/interrogate/references/code-quality-review.md +47 -0
- package/skills/interrogate/references/lead-judgment.md +58 -0
- package/skills/interrogate/references/reviewer-prompt.md +72 -0
- package/skills/interrogate/references/rubric.md +77 -0
- package/skills/maintain-verification-skill/README.md +21 -0
- package/skills/maintain-verification-skill/SKILL.md +39 -0
- package/skills/maintain-verification-skill/agents/openai.yaml +5 -0
- package/skills/no-comments/README.md +22 -0
- package/skills/no-comments/SKILL.md +24 -0
- package/skills/no-comments/agents/openai.yaml +5 -0
- package/skills/poteto-mode/README.md +26 -0
- package/skills/poteto-mode/SKILL.md +140 -0
- package/skills/poteto-mode/agents/openai.yaml +5 -0
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +13 -0
- package/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/skills/poteto-mode/playbooks/babysit.md +27 -0
- package/skills/poteto-mode/playbooks/bug-fix.md +17 -0
- package/skills/poteto-mode/playbooks/eval.md +27 -0
- package/skills/poteto-mode/playbooks/feature.md +21 -0
- package/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +3 -0
- package/skills/poteto-mode/playbooks/opening-a-pr.md +11 -0
- package/skills/poteto-mode/playbooks/orchestrate.md +113 -0
- package/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/skills/poteto-mode/playbooks/perf-issue.md +24 -0
- package/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/skills/poteto-mode/playbooks/session-pickup.md +13 -0
- package/skills/poteto-mode/playbooks/shipping.md +20 -0
- package/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/skills/poteto-mode/references/plan.md +105 -0
- package/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/skills/poteto-mode/scripts/bun.lock +67 -0
- package/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
- package/skills/poteto-mode/scripts/orch/orch.ts +578 -0
- package/skills/poteto-mode/scripts/orch/store.ts +1607 -0
- package/skills/poteto-mode/scripts/package.json +16 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
- package/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
- package/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
- package/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
- package/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
- package/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
- package/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/skills/poteto-mode/scripts/worktree-audit.sh +86 -0
- package/skills/principle-boundary-discipline/README.md +17 -0
- package/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/skills/principle-boundary-discipline/agents/openai.yaml +5 -0
- package/skills/principle-build-the-lever/README.md +17 -0
- package/skills/principle-build-the-lever/SKILL.md +23 -0
- package/skills/principle-build-the-lever/agents/openai.yaml +5 -0
- package/skills/principle-encode-lessons-in-structure/README.md +17 -0
- package/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
- package/skills/principle-encode-lessons-in-structure/agents/openai.yaml +5 -0
- package/skills/principle-exhaust-the-design-space/README.md +17 -0
- package/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/skills/principle-exhaust-the-design-space/agents/openai.yaml +5 -0
- package/skills/principle-experience-first/README.md +17 -0
- package/skills/principle-experience-first/SKILL.md +19 -0
- package/skills/principle-experience-first/agents/openai.yaml +5 -0
- package/skills/principle-fix-root-causes/README.md +17 -0
- package/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/skills/principle-fix-root-causes/agents/openai.yaml +5 -0
- package/skills/principle-foundational-thinking/README.md +17 -0
- package/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/skills/principle-foundational-thinking/agents/openai.yaml +5 -0
- package/skills/principle-guard-the-context-window/README.md +17 -0
- package/skills/principle-guard-the-context-window/SKILL.md +17 -0
- package/skills/principle-guard-the-context-window/agents/openai.yaml +5 -0
- package/skills/principle-laziness-protocol/README.md +17 -0
- package/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/skills/principle-laziness-protocol/agents/openai.yaml +5 -0
- package/skills/principle-make-operations-idempotent/README.md +17 -0
- package/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/skills/principle-make-operations-idempotent/agents/openai.yaml +5 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/README.md +17 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/agents/openai.yaml +5 -0
- package/skills/principle-minimize-reader-load/README.md +17 -0
- package/skills/principle-minimize-reader-load/SKILL.md +23 -0
- package/skills/principle-minimize-reader-load/agents/openai.yaml +5 -0
- package/skills/principle-model-the-domain/README.md +17 -0
- package/skills/principle-model-the-domain/SKILL.md +26 -0
- package/skills/principle-model-the-domain/agents/openai.yaml +5 -0
- package/skills/principle-never-block-on-the-human/README.md +16 -0
- package/skills/principle-never-block-on-the-human/SKILL.md +23 -0
- package/skills/principle-never-block-on-the-human/agents/openai.yaml +5 -0
- package/skills/principle-outcome-oriented-execution/README.md +16 -0
- package/skills/principle-outcome-oriented-execution/SKILL.md +22 -0
- package/skills/principle-outcome-oriented-execution/agents/openai.yaml +5 -0
- package/skills/principle-prove-it-works/README.md +18 -0
- package/skills/principle-prove-it-works/SKILL.md +33 -0
- package/skills/principle-prove-it-works/agents/openai.yaml +5 -0
- package/skills/principle-redesign-from-first-principles/README.md +16 -0
- package/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/skills/principle-redesign-from-first-principles/agents/openai.yaml +5 -0
- package/skills/principle-separate-before-serializing-shared-state/README.md +16 -0
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/skills/principle-separate-before-serializing-shared-state/agents/openai.yaml +5 -0
- package/skills/principle-sequence-verifiable-units/README.md +18 -0
- package/skills/principle-sequence-verifiable-units/SKILL.md +22 -0
- package/skills/principle-sequence-verifiable-units/agents/openai.yaml +5 -0
- package/skills/principle-subtract-before-you-add/README.md +17 -0
- package/skills/principle-subtract-before-you-add/SKILL.md +22 -0
- package/skills/principle-subtract-before-you-add/agents/openai.yaml +5 -0
- package/skills/principle-type-system-discipline/README.md +19 -0
- package/skills/principle-type-system-discipline/SKILL.md +31 -0
- package/skills/principle-type-system-discipline/agents/openai.yaml +5 -0
- package/skills/recall/README.md +23 -0
- package/skills/recall/SKILL.md +35 -0
- package/skills/recall/agents/openai.yaml +5 -0
- package/skills/reflect/README.md +24 -0
- package/skills/reflect/SKILL.md +77 -0
- package/skills/reflect/agents/openai.yaml +5 -0
- package/skills/reflect/references/divergent-reviewer.md +43 -0
- package/skills/reflect/references/judgment-reviewer.md +42 -0
- package/skills/reflect/references/synthesizer.md +56 -0
- package/skills/reflect/references/tooling-reviewer.md +57 -0
- package/skills/setup-rstack/README.md +25 -0
- package/skills/setup-rstack/SKILL.md +81 -0
- package/skills/setup-rstack/agents/openai.yaml +3 -0
- package/skills/show-me-your-work/README.md +23 -0
- package/skills/show-me-your-work/SKILL.md +82 -0
- package/skills/show-me-your-work/agents/openai.yaml +5 -0
- package/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/skills/show-me-your-work/scripts/log.sh +40 -0
- package/skills/swarm/README.md +21 -0
- package/skills/swarm/SKILL.md +46 -0
- package/skills/swarm/agents/openai.yaml +5 -0
- package/skills/tdd/README.md +21 -0
- package/skills/tdd/SKILL.md +44 -0
- package/skills/tdd/agents/openai.yaml +5 -0
- package/skills/teach/README.md +22 -0
- package/skills/teach/SKILL.md +21 -0
- package/skills/teach/agents/openai.yaml +5 -0
- package/skills/technical-writing/README.md +23 -0
- package/skills/technical-writing/SKILL.md +130 -0
- package/skills/technical-writing/agents/openai.yaml +5 -0
- package/skills/typescript-best-practices/README.md +22 -0
- package/skills/typescript-best-practices/SKILL.md +28 -0
- package/skills/typescript-best-practices/agents/openai.yaml +3 -0
- package/skills/typescript-best-practices/references/patterns.md +292 -0
- package/skills/unslop/README.md +21 -0
- package/skills/unslop/SKILL.md +80 -0
- package/skills/unslop/agents/openai.yaml +3 -0
- package/skills/why/README.md +26 -0
- package/skills/why/SKILL.md +229 -0
- package/skills/why/agents/openai.yaml +3 -0
- package/skills/why/references/epistemics.md +144 -0
- package/skills/why/references/investigator-prompt.md +103 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/code-archaeology.md +88 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +99 -0
- package/skills/why/references/sources/incident-postmortem.md +15 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/sentry.md +100 -0
- package/skills/why/references/sources/slack.md +54 -0
- package/skills/why/references/synthesizer-prompt.md +135 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Minimize reader load
|
|
2
|
+
|
|
3
|
+
Maintainability is the work a reader does to understand code. Minimize it.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- You review or shape code that is hard to trace.
|
|
8
|
+
- You count layers between a question and its answer.
|
|
9
|
+
- You notice hidden or mutable state the reader must track mentally.
|
|
10
|
+
|
|
11
|
+
## The rule
|
|
12
|
+
|
|
13
|
+
Track two axes: layers to trace and state to hold. Collapse wrappers with one caller, pass-through layers, and adapters with no second implementation. Shrink state scope by preferring pure functions, locals over fields, and derivation over synchronization. A new reader should answer "where does X come from?" in under 30 seconds.
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-minimize-reader-load
|
|
3
|
+
description: "Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Minimize Reader Load
|
|
8
|
+
|
|
9
|
+
Maintainability is the work a reader must do to understand code. Track two axes:
|
|
10
|
+
1. **Layers to trace.** How many indirections sit between the question and the answer.
|
|
11
|
+
2. **State to hold.** How much hidden or mutable context the reader must keep in their head.
|
|
12
|
+
|
|
13
|
+
**Why:** Code is read far more than it is written. LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of [Guard the Context Window](../principle-guard-the-context-window/SKILL.md): working memory is finite for readers too.
|
|
14
|
+
|
|
15
|
+
**The pattern:**
|
|
16
|
+
- **Collapse layers** that do not earn their keep: wrappers with one caller, adapters with no second implementation, indirection introduced for a future that never came. Inline them.
|
|
17
|
+
- **Make adjacent layers change the abstraction.** A layer that repeats the same methods and arguments adds reader load without compression. Collapse pass-through layers.
|
|
18
|
+
- **Demand interface compression.** A broad interface that hides little complexity makes readers learn both the surface and the implementation. Prefer boundaries that hide meaningful decisions.
|
|
19
|
+
- **Shrink state scope:** prefer pure functions (returns over mutations), locals over fields, fields over module state, and module state over globals. Derive instead of sync.
|
|
20
|
+
- **Name the invariant at the boundary,** not in every consumer, so the reader learns it once.
|
|
21
|
+
- Before adding a layer or a piece of state, ask: does this reduce reader load somewhere else by at least as much?
|
|
22
|
+
|
|
23
|
+
**The test:** Can a new reader answer "where does X come from?" and "what can change X?" in under 30 seconds? If not, cut layers or cut state.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Model the domain
|
|
2
|
+
|
|
3
|
+
Encode the real domain in a data structure instead of scattering it across conditionals.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Writing stateful logic, or code that branches heavily.
|
|
8
|
+
- Code repeats a shape assumption across files.
|
|
9
|
+
- A new feature grows an existing if/else chain by one branch.
|
|
10
|
+
|
|
11
|
+
## The rule
|
|
12
|
+
|
|
13
|
+
Reach for the structure that fits: a state machine instead of scattered booleans, a typed model instead of loose parameters, a map or discriminated union instead of branching spread across files, a reducer instead of ad hoc mutations. Do not force an abstraction when the current shape is clear, local, and unlikely to grow. The tell that you skipped this is a second boolean that must stay in sync with the first.
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-model-the-domain
|
|
3
|
+
description: "Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files. Encode the domain in a structure instead of scattered conditionals."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Model the Domain
|
|
8
|
+
|
|
9
|
+
Encode the real domain in a data structure instead of scattering it across conditionals.
|
|
10
|
+
|
|
11
|
+
**Why:** Scattered booleans, repeated shape assumptions, and branching spread across files are accidental complexity. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap; recovering it later reads as a refactor and gets deferred.
|
|
12
|
+
|
|
13
|
+
**Reach for structures like these:**
|
|
14
|
+
|
|
15
|
+
- A state machine instead of scattered booleans, phases, or lifecycle checks.
|
|
16
|
+
- A typed object/model instead of loose parameters or repeated shape assumptions.
|
|
17
|
+
- A map, registry, lookup table, or discriminated union instead of branching spread across files.
|
|
18
|
+
- A reducer or command/event model instead of ad hoc state mutations.
|
|
19
|
+
- A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.
|
|
20
|
+
- A small module boundary that gathers repeated behavior, ownership, or invariants.
|
|
21
|
+
- A queue, cache, index, graph/tree, or normalized collection where the data access pattern calls for it.
|
|
22
|
+
- Any other structure that fits. The list above covers the common cases only. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.
|
|
23
|
+
|
|
24
|
+
Do not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.
|
|
25
|
+
|
|
26
|
+
The tell that you skipped this is a new feature that grows an existing if/else chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another tell. Phase-named modules repeat the same domain rules across steps.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Never block on the human
|
|
2
|
+
|
|
3
|
+
Proceed with reversible work, present the result, and let the human course-correct after the fact.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Tempted to ask "should I do X?" on reversible work.
|
|
8
|
+
- The agent could infer intent from context but pauses to confirm.
|
|
9
|
+
|
|
10
|
+
## The rule
|
|
11
|
+
|
|
12
|
+
Code is cheap. Waiting is expensive. Do the work, show the result, and explain why. Reserve confirmation for irreversible actions: force-push, data deletion, external messages. Reversible actions (write code, edit notes, split tasks) should proceed without blocking. Product direction comes from the human. Execution should not.
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
|
|
16
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-never-block-on-the-human
|
|
3
|
+
description: "Apply when tempted to ask 'should I do X?' on reversible work. Proceed, present the result, let the human course-correct after the fact; reserve confirmation for irreversible actions."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Never Block on the Human
|
|
8
|
+
|
|
9
|
+
The human supervises asynchronously. Agents must stay unblocked: make reasonable decisions, proceed, and let the human course-correct after the fact. Code is cheap. Waiting is expensive.
|
|
10
|
+
|
|
11
|
+
**Why:** Every permission pause stalls the pipeline and makes the human the bottleneck. Since code changes are reversible and reviewable, a wrong decision usually costs less than blocking.
|
|
12
|
+
|
|
13
|
+
**Pattern:**
|
|
14
|
+
- **Proceed, then present.** Do the work, show the result. Don't ask "should I do X?" Do X, explain why.
|
|
15
|
+
- **Reserve questions for genuine ambiguity.** Ask only when you truly cannot infer intent from context.
|
|
16
|
+
- **Make the system self-healing.** When you notice a problem, log it and fix it in the next round.
|
|
17
|
+
- **Supervision is async.** The human reviews plans, diffs, and changes on their own schedule. Design workflows for review-after-the-fact.
|
|
18
|
+
- **Code is cheap, attention is scarce.** A wrong implementation costs minutes to fix. A blocked agent costs the human's attention to unblock.
|
|
19
|
+
|
|
20
|
+
**Boundaries:**
|
|
21
|
+
- **Irreversible actions** (force-push, delete production data, send external messages) still require confirmation.
|
|
22
|
+
- **Reversible actions** (write code, edit notes, split tasks) should proceed without blocking.
|
|
23
|
+
- **Product direction** comes from the human; *execution* should not block.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Outcome-oriented execution
|
|
2
|
+
|
|
3
|
+
Optimize for the intended end state, not smooth intermediate states.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Planned rewrites and migrations with explicit phase boundaries.
|
|
8
|
+
- Throwaway compatibility code threatens to become long-lived debt.
|
|
9
|
+
|
|
10
|
+
## The rule
|
|
11
|
+
|
|
12
|
+
Converge on the target architecture and prove correctness at explicit verification boundaries. Intermediate breakage is acceptable when planned, scoped, and reversible. Declare where temporary breakage is acceptable. Require full static and runtime verification at plan completion.
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
|
|
16
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-outcome-oriented-execution
|
|
3
|
+
description: "Apply during planned rewrites and migrations with explicit phase boundaries. Converge on the target architecture; don't preserve smooth intermediate states with throwaway compatibility code."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Outcome-Oriented Execution
|
|
8
|
+
|
|
9
|
+
Optimize for the intended, verifiable end state rather than preserving smooth intermediate states.
|
|
10
|
+
|
|
11
|
+
**Why:** Keeping every intermediate step fully stable often creates temporary compatibility code that becomes long-lived debt. Converge on the target architecture and prove correctness at explicit verification boundaries.
|
|
12
|
+
|
|
13
|
+
**Core rule:**
|
|
14
|
+
- Prioritize end-state integrity over transitional stability
|
|
15
|
+
- Intermediate breakage is acceptable when it is planned, scoped, and reversible
|
|
16
|
+
- Always run final verification before declaring done
|
|
17
|
+
|
|
18
|
+
**Guardrails:**
|
|
19
|
+
- Use this for planned rewrites and migrations with explicit phase boundaries
|
|
20
|
+
- Declare where temporary breakage is acceptable
|
|
21
|
+
- Keep high-signal checks for actively touched areas while migrating
|
|
22
|
+
- Require full static and runtime verification at plan completion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Prove it works
|
|
2
|
+
|
|
3
|
+
Verify every task output by checking the real thing directly, not a proxy or self-report.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- After completing a task, before declaring done.
|
|
8
|
+
- Verifying delegated work from a subagent.
|
|
9
|
+
- Tempted to rely on "it compiles" or a cached representation.
|
|
10
|
+
|
|
11
|
+
## The rule
|
|
12
|
+
|
|
13
|
+
Check the real artifact: run the feature, read the actual value, inspect the diff. Process liveness is checked directly, not through derived state. When verification fails, suspect the observation method before suspecting the system. For delegated work, inspect the output artifact (git diff, file contents, runtime behavior), not the delegate's summary. Script the check when you can, so a reviewer can rerun it.
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Full rule](SKILL.md)
|
|
18
|
+
- [show-me-your-work](../show-me-your-work/) (committed trail for large work)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-prove-it-works
|
|
3
|
+
description: "Apply after completing a task, before declaring done. Verify against the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report, or 'it compiles.'"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Prove It Works
|
|
8
|
+
|
|
9
|
+
Verify every task output by checking the real thing directly. Do not infer from proxies, self-reports, or "it compiles."
|
|
10
|
+
|
|
11
|
+
**Why:** Unverified work has unknown correctness. Indirect verification (file mtimes, output freshness, agent self-reports, cached screenshots) feels cheaper than direct observation. Acting on a wrong inference costs far more than checking the source.
|
|
12
|
+
|
|
13
|
+
**Pattern:** After completing any task, ask: "how do I prove this actually works?"
|
|
14
|
+
|
|
15
|
+
Check the real thing, not a proxy:
|
|
16
|
+
- Check process liveness directly, not indirectly through derived state
|
|
17
|
+
- Read the actual value, not a cached or derived representation
|
|
18
|
+
- When verification fails, suspect the observation method before suspecting the system
|
|
19
|
+
|
|
20
|
+
Code and features:
|
|
21
|
+
1. Build it (necessary but not sufficient)
|
|
22
|
+
2. Run it and exercise the actual feature path
|
|
23
|
+
3. Check the full chain: does data flow from input to output?
|
|
24
|
+
4. For integrations, test the full communication path end-to-end
|
|
25
|
+
|
|
26
|
+
Delegation: trust artifacts, not self-reports.
|
|
27
|
+
When verifying delegated work, inspect the actual output artifact (git diff, file contents, runtime behavior), not the delegate's summary. Agents report what they intended, not always what happened.
|
|
28
|
+
|
|
29
|
+
## Script the check when you can
|
|
30
|
+
|
|
31
|
+
The strongest proof is a deterministic script that re-runs the same comparison, not a one-time eyeball. Write the script, run it, and keep its output as an artifact a reviewer can re-run instead of trusting your word. A script comparing the old and new compiled output catches what a glance misses.
|
|
32
|
+
|
|
33
|
+
Keep the artifact visible for the human. Commit it only for large or complex work where the trail has to be auditable later, like a big port or migration (the **show-me-your-work** skill). Most work just needs it visible, not committed.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Redesign from first principles
|
|
2
|
+
|
|
3
|
+
Redesign as if the new requirement had been foundational from day one. Do not bolt it on.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Integrating a new requirement into an existing design.
|
|
8
|
+
- A change needs to propagate through types, docs, examples, and rationale.
|
|
9
|
+
|
|
10
|
+
## The rule
|
|
11
|
+
|
|
12
|
+
Read all affected files and understand the current design holistically. Ask: "if we were writing this from scratch with this requirement, what would we build?" Propagate the change through every reference. Think about the redesign holistically, then deliver it incrementally.
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
|
|
16
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-redesign-from-first-principles
|
|
3
|
+
description: "Apply when integrating a new requirement into an existing design. Redesign as if the requirement had been a foundational assumption from day one, instead of bolting it on."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Redesign From First Principles
|
|
8
|
+
|
|
9
|
+
When integrating a change, don't bolt it onto the existing design. Redesign as if the requirement had been there from the start. The result should look like what we would have built if we'd known on day one.
|
|
10
|
+
|
|
11
|
+
- Read all affected files and understand the current design holistically
|
|
12
|
+
- Ask: "if we were writing this from scratch with this new requirement, what would we build?"
|
|
13
|
+
- Propagate the change through every reference: types, docs, examples, rationale sections
|
|
14
|
+
- Think about the redesign holistically, then deliver it incrementally
|
|
15
|
+
|
|
16
|
+
This is the method for preserving option value when integrating changes into an existing design.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Separate before serializing shared state
|
|
2
|
+
|
|
3
|
+
When concurrent actors might share mutable state, eliminate the sharing first. Serialize access structurally only when one shared writer is a real invariant.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Concurrent actors might write the same file, branch, key, or state object.
|
|
8
|
+
- Two workers write their own fields into one shared JSON file.
|
|
9
|
+
|
|
10
|
+
## The rule
|
|
11
|
+
|
|
12
|
+
Identify shared mutable state. Default to eliminating the shared write target: give each actor its own file, key, branch, or state directory, and merge only at the read boundary. Only when one shared target is a real invariant, serialize access structurally (lockfiles, sequential phases, single-writer actor, atomic CAS). Instructions and conventions are not concurrency control.
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
|
|
16
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-separate-before-serializing-shared-state
|
|
3
|
+
description: "Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Separate Before Serializing Shared State
|
|
8
|
+
|
|
9
|
+
When concurrent actors might share mutable state, first ask whether they truly need the same mutable object. If not, eliminate the sharing. When sharing is real, enforce serialization structurally: lockfiles, sequential phases, exclusive ownership. Instructions and conventions are not concurrency control.
|
|
10
|
+
|
|
11
|
+
**Why:** Concurrent writes to shared state create race conditions that are intermittent, hard to reproduce, and expensive to debug. Telling agents or goroutines to "take turns" does not work.
|
|
12
|
+
|
|
13
|
+
**Pattern:**
|
|
14
|
+
1. **Identify shared mutable state** (files both read and write, branches both push to, APIs both define and consume).
|
|
15
|
+
2. **Default: eliminate the shared write target.** Ask: do these actors need one canonical object, or are they publishing independent facts? Give each actor its own owned file, key, branch, or state directory, and merge only at the read/reporting boundary. Two workers writing their own `lastX` field into one `state.json` is still shared mutation; `indexer-state.json` + `metrics-state.json` is not.
|
|
16
|
+
3. **Only when one shared write target is a real invariant, serialize access structurally** (lockfiles, sequential phases, single-writer actor, or atomic compare-and-swap). Treat "we need a lock" as a design smell to check, not as the default answer.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Sequence verifiable units
|
|
2
|
+
|
|
3
|
+
Break work into small units that each end in a verifiable state. Check each before the next.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Multi-step work: sweeps, migrations, runs of similar edits.
|
|
8
|
+
- Deciding how to stack commits and PRs.
|
|
9
|
+
|
|
10
|
+
## The rule
|
|
11
|
+
|
|
12
|
+
Each unit is a before/after bracket: known-good state, one change, run the check, proceed. Never batch edits and verify once at the end. Stack commits and PRs so the sequence builds confidence on its own. The canonical shape is the failing test first, then the fix on top, so a reviewer sees both the problem and the proof.
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
|
|
16
|
+
- [Full rule](SKILL.md)
|
|
17
|
+
- [principle-prove-it-works](../principle-prove-it-works/) (keeps each check real)
|
|
18
|
+
- [principle-build-the-lever](../principle-build-the-lever/) (makes per-unit checks cheap)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-sequence-verifiable-units
|
|
3
|
+
description: "Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Sequence work into verifiable units
|
|
8
|
+
|
|
9
|
+
Order work as a sequence of small units, each ending in a state you can check, and don't advance until the current one is green. The same discipline runs at two altitudes, how you execute and how you deliver.
|
|
10
|
+
|
|
11
|
+
**Why:** A break caught at the unit that caused it is cheap to localize. A break caught after a batch is buried, and you have already built further on a broken base. Sequencing those same units into a delivery a reviewer can replay turns "trust me" into "watch it go red, then green."
|
|
12
|
+
|
|
13
|
+
**Execution.** In a sweep, migration, or any run of similar edits, verify each change before starting the next. Never batch the edits and verify once at the end. Each unit is a before/after bracket: known-good state, one change, run the check, then proceed. Rebase onto clean trunk first so every check measures against the real baseline. When a lever does the edits, the per-unit check is nearly free; run it anyway.
|
|
14
|
+
|
|
15
|
+
**Delivery.** Stack commits and PRs in the order that proves the work. The canonical shape is the failing test first, then the fix on top. The first unit shows the bug is real (red), the next shows it resolved (green), so a reviewer sees both the problem and the proof. Other story orders are a subtraction before the reshape, a baseline capture before the treatment, the scaffold before the feature. Each commit lands on its own and the sequence reads as an argument.
|
|
16
|
+
|
|
17
|
+
**Pattern:**
|
|
18
|
+
- Pick the smallest unit that ends in a check: an edit plus its test, or a commit that stands alone.
|
|
19
|
+
- Verify before advancing. Red to green per unit, never deferred to a final batch.
|
|
20
|
+
- Order the units so the sequence builds confidence on its own, for you while executing and for a reviewer reading the stack.
|
|
21
|
+
|
|
22
|
+
The sequencing complement to the **prove-it-works** principle skill, which keeps each check real, and the **build-the-lever** principle skill, which makes the per-unit check cheap.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Subtract before you add
|
|
2
|
+
|
|
3
|
+
Remove dead weight first, then build on the simpler base.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Sequencing an addition, refactor, or rewrite.
|
|
8
|
+
- A stub reference has no novel content.
|
|
9
|
+
- Speculative validators or guards go beyond what the spec demands.
|
|
10
|
+
|
|
11
|
+
## The rule
|
|
12
|
+
|
|
13
|
+
Deletion gives you a simpler base, which makes the next addition smaller and less brittle. Sequence removal before construction. Cut before you polish. Design for observed usage, not speculative edge cases. When a reference has no novel content, delete it rather than leaving a stub.
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Full rule](SKILL.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-subtract-before-you-add
|
|
3
|
+
description: "Apply when sequencing an addition, refactor, or rewrite. Remove dead weight, redundant validators, and stub references first, then build on the simpler base."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Subtract Before You Add
|
|
8
|
+
|
|
9
|
+
When evolving a system, remove complexity first, then build. Deletion gives you a simpler base, which makes the next addition smaller and less brittle.
|
|
10
|
+
|
|
11
|
+
**Why:** Adding to a complex system compounds complexity. Removing first cuts the surface area, reveals the essential structure, and usually makes the next design obvious. Default to subtraction.
|
|
12
|
+
|
|
13
|
+
Make simplification a continual investment. Leave the design slightly simpler and more capable behind the same or smaller surface than you found it.
|
|
14
|
+
|
|
15
|
+
**The pattern:**
|
|
16
|
+
- Sequence removal before construction
|
|
17
|
+
- Cut before you polish (get to the minimum before investing in quality)
|
|
18
|
+
- Design for observed usage, not speculative edge cases
|
|
19
|
+
- No speculative validators, parsers, or guards beyond what the spec demands
|
|
20
|
+
- Out-of-spec features drag validators behind them. Persistence, retry-on-startup, and schema migration each need guards to defend their inputs.
|
|
21
|
+
- Simplify prompts (remove redundant instructions, excessive templates)
|
|
22
|
+
- When a reference has no novel content, delete it rather than leaving a stub
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Type system discipline
|
|
2
|
+
|
|
3
|
+
Use the type checker to eliminate impossible states, mismatched primitives, and unhandled variants at compile time.
|
|
4
|
+
|
|
5
|
+
## When it applies
|
|
6
|
+
|
|
7
|
+
- Designing types or a function signature in any typed language.
|
|
8
|
+
- Reviewing code with `as` casts, `any`, or "should never happen" throws.
|
|
9
|
+
- A new variant is added to a sum type.
|
|
10
|
+
|
|
11
|
+
## The rule
|
|
12
|
+
|
|
13
|
+
Make illegal states unrepresentable with sum types. Brand semantic primitives so `UserId` and `OrderId` cannot be swapped. Parse external data at boundaries. Do not lie to the type system with casts or unsafe coercions. Exhaust variants so the compiler catches a new case. Derive types from authoritative schemas instead of hand-rolling. Strengthen a type only where partiality appears (runtime assertions, null checks), not for precision's sake.
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Full rule](SKILL.md)
|
|
18
|
+
- [typescript-best-practices](../typescript-best-practices/) (TypeScript-specific syntax)
|
|
19
|
+
- [principle-boundary-discipline](../principle-boundary-discipline/)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: principle-type-system-discipline
|
|
3
|
+
description: "Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, refuse to lie to the compiler, exhaust variants, derive from authoritative schemas."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Type System Discipline
|
|
8
|
+
|
|
9
|
+
The type checker is a proof assistant. Use it to eliminate impossible states, mismatched primitives, and unhandled variants at compile time. A case the types let you ignore becomes a runtime failure the compiler could have stopped. Prefer defining errors and special cases out of existence over proliferating handlers; unrepresentable states, total functions, and interface redesign (the patterns below) are the tools.
|
|
10
|
+
|
|
11
|
+
Applies to any typed language. Skills like `typescript-best-practices` ground it in specific syntax.
|
|
12
|
+
|
|
13
|
+
**The patterns:**
|
|
14
|
+
|
|
15
|
+
- **Make illegal states unrepresentable.** Model variants as sum types: discriminated unions in TypeScript, enums with payloads in Rust/Swift/Kotlin, sealed classes in Scala, ADTs in Haskell/OCaml. Don't model state as a bag of optional fields where contradictory combinations compile. A subtle anti-pattern worth naming: `{ completed: boolean; completedAt?: Date }` admits `completed: true; completedAt: undefined`, which is meaningless. Derive the boolean from a single source like `completedAt !== null`, or model the variants explicitly as `{ kind: 'open' } | { kind: 'done'; at: Date }`. If a bug forces the question "wait, can this combination actually happen?", the type is too loose.
|
|
16
|
+
- **Types are constructions, not restrictions.** Build the type up from the values you want instead of carving them out of a looser type with checks. The invariant that seems to need a refinement type is usually a construction away. A non-empty list is a head plus a rest, not a list with a length check. A valid time range is a start plus a duration, not two timestamps you must keep ordered. No representation is privileged. A list of pairs is an even-length list if you interpret it that way, so choose the shape that cannot build the illegal value and expose the interface callers need on top.
|
|
17
|
+
- **Brand semantic primitives.** `UserId` and `OrderId` are strings underneath but should not be interchangeable. Newtypes in Rust, opaque types in Swift, value classes in Kotlin, phantom types in Haskell, branded intersections in TypeScript. Validate once at creation, trust the type downstream.
|
|
18
|
+
- **External data is untyped until parsed.** RPC payloads, JSON, IPC messages, CLI args, config files, environment variables, database rows. Have a parse function at every boundary that turns unstructured input into the typed model. See the **boundary-discipline** principle skill for where to put validation.
|
|
19
|
+
- **Don't lie to the type system.** Casts, unsafe coercions, and assertion functions that bypass the compiler are runtime crashes waiting to happen. If the compiler can't prove a fact, prove it (validate, narrow, refine the model) or accept that the cast is a hazard. The cast you bury today is the postmortem you write next week.
|
|
20
|
+
- **Exhaustive matching is the compiler's job.** When you match on a sum type, the compiler must fail compilation if a new variant is added without handling. Use the idiom your language provides: `never`-typed binding in TypeScript, unannotated `match` in Rust, `-Wincomplete-patterns` in Haskell, sealed-class match exhaustiveness in Kotlin.
|
|
21
|
+
- **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, database migration, or design-system token file defines a shape, derive from it instead of hand-rolling a parallel type. Manual duplication drifts. See the **encode-lessons-in-structure** principle skill.
|
|
22
|
+
- **Strengthen a type only where partiality appears.** A runtime assertion, null check, or "this should never happen" throw marks the place a type is too weak. Push that check up into the type. Then stop. The type system's job is to track the cases each use site must handle, not to describe the data as precisely as possible. Prefer total functions. `sum` of an empty list is 0, so it takes the plain list. `head` of an empty list has no answer, so it demands the non-empty one. Extra precision costs reuse and ceremony and buys no safety.
|
|
23
|
+
|
|
24
|
+
**The tests:**
|
|
25
|
+
|
|
26
|
+
- "Can I write a comment explaining when this combination of fields is valid?" If yes, the type is too loose. Split it into a sum type.
|
|
27
|
+
- "Do two of my function arguments share a primitive type but mean different things?" Brand them.
|
|
28
|
+
- "Where did this `any`, this `as`, this `assertNotNull` come from?" Trace it to the boundary and validate there instead.
|
|
29
|
+
- "If a new variant is added next month, will the compiler tell the next agent where to add a case?" If no, the match isn't exhaustive.
|
|
30
|
+
- "Is this type duplicating a shape another file owns?" Derive instead.
|
|
31
|
+
- "Am I strengthening this type to keep an operation total, or just to be more precise?" If nothing would otherwise panic, keep the plain type.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Recall
|
|
2
|
+
|
|
3
|
+
Reconstruct recent working context from chat history, live state, and the shared record, then return a tight current-state brief.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- `/recall`, "recall my work on X", "catch me up"
|
|
8
|
+
- "What have I been working on", "where did I leave off"
|
|
9
|
+
- Before starting or resuming work on a topic
|
|
10
|
+
|
|
11
|
+
## What it produces
|
|
12
|
+
|
|
13
|
+
A brief with four sections: a capsule (at most 5 bullets), thread status lines with tags like `[open PR #N]` or `[in flight <branch>]`, recurring problems, and the single most useful next action.
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
|
+
|
|
17
|
+
Fans out parallel subagents to search the host's transcript store (Claude Code or Codex) for relevant chats. When the topic names a feature, file, or subsystem, also runs the `why` skill's investigators to sweep the shared record (tickets, chat, error tracking). Verifies transcript findings against live git and GitHub state. Writes the brief through the `unslop` skill.
|
|
18
|
+
|
|
19
|
+
## Related
|
|
20
|
+
|
|
21
|
+
- [SKILL.md](SKILL.md)
|
|
22
|
+
- [why](../why/) (shared-record investigation)
|
|
23
|
+
- [automate-me](../automate-me/) (turning habits into a skill, not recall)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recall
|
|
3
|
+
description: "Reconstruct your recent working context from your own chat history, live state, and the shared record (user reports, prior fixes, incidents), then hand back a tight current-state brief. Use for 'recall my work on X', 'catch me up', 'what have I been working on', 'where did I leave off', before starting or resuming work."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Recall
|
|
8
|
+
|
|
9
|
+
**Before you start or resume work, you rebuild the user's recent working context and hand back a tight capsule of where things stand now and what to do next.** Use for "recall my work on X", "catch me up", "what have I been working on", or "where did I leave off".
|
|
10
|
+
|
|
11
|
+
Keep it tight and on-topic. Read only what the in-scope threads need, then stop. The heavy reading fans out to parallel subagents. The main thread keeps only their findings and the final brief.
|
|
12
|
+
|
|
13
|
+
Your context lives in two records. Your own chat history holds what you did and decided. The shared record holds everything that happened around the same code under other names: the symptoms users keep reporting, the fixes that shipped and got reverted, the errors still firing in prod. That second record is what the **why** skill searches, across source control, the issue tracker, chat and issue channels, long-form docs, and error tracking. A feature with a long bug tail keeps most of its story there, so don't reconstruct it from your transcripts alone.
|
|
14
|
+
|
|
15
|
+
On Claude Code, transcripts live at `~/.claude/projects/<slug>/<session-uuid>.jsonl`, where `<slug>` is the workspace path with each "/" turned into "-" (so `/Users/you/proj` becomes `-Users-you-proj`). On Codex, session rollouts live under `~/.codex/sessions/<yyyy>/<mm>/<dd>/`. Every line is one chat message.
|
|
16
|
+
|
|
17
|
+
1. Classify, then route. One specific prior chat to resume is the `session-pickup` playbook, not this. Turning habits into a durable skill is `automate-me`. A human-readable summary of your work is a different task. Recall loads working context across recent chats before you act. If the user already gave you a full state capsule (paths, branch, the change), use it and skip the mining.
|
|
18
|
+
2. Lock the scope before searching. Pin the window ("recent" is a real range, default the last 7 days), the topic if named, and the workspace (default the active one; never read another project's transcripts without being asked). State the scope back. Never quietly turn "all" into "recent N".
|
|
19
|
+
3. Fan out across your chat history. Spawn parallel subagents on a fast, cheap model, each taking a slice of the corpus, since searching transcripts is grunt work. Tell every subagent to order candidates by real modification time (`ls -t`) and never by UUID name, grep the topic first and then read only the matching chats and only their relevant regions, and skip the current chat plus obvious noise (subagent, eval, and test chats). Each returns the same schema, one block per chat: topic, the user's goal, decisions, open threads, struggles and corrections, and artifacts (PRs, tickets, branches), each citing the chat UUID. For one or two chats, skip the fan-out and search directly. The raw transcripts stay in the subagents. The main thread gets only their findings.
|
|
20
|
+
4. Sweep the shared record whenever the topic names a feature, file, subsystem, area, or bug. This is the default, not a judgment call, and "my work on X" does not exempt it. A named target carries history you never see in your own transcripts, and that history is the point of the sweep. Hand it to the **why** skill's source investigators, but steer their question from "why was this built this way" to "what's the current state, what's been tried and didn't hold, and what are users still reporting". Reuse its per-source playbooks so you don't reinvent each query vocabulary, run the investigators in parallel with the chat-history mining, and inherit its posture: one investigator per source, null results are findings, skip an unavailable MCP and say so. Fold what comes back into the brief. Skip this step only for pure activity recall with no named target ("what did I do this week"), where your own history and live state are the entire answer.
|
|
21
|
+
5. Verify against live state. A transcript or a stale ticket is history, not current truth, so take the PRs, branches, and tickets that the mining and the sweep surfaced and check them with `git` and `gh`. When the answer hinges on what an agent actually did (the tools it ran, files it read, errors it hit), read the full transcript, not just a trimmed local copy.
|
|
22
|
+
6. Write the brief to the contract below. Group by thread. Stay on the named topic.
|
|
23
|
+
|
|
24
|
+
## Output contract
|
|
25
|
+
|
|
26
|
+
Lead with the capsule, then the thread status, then the problems, then the next move. Deeper detail goes below or gets cut.
|
|
27
|
+
|
|
28
|
+
- **Capsule.** At most 5 bullets. What this work is and where it stands overall.
|
|
29
|
+
- **Threads.** One line each, prefixed with exactly one status tag: `[merged #N]`, `[open PR #N]`, `[in flight <branch>]`, `[verified, uncommitted]`, `[reverted #N]`, or `[planned, not started]`. A thread with no tag is not done yet, so tag it.
|
|
30
|
+
- **Problems.** At most 5, the recurring ones. Include the symptoms users keep reporting and any fix that shipped and was reverted, so the next attempt starts where the last one failed.
|
|
31
|
+
- **Next move.** The single most useful next action, concrete.
|
|
32
|
+
|
|
33
|
+
An adjacent feature or ticket stays out unless it blocks this one. When the capsule and thread lines outgrow a screen, cut detail before you cut threads. Write the brief through the **unslop** skill, cite chat findings by UUID and shared-record findings by their source (PR #, ticket ID, chat permalink, error-tracker issue), and sanitize private context before any public output.
|
|
34
|
+
|
|
35
|
+
**Reply:** the brief, to the contract above.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Reflect
|
|
2
|
+
|
|
3
|
+
Mine the current conversation for durable learnings and route them into concrete skill edits.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- `/reflect` or "reflect"
|
|
8
|
+
- After a complex task landed cleanly and the recipe is worth keeping
|
|
9
|
+
- After the agent hit dead ends and found a path that generalizes
|
|
10
|
+
- After the user corrected the agent's approach mid-task
|
|
11
|
+
|
|
12
|
+
## What it produces
|
|
13
|
+
|
|
14
|
+
A list of accepted, rejected, and backlog items. Accepted items become skill edits (after user approval). Backlog items file to the team's tracker. The summary names every edit applied, skill created, and item dropped.
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
17
|
+
|
|
18
|
+
Locates the active transcript, then spawns three parallel reviewer subagents (judgment, tooling, divergent) on different models. A synthesizer subagent merges findings into accepted, rejected, and backlog lists. A structural enforcement check moves items better served by lint or runtime checks to backlog. Accepted edits require explicit user approval before applying.
|
|
19
|
+
|
|
20
|
+
## Related
|
|
21
|
+
|
|
22
|
+
- [SKILL.md](SKILL.md)
|
|
23
|
+
- [references/](references/) (judgment, tooling, divergent reviewer prompts, synthesizer prompt)
|
|
24
|
+
- [principle-encode-lessons-in-structure](../principle-encode-lessons-in-structure/)
|