pattyeng 1.0.4 → 1.0.7

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.
Files changed (99) hide show
  1. package/README.md +103 -43
  2. package/bin/pattyeng.js +25 -14
  3. package/lib/skills.js +198 -0
  4. package/lib/upgrade.js +46 -0
  5. package/package.json +5 -3
  6. package/skills/.system/.codex-system-skills.marker +1 -0
  7. package/skills/.system/imagegen/LICENSE.txt +201 -0
  8. package/skills/.system/imagegen/SKILL.md +356 -0
  9. package/skills/.system/imagegen/agents/openai.yaml +6 -0
  10. package/skills/.system/imagegen/assets/imagegen-small.svg +5 -0
  11. package/skills/.system/imagegen/assets/imagegen.png +0 -0
  12. package/skills/.system/imagegen/references/cli.md +242 -0
  13. package/skills/.system/imagegen/references/codex-network.md +33 -0
  14. package/skills/.system/imagegen/references/image-api.md +90 -0
  15. package/skills/.system/imagegen/references/prompting.md +118 -0
  16. package/skills/.system/imagegen/references/sample-prompts.md +433 -0
  17. package/skills/.system/imagegen/scripts/image_gen.py +995 -0
  18. package/skills/.system/imagegen/scripts/remove_chroma_key.py +440 -0
  19. package/skills/.system/openai-docs/LICENSE.txt +201 -0
  20. package/skills/.system/openai-docs/SKILL.md +167 -0
  21. package/skills/.system/openai-docs/agents/openai.yaml +14 -0
  22. package/skills/.system/openai-docs/assets/openai-small.svg +3 -0
  23. package/skills/.system/openai-docs/assets/openai.png +0 -0
  24. package/skills/.system/openai-docs/references/latest-model.md +37 -0
  25. package/skills/.system/openai-docs/references/prompting-guide.md +244 -0
  26. package/skills/.system/openai-docs/references/upgrade-guide.md +181 -0
  27. package/skills/.system/openai-docs/scripts/fetch-codex-manual.mjs +598 -0
  28. package/skills/.system/openai-docs/scripts/resolve-latest-model-info.js +147 -0
  29. package/skills/.system/plugin-creator/SKILL.md +243 -0
  30. package/skills/.system/plugin-creator/agents/openai.yaml +6 -0
  31. package/skills/.system/plugin-creator/assets/plugin-creator-small.svg +3 -0
  32. package/skills/.system/plugin-creator/assets/plugin-creator.png +0 -0
  33. package/skills/.system/plugin-creator/references/installing-and-updating.md +143 -0
  34. package/skills/.system/plugin-creator/references/plugin-json-spec.md +194 -0
  35. package/skills/.system/plugin-creator/scripts/create_basic_plugin.py +324 -0
  36. package/skills/.system/plugin-creator/scripts/read_marketplace_name.py +48 -0
  37. package/skills/.system/plugin-creator/scripts/update_plugin_cachebuster.py +78 -0
  38. package/skills/.system/plugin-creator/scripts/validate_plugin.py +586 -0
  39. package/skills/.system/skill-creator/SKILL.md +416 -0
  40. package/skills/.system/skill-creator/agents/openai.yaml +5 -0
  41. package/skills/.system/skill-creator/assets/skill-creator-small.svg +3 -0
  42. package/skills/.system/skill-creator/assets/skill-creator.png +0 -0
  43. package/skills/.system/skill-creator/license.txt +202 -0
  44. package/skills/.system/skill-creator/references/openai_yaml.md +49 -0
  45. package/skills/.system/skill-creator/scripts/generate_openai_yaml.py +226 -0
  46. package/skills/.system/skill-creator/scripts/init_skill.py +400 -0
  47. package/skills/.system/skill-creator/scripts/quick_validate.py +101 -0
  48. package/skills/.system/skill-installer/LICENSE.txt +202 -0
  49. package/skills/.system/skill-installer/SKILL.md +58 -0
  50. package/skills/.system/skill-installer/agents/openai.yaml +5 -0
  51. package/skills/.system/skill-installer/assets/skill-installer-small.svg +3 -0
  52. package/skills/.system/skill-installer/assets/skill-installer.png +0 -0
  53. package/skills/.system/skill-installer/scripts/github_utils.py +21 -0
  54. package/skills/.system/skill-installer/scripts/install-skill-from-github.py +308 -0
  55. package/skills/.system/skill-installer/scripts/list-skills.py +107 -0
  56. package/skills/cap/SKILL.md +77 -0
  57. package/skills/caveman/SKILL.md +49 -0
  58. package/skills/code-review/SKILL.md +46 -0
  59. package/skills/codebook/SKILL.md +184 -0
  60. package/skills/doc-review/SKILL.md +147 -0
  61. package/skills/feature-research/SKILL.md +34 -0
  62. package/skills/file-op/SKILL.md +116 -0
  63. package/skills/grill-me/SKILL.md +10 -0
  64. package/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  65. package/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
  66. package/skills/grill-with-docs/SKILL.md +88 -0
  67. package/skills/handoff/SKILL.md +17 -0
  68. package/skills/improve-codebase/SKILL.md +79 -0
  69. package/skills/linear/SKILL.md +107 -0
  70. package/skills/next-step/SKILL.md +61 -0
  71. package/skills/no-reinvent/SKILL.md +131 -0
  72. package/skills/no-wall/SKILL.md +146 -0
  73. package/skills/online/SKILL.md +54 -0
  74. package/skills/plan-review/SKILL.md +55 -0
  75. package/skills/professional/SKILL.md +111 -0
  76. package/skills/promise-tracking/SKILL.md +131 -0
  77. package/skills/prove/SKILL.md +135 -0
  78. package/skills/read-before-write/SKILL.md +123 -0
  79. package/skills/review/SKILL.md +78 -0
  80. package/skills/review-mp/SKILL.md +78 -0
  81. package/skills/scope-boundary/SKILL.md +121 -0
  82. package/skills/semble-search/SKILL.md +40 -0
  83. package/skills/sitrep/SKILL.md +126 -0
  84. package/skills/structure-code/SKILL.md +116 -0
  85. package/skills/surface-assumptions/SKILL.md +139 -0
  86. package/skills/teach/GLOSSARY-FORMAT.md +35 -0
  87. package/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  88. package/skills/teach/MISSION-FORMAT.md +31 -0
  89. package/skills/teach/RESOURCES-FORMAT.md +32 -0
  90. package/skills/teach/SKILL.md +131 -0
  91. package/skills/team-protocol/SKILL.md +172 -0
  92. package/skills/tech-lead/SKILL.md +332 -0
  93. package/skills/to-issues/SKILL.md +83 -0
  94. package/skills/to-prd/SKILL.md +74 -0
  95. package/skills/vectorbt-expert/SKILL.md +253 -0
  96. package/skills/verify-done/SKILL.md +128 -0
  97. package/skills/work-log/SKILL.md +141 -0
  98. package/skills/work-log/template.html +496 -0
  99. package/skills/zoom-out/SKILL.md +7 -0
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: surface-assumptions
3
+ description: 'Use before starting a non-trivial task — about to implement, edit, design, or make a non-obvious decision — OR when the user says "what are you assuming?", "what are you taking for granted?", "are you sure you understand?", "did you check?". Forces the agent to enumerate every assumption (scope, edge cases, naming, conventions, behavior), mark each as stated or assumed, and surface the assumed ones to the user before proceeding. Catches the failure mode where the agent makes hidden decisions the user would have corrected in one word.'
4
+ user-invocable: true
5
+ ---
6
+
7
+ # Surface Assumptions
8
+
9
+ ## What this does
10
+
11
+ Before starting a non-trivial task, you enumerate every assumption you are making about scope, edge cases, naming, conventions, expected behavior, and user intent. You mark each one as **stated** (the user explicitly said it) or **assumed** (you're guessing). You surface the assumed ones to the user before proceeding.
12
+
13
+ This skill exists because **hidden assumptions are the most expensive form of agent failure.** The agent guesses the user meant X, builds an hour of work on that guess, and the user says "no, I meant Y" — costing the hour of work plus the friction of redoing it. Surface the assumption upfront; cost is one sentence.
14
+
15
+ ## Authority
16
+
17
+ This skill is authoritative. The agent cannot proceed with significant work on assumptions it hasn't surfaced. Acknowledging the skill and then proceeding on hidden assumptions is the violation, not compliance.
18
+
19
+ If you want to proceed on an unstated assumption, the protocol is: surface it explicitly ("I'm assuming X — should I proceed or is it Y?"), get sign-off, then proceed. Not to silently assume.
20
+
21
+ **Acknowledging the skill and then proceeding on hidden assumptions is the violation, not compliance.** Sentences like *"I understand surface-assumptions, but this is clearly the obvious choice so I'll just go with it"* are the same dismissal pattern as `no-wall`'s *"I understand the skill but I have no other way."* Enumerate; surface; wait for sign-off; no sign-off → don't proceed.
22
+
23
+ ## When it applies
24
+
25
+ Triggered by:
26
+ - About to implement a feature or make a code change that's more than a one-line edit
27
+ - About to make a non-obvious decision (naming, architecture, scope boundary, approach)
28
+ - The user describes a task with unstated details ("make it work like X" — what about Y, Z?)
29
+ - You're about to say "I'll go with the obvious choice" or "I'll use the standard pattern"
30
+ - The user asks "what are you assuming?", "did you check?", "are you sure you understand?"
31
+
32
+ ## The Protocol
33
+
34
+ When triggered, run these steps **in writing, in the conversation**, before implementing.
35
+
36
+ ### 1. Enumerate assumptions
37
+ Write a list of every assumption you're making. Categories:
38
+ - **Scope** — what's in, what's out, what's the boundary of this task?
39
+ - **Edge cases** — what inputs / states / conditions do you need to handle?
40
+ - **Naming** — what names (variables, files, functions, branches) are you choosing?
41
+ - **Conventions** — what style / pattern / library are you following?
42
+ - **Behavior** — what should the code do in ambiguous cases? What should it NOT do?
43
+ - **User intent** — what does the user actually want from this?
44
+
45
+ Aim for 5–15 assumptions. If you can't list any, you haven't thought hard enough.
46
+
47
+ ### 2. Mark each: stated vs assumed
48
+ For each, label it:
49
+ - **Stated** — the user said these exact words (in the current message or a clearly-referenced prior one), OR it's written down in a spec, plan, PRD, design doc, comment, or existing code that's clearly intentional. **Cite the location** (which message, which file:line, which doc section). "Stated" means there is text the user can point at.
50
+ - **Assumed** — you're guessing. Surface to the user.
51
+
52
+ If you're not sure whether something is stated or assumed, it's assumed. Default to surface. **"It's implied" is not the same as "it's stated"** — implications are guesses dressed as facts. "By convention" is not stated. "In the existing code" is stated only if you cite the file:line and the user can verify.
53
+
54
+ ### 3. Surface the assumed ones
55
+ For each assumed item, ask the user. The format:
56
+
57
+ > "I'm about to {do X}. My assumptions:
58
+ > - {Assumption 1} — confirmed?
59
+ > - {Assumption 2} — confirmed?
60
+ > - {Assumption 3} — or should it be Y?"
61
+
62
+ Or, if the assumptions are tightly coupled, a single question: "I'm assuming X / Y / Z. Should I proceed, or adjust?"
63
+
64
+ Don't ask about every trivial thing. Bundle related assumptions. Aim for 1–5 questions, not 20.
65
+
66
+ ### 4. Get sign-off
67
+ Wait for the user's response. If they confirm all assumptions → proceed. If they correct any → adjust, re-enumerate, re-surface the changed assumptions.
68
+
69
+ Implicit silence is not sign-off. Wait.
70
+
71
+ ### 5. Log (if armed)
72
+ If `work-log` is armed, append a checkpoint: *"## {HH:MM KST} — Assumptions: {list}"*. This makes the assumption set auditable after the fact.
73
+
74
+ ## Write-Time Self-Check
75
+
76
+ Before sending any message that says "I'll proceed with...", "I'll go with...", "using the standard pattern...", "I'll assume X", or makes a non-obvious choice, scan it for these patterns:
77
+
78
+ - "I'll go with the obvious choice" / "by convention" / "using the standard pattern" / "the obvious way" (assumptions framed as obvious — surface them anyway)
79
+ - "I'll assume X" (acknowledging the assumption then proceeding — same violation as `no-wall`)
80
+ - "The user probably meant X" / "I'm guessing the user wanted X" (assumption framed as user intent)
81
+ - "Proceeding unless you say otherwise" (defaulting to proceed when the protocol is to ask first)
82
+ - "I'll handle the obvious edge cases" (assumption framed as known — which ones? surface them)
83
+ - Naming a variable, choosing a scope boundary, or picking a library without enumerating the alternatives (hidden assumption about which option to pick)
84
+ - Marking an assumption as "stated" without citing a location (the location is the proof of statedness)
85
+
86
+ If any pattern is present, **do not send.** Run the protocol — enumerate, mark with citations, surface the assumed ones, wait for sign-off — then send.
87
+
88
+ ## Override Protocol — what you may NOT do unilaterally
89
+
90
+ You may not proceed on hidden assumptions based on agent judgment. Specifically:
91
+
92
+ - You may not mark an assumption as "stated" without citing a verifiable location.
93
+ - You may not skip the enumeration for non-trivial work by claiming the task is "trivial" or "obvious."
94
+ - You may not proceed on the assumed set without user sign-off on the load-bearing ones.
95
+ - You may not dismiss the skill ("I understand surface-assumptions, but this is clearly X so I'll just go with it") and proceed. That's the violation, not the protocol.
96
+
97
+ If you want to deviate, the protocol is: enumerate anyway, surface the assumed ones, and get sign-off. Without sign-off on the load-bearing assumptions, don't proceed.
98
+
99
+ ## Behavior in edge cases
100
+
101
+ - **The task is BOTH trivial AND mechanical** (typo fix, formatting, `git mv`, single-line variable rename with zero behavior change): skip. "Trivial" means <5 lines, single file, no logic, no behavior change, no naming decisions, no scope boundary choice. If it has ANY logic, ANY new naming, ANY behavior implication, ANY scope decision, run the protocol. "It's a small change" is not the triviality test; "is it purely mechanical?" is.
102
+ - **The task is well-defined and the user gave a spec / PRD / plan:** mark those assumptions as "stated" via the spec; only surface what's NOT in the spec.
103
+ - **The user is impatient** ("just do it"): the protocol is one sentence — "I'm assuming X, Y, Z; proceeding unless you say otherwise." That's still surfacing; the user can interrupt.
104
+ - **The assumption turns out to be wrong later:** that's a learning, not a failure. Update the assumption set, surface the new one, get re-sign-off.
105
+ - **You're in a fast iteration loop** (e.g. tiny tweaks to a UI): enumerate once at the start, then iterate within the enumerated set. Re-surface only if scope drifts.
106
+
107
+ ## Red Flags
108
+
109
+ | Thought | What it really means |
110
+ |---------|----------------------|
111
+ | "I'll go with the obvious choice" | I'm assuming the obvious choice is what the user wants |
112
+ | "By convention, it should be X" | I'm assuming the user's convention matches mine |
113
+ | "I'll handle the obvious edge cases" | I'm assuming I know which edge cases matter |
114
+ | "This is what they probably meant" | I'm assuming instead of asking |
115
+ | Proceeding without enumerating | I'm doing the work on hidden assumptions |
116
+ | Saying "I'll assume X" then proceeding | Acknowledging then dismissing — same violation as `no-wall` |
117
+ | Naming a variable without thinking about it | Hidden assumption about what it represents |
118
+ | Choosing a scope boundary without checking | Hidden assumption about what's in vs out |
119
+ | "Proceeding unless you say otherwise" (without having asked) | Defaulting to proceed when protocol is to ask first |
120
+ | "Stated" without a cite | Unverifiable — assume it's an assumption, not a statement |
121
+ | "Trivial task" used to skip the protocol for non-trivial work | Loophole abuse; the triviality test is mechanical-only |
122
+ | "I understand surface-assumptions, but..." | Dismissing the skill mid-piece (same as `no-wall` / `professional`) |
123
+
124
+ ## The deeper point
125
+
126
+ Every implementation is built on dozens of small decisions. Most are trivial; a few are load-bearing. The agent's failure mode is treating all of them as trivial — guessing on the load-bearing ones as confidently as on the trivial ones.
127
+
128
+ Surface-assumptions doesn't enumerate every decision; it enumerates the ones that could plausibly be wrong. The cost is one round of asking; the cost of being wrong is hours of rework.
129
+
130
+ `no-wall` says: don't quit when the search is hard. `surface-assumptions` says: don't proceed when the goal is unclear. They're complementary: the user needs both persistence and clarity.
131
+
132
+ ## Related
133
+
134
+ - **`sitrep`** — sitrep covers state assumptions (what branch, what's deployed, what's recent). Surface-assumptions covers task assumptions (what scope, what edge case, what convention).
135
+ - **`verify-done`** — the checklist's "edge cases and the unstated" step is surface-assumptions in retro. Run surface-assumptions BEFORE work to prevent gaps, run it AFTER if verify-done surfaces missed ones.
136
+ - **`prove-it`** — same discipline of explicit articulation: prove-it says "show the inference chain"; surface-assumptions says "show the assumption set."
137
+ - **`no-wall`** — the "I'll assume X" red-flag pattern is the same as the wall-declaration pattern: acknowledging then dismissing.
138
+ - **`surface-errors`** — many failures are wrong assumptions. Surface-errors surfaces the failure; surface-assumptions retroactively identifies the assumption that broke.
139
+ - **`plan-review`** / **`grill-me`** — these also surface assumptions; surface-assumptions is the agent-side discipline, while plan-review / grill-me are user-side (interviewing the user about their plans).
@@ -0,0 +1,35 @@
1
+ # GLOSSARY.md Format
2
+
3
+ `GLOSSARY.md` is the canonical language for this teaching workspace. All explainers, exercises, and learning records should adhere to its terminology. Building it is itself part of learning: compressing a concept into a tight definition is evidence the user understands it.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Topic} Glossary
9
+
10
+ {One or two sentence description of the topic this glossary covers.}
11
+
12
+ ## Terms
13
+
14
+ **Hypertrophy**:
15
+ Muscle growth driven by mechanical tension and metabolic stress over repeated training sessions.
16
+ _Avoid_: Bulking, getting big
17
+
18
+ **Progressive overload**:
19
+ Systematically increasing the demand on a muscle over time — via load, volume, or intensity.
20
+ _Avoid_: Pushing harder, levelling up
21
+
22
+ **RPE (Rate of Perceived Exertion)**:
23
+ A 1–10 self-rating of how hard a set felt, where 10 is failure and 8 means two reps left in the tank.
24
+ _Avoid_: Effort score, intensity rating
25
+ ```
26
+
27
+ ## Rules
28
+
29
+ - **Add a term only when the user understands it.** The glossary is a record of compressed knowledge, not a dictionary the user reads to learn. If the user has just been introduced to a concept, wait until they can use it correctly before promoting it here.
30
+ - **Be opinionated.** When several words exist for the same concept, pick the best one and list the rest as aliases to avoid. This is how language compresses.
31
+ - **Keep definitions tight.** One or two sentences. Define what the term IS, not what it does or how to do it.
32
+ - **Use the glossary's own terms inside definitions.** Once a term is in the glossary, prefer it everywhere — including inside other definitions. This is what makes complex terms easier to grasp later.
33
+ - **Group under subheadings** when natural clusters emerge (e.g. `## Anatomy`, `## Programming`). A flat list is fine when terms cohere.
34
+ - **Flag ambiguities explicitly.** If a term is used loosely in the wider field, note the resolution: "In this workspace, 'set' always means a working set — warm-ups are tracked separately."
35
+ - **Revise as understanding deepens.** A definition the user wrote in week one may be wrong by week six. Update in place; do not leave stale entries.
@@ -0,0 +1,46 @@
1
+ # Learning Record Format
2
+
3
+ Learning records live in `./learning-records/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc. Create the directory lazily — only when the first record is written.
4
+
5
+ They are the teaching equivalent of ADRs: they capture non-obvious lessons, key insights, and stated prior knowledge that will steer future sessions. They are used to calculate the zone of proximal development.
6
+
7
+ ## Template
8
+
9
+ ```md
10
+ # {Short title of what was learned or established}
11
+
12
+ {1-3 sentences: what was learned (or what prior knowledge was established), and why it matters for future sessions.}
13
+ ```
14
+
15
+ That is the whole format. A learning record can be a single paragraph. The value is recording _that_ this is now known and _why_ it changes what to teach next — not in filling out sections.
16
+
17
+ ## Optional sections
18
+
19
+ Only include these when they add genuine value. Most records won't need them.
20
+
21
+ - **Status** frontmatter (`active | superseded by LR-NNNN`) — useful when an earlier understanding turns out to be wrong and is replaced.
22
+ - **Evidence** — how the user demonstrated the understanding (a question answered, an exercise completed, prior experience cited). Useful when the claim might be revisited.
23
+ - **Implications** — what this unlocks or rules out for future sessions. Worth recording when non-obvious.
24
+
25
+ ## Numbering
26
+
27
+ Scan `./learning-records/` for the highest existing number and increment by one.
28
+
29
+ ## When to write a learning record
30
+
31
+ Write one when any of these is true:
32
+
33
+ 1. **The user demonstrated genuine understanding of something non-trivial** — not just exposure, but evidence they can use the concept correctly. This sets a new floor for what to teach next.
34
+ 2. **The user disclosed prior knowledge** — "I already know X." Record it so future sessions don't re-teach it. Also record the _depth_ claimed.
35
+ 3. **A misconception was corrected** — the user previously believed something wrong and now sees why. These are high-value: they predict future stumbling blocks for related topics.
36
+ 4. **The mission shifted in response to learning** — the user discovered they cared about something different than they thought. Cross-link to [[MISSION.md]] and update it.
37
+
38
+ ### What does _not_ qualify
39
+
40
+ - Material that was merely covered. Coverage is not learning. Wait for evidence.
41
+ - Anything already captured tersely in [[GLOSSARY.md]] as a term definition. Don't duplicate.
42
+ - Session-by-session activity logs. Learning records are not a journal — they are decision-grade insights.
43
+
44
+ ## Supersession
45
+
46
+ When a later record contradicts an earlier one (the user's understanding deepened or corrected), mark the old record `Status: superseded by LR-NNNN` rather than deleting it. The history of how understanding evolved is itself useful signal.
@@ -0,0 +1,31 @@
1
+ # MISSION.md Format
2
+
3
+ `MISSION.md` lives at the workspace root. It captures the _reason_ the user is learning this topic. Every teaching decision — what to teach next, which resources to surface, which exercises to design — should trace back to this document.
4
+
5
+ ## Template
6
+
7
+ ```md
8
+ # Mission: {Topic}
9
+
10
+ ## Why
11
+ {1-3 sentences. The concrete real-world goal the user is chasing. What changes in their life or work when they have this skill? Avoid abstract framings like "to understand X" — push for the underlying outcome.}
12
+
13
+ ## Success looks like
14
+ - {A specific, observable thing the user will be able to do}
15
+ - {Another specific thing}
16
+ - {…}
17
+
18
+ ## Constraints
19
+ - {Time, budget, prior commitments, learning preferences, anything that bounds the approach}
20
+
21
+ ## Out of scope
22
+ - {Adjacent topics the user explicitly does not want to chase right now — protects the zone of proximal development}
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **One mission per workspace.** If the user wants to learn two unrelated things, that is two workspaces.
28
+ - **Concrete over abstract.** "Run a half marathon by October" beats "get fitter." "Ship a Rust CLI to my team" beats "learn Rust."
29
+ - **Push back on vagueness.** If the user cannot articulate why, interview them before writing anything. A bad mission is worse than no mission.
30
+ - **Revise when reality shifts.** Missions change. When the user's goal moves, update this file — don't leave a stale mission steering future sessions.
31
+ - **Keep it short.** If `MISSION.md` runs past a screen, it has stopped being a compass and started being a plan.
@@ -0,0 +1,32 @@
1
+ # RESOURCES.md Format
2
+
3
+ `RESOURCES.md` is the curated set of trusted sources for this topic. Knowledge for explainers should be drawn from here, not from parametric guesses. Wisdom comes from the communities listed here.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Topic} Resources
9
+
10
+ ## Knowledge
11
+
12
+ - [Book: _The Science and Practice of Strength Training_ — Zatsiorsky & Kraemer](https://example.com)
13
+ Foundational text on programming and adaptation. Use for: anything to do with periodisation, recovery, intensity zones.
14
+ - [Article: "How Much Should I Train?" — Greg Nuckols (Stronger By Science)](https://example.com)
15
+ Evidence-based review of volume landmarks. Use for: weekly set targets per muscle group.
16
+
17
+ ## Wisdom (Communities)
18
+
19
+ - [r/weightroom](https://reddit.com/r/weightroom)
20
+ High-signal subreddit, moderated against bro-science. Use for: programme critique, plateau troubleshooting.
21
+ - Local: Tuesday strength class at {gym name}
22
+ Use for: real-time coaching feedback on lifts.
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **High-trust only.** Prefer primary sources, recognised experts, peer-reviewed work, and communities with strong moderation. If a resource is marketing dressed as education, leave it out.
28
+ - **Annotate every entry.** A bare link is useless in three months. Add one line: what it covers and when to reach for it.
29
+ - **Group by Knowledge / Wisdom.** Mirrors the philosophy in [SKILL.md](./SKILL.md). It is fine for a resource to appear in only one group.
30
+ - **Surface gaps explicitly.** If no good resource exists for an area the mission needs, write a `## Gaps` section listing what is missing. This drives future search.
31
+ - **Prune ruthlessly.** A resource that turned out to be wrong, shallow, or off-mission should be removed, not buried. Better five sharp sources than thirty mediocre ones.
32
+ - **Record community preferences.** If the user has opted out of joining communities, note it here so future sessions don't keep proposing them.
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: teach
3
+ description: Teach the user a new skill or concept, within this workspace.
4
+ disable-model-invocation: true
5
+ argument-hint: "What would you like to learn about?"
6
+ ---
7
+
8
+ The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.
9
+
10
+ ## Teaching Workspace
11
+
12
+ Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:
13
+
14
+ - `MISSION.md`: A document capturing the _reason_ the user is interested in the topic. This should be used to ground all teaching. Use the format in [MISSION-FORMAT.md](./MISSION-FORMAT.md).
15
+ - `./reference/*.html`: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
16
+ - `RESOURCES.md`: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in [RESOURCES-FORMAT.md](./RESOURCES-FORMAT.md).
17
+ - `./learning-records/*.md`: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled `0001-<dash-case-name>.md`, where the number increments each time. Use the format in [LEARNING-RECORD-FORMAT.md](./LEARNING-RECORD-FORMAT.md).
18
+ - `./lessons/*.html`: A directory of lessons. A **lesson** is a single, self-contained HTML output that teaches one tightly-scoped thing tied to the mission. This is the primary unit of teaching in this workspace.
19
+ - `NOTES.md`: A scratchpad for you to jot down user preferences, or working notes.
20
+
21
+ ## Philosophy
22
+
23
+ To learn at a deep level, the user needs three things:
24
+
25
+ - **Knowledge**, captured from high-quality, high-trust resources
26
+ - **Skills**, acquired through highly-relevant interactive lessons devised by you, based on the knowledge
27
+ - **Wisdom**, which comes from interacting with other learners and practitioners
28
+
29
+ Before the `RESOURCES.md` is well-populated, your focus should be to find high-quality resources which will help the user acquire knowledge. Never trust your parametric knowledge.
30
+
31
+ Some topics may require more skills than knowledge. Learning more about theoretical physics might be more knowledge-based. For yoga, more skills-based.
32
+
33
+ ### Fluency vs Storage Strength
34
+
35
+ You should be careful to split between two types of learning:
36
+
37
+ - **Fluency strength**: in-the-moment retrieval of knowledge
38
+ - **Storage strength**: long-term retention of knowledge
39
+
40
+ Fluency can give the user an illusory sense of mastery, but storage strength is the real goal. Try to design lessons which build long-term retention by desirable difficulty:
41
+
42
+ - Using retrieval practice (recall from memory)
43
+ - Spacing (distributing practice over time)
44
+ - Interleaving (mixing up different but related topics in practice - for skills practice only)
45
+
46
+ ## Lessons
47
+
48
+ A lesson is the main thing you produce — the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to `./lessons/` and titled `0001-<dash-case-name>.html` where the number increments each time.
49
+
50
+ A lesson should be **beautiful** — clean, readable typography and layout — since the user will return to these later to review. Think Tufte.
51
+
52
+ The lesson should be short, and completable very quickly. Learners' working memory is very small, and we need to stay within it. But each lesson should give the user a single tangible win that they can build on. It should be directly tied to the mission, and should be in the user's zone of proximal development.
53
+
54
+ If possible, open the lesson file for the user by running a CLI command.
55
+
56
+ Each lesson should link via HTML anchors to other lessons and reference documents.
57
+
58
+ Each lesson should recommend a primary source for the user to read or watch. This should be the most high-quality, high-trust resource you found on the topic.
59
+
60
+ Each lesson should contain a reminder to ask followup questions to the agent. The agent is their teacher, and can assist with anything that's unclear.
61
+
62
+ ## The Mission
63
+
64
+ Every lesson should be tied into the mission - the reason that the user is interested in learning about the topic.
65
+
66
+ If the user is unclear about the mission, or the `MISSION.md` is not populated, your first job should be to question the user on why they want to learn this.
67
+
68
+ Failing to understand the mission will mean knowledge acquisition is not grounded in real-world goals. Lessons will feel too abstract. You will have no way of judging what the user should do next.
69
+
70
+ Missions may change as the user develops more skills and knowledge. This is normal - make sure to update the `MISSION.md` and add a learning record to capture the change. Confirm with the user before changing the mission.
71
+
72
+ ## Zone Of Proximal Development
73
+
74
+ Each lesson, the user should always feel as if they are being challenged 'just enough'.
75
+
76
+ The user may specify an exact thing they want to learn. If they don't, figure out their zone of proximal development by:
77
+
78
+ - Reading their `learning-records`
79
+ - Figuring out the right thing to teach them based on their mission
80
+ - Teach the most relevant thing that fits in their zone of proximal development
81
+
82
+ ## Knowledge
83
+
84
+ Lessons should be designed around a skill the user is going to learn. The knowledge in the lesson should be only what's required to acquire that skill. You teach the knowledge first, then get the user to practice the skills via an interactive feedback loop.
85
+
86
+ Knowledge should first be gathered from trusted resources. Use `RESOURCES.md` to keep track of them. Lessons should be littered with citations - links to external resources to back up any claim made. This increases the trustworthiness of the lesson.
87
+
88
+ For acquiring knowledge, difficulty is the enemy. It eats working memory you need for understanding.
89
+
90
+ ## Skills
91
+
92
+ If knowledge is all about acquisition, skills are about durability and flexibility. Make the knowledge stick.
93
+
94
+ For skill acquisition, difficulty is the tool. Effortful retrieval is what builds storage strength. Skills should be taught through interactive lessons. There are several tools at your disposal:
95
+
96
+ - Interactive lessons, using quizzes and light in-browser tasks
97
+ - Lessons which guide the user through a list of real-world steps to take (for instance, yoga poses)
98
+
99
+ Each of these should be based on a **feedback loop**, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.
100
+
101
+ For quizzes, each answer should be exactly the same number of words (and characters, if possible). Don't give the user any clues about the answer through formatting.
102
+
103
+ ## Acquiring Wisdom
104
+
105
+ Wisdom comes from true real-world interaction - testing your skills outside the learning environment.
106
+
107
+ When the user asks a question that appears to require wisdom, your default posture should be to attempt to answer - but to ultimately delegate to a **community**.
108
+
109
+ A community is a place (online or offline) where the user can test their skills in the real world. This might be a forum, a subreddit, a real-world class (budget permitting) or a local interest group.
110
+
111
+ You should attempt to find high-reputation communities the user can join. If the user expresses a preference that they don't want to join a community, respect it.
112
+
113
+ ## Reference Documents
114
+
115
+ While creating lessons, you should also create reference documents. Lessons can reference these documents - they are useful for tracking raw units of knowledge useful across lessons.
116
+
117
+ Lessons will rarely be revisited later - reference documents will be. They should be the compressed essence of the lesson, in a format designed for quick reference.
118
+
119
+ Some learning topics lend themselves to reference:
120
+
121
+ - Syntax and code snippets for programming
122
+ - Algorithms and flowcharts for processes
123
+ - Yoga poses and sequences for yoga
124
+ - Exercises and routines for fitness
125
+ - Glossaries for any topic with its own nomenclature
126
+
127
+ Glossaries, in particular, are an essential reference. Once one is created, it should be adhered to in every lesson.
128
+
129
+ ## `NOTES.md`
130
+
131
+ The user will sometimes express preferences of how they want to be taught, or things you should keep in mind. This is the place to record those preferences, so you can refer back to them when designing lessons or working with the user.
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: team-protocol
3
+ description: 'Use when the user runs /team-protocol — arms a sticky velocity-first quality protocol: enumerate the plan up front, complete ALL planned phases of a piece of work with NO mid-piece reviews, then run the three-step loop ONCE at the end (code-review → structure-code → improve-codebase, fix every finding, re-run each step until clean). One loop per piece. User override always wins. Stays armed until the user disarms it.'
4
+ ---
5
+
6
+ # Team Protocol
7
+
8
+ ## What this does
9
+
10
+ When invoked, this skill puts you in **team-protocol mode** for the rest of the session. From this point on, for each piece of work the user gives you, you follow three ordered steps:
11
+
12
+ 1. **Enumerate the plan up front.** Before writing any code, write down every planned phase/task as a todo list (or plan in chat). This list is the contract that defines "all phases done" — objective, not a vibe.
13
+ 2. **Implement all phases without reviewing in between.** Move phase to phase. Code-quality observations get deferred to the loop. Do not stop to review mid-piece.
14
+ 3. **Run the three-step loop ONCE when the plan is exhausted.** `code-review → structure-code → improve-codebase`, fix every finding, re-run each step until clean.
15
+
16
+ This is **velocity-first.** Interrupting every phase with a full review pass slows throughput; discipline is preserved by one consolidated, no-defer review pass over the whole finished body of work instead of N small ones.
17
+
18
+ Once armed, sticky until the user explicitly disarms. You do NOT wait for the user to say `/team-protocol` again.
19
+
20
+ ## Velocity-First — the most-violated rule
21
+
22
+ **The three-step loop runs ONCE at the very end of a piece of work, NEVER after a phase.** This is the rule that gets violated most often, because the agent's natural thoroughness says "run code-review after each phase to make sure each phase is clean." That is the violation. The protocol exists specifically to avoid that pattern.
23
+
24
+ **If you find yourself about to do any of these, STOP — you are running the loop mid-piece:**
25
+
26
+ - Run `code-review` after a single phase (when more phases remain on the plan)
27
+ - Run `structure-code` mid-piece
28
+ - Run `improve-codebase` mid-piece
29
+ - Say "this phase is clean, moving to next" (implies a per-phase review ran)
30
+ - Defer a finding to the next phase (that means you reviewed; you shouldn't have)
31
+ - Run code-review on only the latest phase's diff (must be the WHOLE piece's diff)
32
+ - Announce "loop step X complete, moving on" (per-phase loop ran)
33
+
34
+ **Correct pattern:** implement phase 1, implement phase 2, ..., implement phase N. Only THEN run the loop on the whole piece's diff. The loop reviews the cumulative body of work, not phase-by-phase snapshots.
35
+
36
+ If you catch yourself wanting to verify mid-piece: **don't.** Note the observation (e.g., "spotted: function X has a code smell, will revisit at end-of-work loop") and keep implementing. The end-of-work pass catches everything.
37
+
38
+ ## When the loop runs — "the enumerated plan is exhausted"
39
+
40
+ The loop runs **ONCE, at the end of a piece of work.** A "piece of work" = one user request with its enumerated plan. The loop triggers when **every item on the enumerated plan is implemented** — an objective check against the list, not a feeling.
41
+
42
+ **What does NOT trigger the loop:**
43
+ - Finishing one phase of several on the plan → keep implementing.
44
+ - Completing a sub-task → keep implementing.
45
+ - User says "ok next" mid-effort → keep implementing.
46
+
47
+ **Scope additions mid-stream:** if the user adds new phases, append them to the enumerated plan. The loop still runs only when the *updated* plan is exhausted. If you suspect scope is expanding indefinitely to avoid the loop, surface it: *"Plan now has N phases — want me to run the loop on what's done so far, or keep going?"*
48
+
49
+ **Ambiguity fallback:** if you're genuinely unsure whether the plan is exhausted, ask. Do not silently run early; do not silently skip.
50
+
51
+ **Multiple pieces in flight:** if you're juggling two distinct features, each gets its own enumerated plan and its own end-of-piece loop. Do NOT collapse them into one mega-loop at the end of the session — that's a loophole, not a workflow.
52
+
53
+ ## The Protocol
54
+
55
+ Run these three steps **in order**. Each step has its own fix-and-rerun loop — keep going until the step actually comes back clean.
56
+
57
+ ### 1. code-review (correctness)
58
+
59
+ Invoke the `code-review` skill on the **whole piece's diff** — not just the latest phase.
60
+
61
+ - Fix **every** finding. No deferring. No "won't fix." No "out of scope."
62
+ - Re-run `code-review` after the fixes, same scope.
63
+ - Repeat until the step actually comes back clean — no round cap. Bugs are bugs; fix them. If you judge the step is clearly not converging after many rounds, surface proactively: *"this step has gone N rounds and is still surfacing findings — want me to keep going, or escalate some of these?"*. But do not auto-stop; the user decides when the loop ends.
64
+
65
+ ### 2. structure-code (service-layer hygiene)
66
+
67
+ Invoke the `structure-code` skill on the whole piece's diff.
68
+
69
+ - Fix every finding.
70
+ - Re-run, same scope. Repeat until the step comes back clean — no round cap. If the step is clearly not converging, surface proactively and let the user decide.
71
+
72
+ ### 3. improve-codebase (architectural depth)
73
+
74
+ Invoke the `improve-codebase` skill.
75
+
76
+ - Apply every candidate it surfaces.
77
+ - Re-run after fixes. Repeat until no new candidates appear — no round cap. If the step is clearly not converging, surface proactively and let the user decide.
78
+
79
+ Only after step 3 is clean (or escalated and resolved) is the whole piece of work actually done.
80
+
81
+ ## The Rules
82
+
83
+ **Triggering**
84
+ - **Enumerate up front.** Before implementing, write the plan. The loop runs when this is exhausted — kills the "is this the end?" fudge.
85
+ - **Once per piece.** Run the full loop after ALL planned phases are done — not after each phase.
86
+ - **One loop per piece, not per session.** Juggling multiple features = one loop per feature completion. No mega-loops.
87
+
88
+ **Mid-implementation**
89
+ - **Defer to the loop is correct.** Noticing a code-quality issue and continuing IS the right move mid-piece. Do not stop to review.
90
+ - **Don't lose deferred findings.** The loop reviews the whole piece's diff, so diff-visible deferrals resurface naturally. If a deferred issue is **architectural** (not visible in diff — e.g. "I considered extracting module X but didn't"), note it on the plan so step 2/3 picks it up. Unwritten = forgotten.
91
+
92
+ **Within the loop**
93
+ - **No defer.** "I'll fix that later" is not allowed once the loop starts. Fix every finding now, or argue with the user — never silently skip.
94
+ - **In order.** Step 1 clean before step 2 starts; step 2 clean before step 3.
95
+ - **Until clean.** Each step loops until its own re-run produces zero findings. No round cap — bugs are bugs, fix them. If a step is clearly not converging, surface proactively and let the user decide whether to continue, escalate specific findings, or stop the loop.
96
+
97
+ **What "fix" means (anti-cheat)**
98
+ - Fix = resolve the **actual underlying issue.**
99
+ - **NOT a fix:** `# noqa`, `type: ignore`, commenting out the failing test, deleting the test, narrowing scope to exclude the finding, reframing as "out of scope," silencing the linter, downgrading a finding to "info."
100
+ - **Re-runs use the SAME scope and SAME diff as the original** — not a narrower re-scope that manufactures "clean."
101
+
102
+ **User override always wins**
103
+ - The user can force-skip the loop ("skip the loop, ship it") or force-run it early ("run the loop now"). The protocol never blocks a user's explicit shipping decision. If the user says ship, ship.
104
+
105
+ ## Write-Time Self-Check
106
+
107
+ Before sending any message that announces phase completion, transitions between phases, or wraps up a phase, scan it for these patterns:
108
+
109
+ - "Phase X done — running code-review" (the per-phase loop — the violation)
110
+ - "This phase is clean" / "phase X is good" / "this phase is done, looking clean" (implies per-phase review ran)
111
+ - "I need to address these findings before moving on" (per-phase loop — defer to the end-of-work loop, not now)
112
+ - "Let me run code-review on this change" / "quick code-review" / "I did a quick review" (per-phase loop)
113
+ - "I'll defer this finding to the next phase" (you reviewed; you shouldn't have)
114
+ - "Quick review of what I just did" / "I checked and..." (per-phase review)
115
+ - "Structure-code shows X issue here" (per-phase loop)
116
+ - "Improve-codebase suggests Y for this" (per-phase loop)
117
+ - "Code-review passed for this phase" (per-phase loop)
118
+ - Any message that says "all done" / "clean" / "looks good" for a single phase when more remain (implies a per-phase review)
119
+
120
+ If any pattern is present, **the loop ran mid-piece** — or you are about to run it. Don't send. Re-orient: finish all phases first, then run the loop on the whole piece.
121
+
122
+ ## Announcing it
123
+
124
+ - **On enumerate:** when you write the plan, tell the user in one line: *"Plan: <N> phases — I'll implement all of them, then run team-protocol once at the end."*
125
+ - **On loop start:** when all phases are done and you're about to start the loop, tell the user: *"All planned phases complete — running team-protocol (code-review → structure-code → improve-codebase, fix all)."* This gives them a chance to say "wait, there's more to implement first."
126
+ - **On step completion:** briefly note when each step comes back clean.
127
+ - **On proactive check-in:** if a step is clearly not converging after many rounds (you judge "many" — there's no fixed number), surface it: *"this step has gone N rounds and is still surfacing findings — keep going, or escalate some of these?"*. The user decides.
128
+
129
+ ## How to disarm
130
+
131
+ Two levels — when unsure which the user meant, ask.
132
+
133
+ **Skip for this piece only:**
134
+ - "skip the protocol this time", "no protocol on this one", "just ship it"
135
+ - Effect: the current piece ships without the loop. Protocol re-arms automatically for the next piece.
136
+
137
+ **Disarm for the session:**
138
+ - "disable team-protocol", "stop the protocol", "turn off the protocol"
139
+ - Effect: protocol is off until re-armed with `/team-protocol` or the session ends.
140
+
141
+ Arming does not persist across sessions — the user re-runs `/team-protocol` next session if they want it back.
142
+
143
+ ## Red Flags — you are about to violate the protocol
144
+
145
+ **Velocity violations (loop too often):**
146
+ - Running the loop mid-piece (after one phase of several) → no, finish all planned phases first.
147
+ - Stopping mid-implementation to review a smell → no, keep moving; the end-of-work pass catches it.
148
+ - Re-defining every phase as its own "piece" to keep the old per-phase behavior → no, the enumerated plan defines the piece.
149
+ - Running code-review on only the latest phase's diff → no, review the whole piece.
150
+
151
+ **Discipline violations (loop skipped or gamed):**
152
+ - "All phases done, but I'll skip the loop since the user didn't remind me" → no, being armed means you run it without being asked.
153
+ - Treating the whole session as one "piece" to defer the loop indefinitely → no, one loop per piece.
154
+ - Suppressing a finding (`# noqa`, deleted test, narrowed scope) and calling the step "clean" → no, that's cheating, not fixing.
155
+ - Re-running a step on a narrower scope to manufacture "clean" → no, same scope as the original.
156
+ - "This finding is minor, skipping" (inside the loop) → no, fix it or argue it with the user.
157
+ - Letting a step loop forever on a non-converging case without proactively checking in with the user → no, surface at some point. There is no fixed round count — use judgment.
158
+ - Deferring an architectural issue mid-piece and not writing it down → no, unwritten = forgotten.
159
+
160
+ **Order violations:**
161
+ - "Let me start step 2 before step 1 is fully clean" → no, finish step 1.
162
+
163
+ **Override violations:**
164
+ - Refusing to skip when the user explicitly says "just ship it" → no, the user always wins.
165
+
166
+ ## Related
167
+
168
+ - **`code-review`** — step 1 of the loop.
169
+ - **`structure-code`** — step 2 of the loop.
170
+ - **`improve-codebase`** — step 3 of the loop.
171
+ - **`professional`** — the no-cheating, no-shortcut stance this protocol enforces.
172
+ - **`prove-it`** — when a step reports "clean," the user can demand proof (the actual re-run output).