claude-dev-env 1.93.0 → 1.94.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.
Files changed (220) hide show
  1. package/_shared/pr-loop/CLAUDE.md +1 -0
  2. package/_shared/pr-loop/audit-contract.md +1 -1
  3. package/_shared/pr-loop/gh-payloads.md +3 -3
  4. package/_shared/pr-loop/post-audit-thread-contract.md +51 -0
  5. package/_shared/pr-loop/scripts/README.md +2 -2
  6. package/_shared/pr-loop/scripts/code_rules_gate.py +127 -13
  7. package/_shared/pr-loop/scripts/fix_hookspath.py +47 -12
  8. package/_shared/pr-loop/scripts/pr_loop_shared_constants/code_rules_gate_constants.py +4 -0
  9. package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +146 -69
  10. package/_shared/pr-loop/scripts/tests/test_fix_hookspath.py +497 -374
  11. package/_shared/pr-loop/state-schema.md +3 -22
  12. package/bin/CLAUDE.md +1 -1
  13. package/bin/install.mjs +2 -7
  14. package/bin/install.test.mjs +10 -4
  15. package/hooks/blocking/CLAUDE.md +2 -0
  16. package/hooks/blocking/pii_commit_command.py +398 -0
  17. package/hooks/blocking/pii_payload_scan.py +133 -0
  18. package/hooks/blocking/pii_prevention_blocker.py +151 -449
  19. package/hooks/blocking/pii_scanner.py +26 -1
  20. package/hooks/blocking/test_code_rules_enforcer_dead_config_field.py +2 -2
  21. package/hooks/blocking/test_pii_prevention_blocker.py +299 -0
  22. package/hooks/blocking/test_pii_scanner.py +27 -2
  23. package/hooks/blocking/test_verdict_directory_write_blocker.py +42 -7
  24. package/hooks/hooks_constants/CLAUDE.md +2 -2
  25. package/hooks/hooks_constants/code_rules_path_utils_constants.py +0 -2
  26. package/hooks/hooks_constants/local_identity.py +65 -15
  27. package/hooks/hooks_constants/pii_prevention_constants.py +20 -8
  28. package/hooks/hooks_constants/pr_description_enforcer_constants.py +1 -1
  29. package/hooks/hooks_constants/test_local_identity.py +68 -0
  30. package/package.json +1 -1
  31. package/scripts/CLAUDE.md +10 -1
  32. package/scripts/Get-SessionAccount.ps1 +210 -0
  33. package/scripts/tests/CLAUDE.md +15 -1
  34. package/scripts/tests/Get-SessionAccount.Tests.ps1 +350 -0
  35. package/skills/CLAUDE.md +3 -25
  36. package/skills/anthropic-plan/SKILL.md +1 -13
  37. package/skills/autoconverge/CLAUDE.md +5 -2
  38. package/skills/autoconverge/SKILL.md +112 -387
  39. package/skills/autoconverge/reference/CLAUDE.md +4 -1
  40. package/skills/autoconverge/reference/closing-report.md +9 -2
  41. package/skills/autoconverge/reference/convergence.md +26 -22
  42. package/skills/autoconverge/reference/headless-safety.md +44 -0
  43. package/skills/autoconverge/reference/multi-pr.md +88 -0
  44. package/skills/autoconverge/reference/self-closing-loop.md +84 -0
  45. package/skills/autoconverge/reference/stop-conditions.md +21 -13
  46. package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +87 -27
  47. package/skills/autoconverge/workflow/converge.contract.test.mjs +40 -10
  48. package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +179 -47
  49. package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
  50. package/skills/autoconverge/workflow/converge.mjs +284 -94
  51. package/skills/bugteam/CLAUDE.md +1 -1
  52. package/skills/bugteam/CONSTRAINTS.md +3 -3
  53. package/skills/bugteam/PROMPTS.md +8 -19
  54. package/skills/bugteam/SKILL.md +13 -14
  55. package/skills/bugteam/reference/CLAUDE.md +1 -1
  56. package/skills/bugteam/reference/audit-and-teammates.md +2 -2
  57. package/skills/bugteam/reference/copilot-gap-analysis.md +2 -0
  58. package/skills/bugteam/reference/github-pr-reviews.md +56 -38
  59. package/skills/bugteam/reference/team-setup.md +11 -11
  60. package/skills/bugteam/scripts/CLAUDE.md +6 -6
  61. package/skills/bugteam/scripts/README.md +20 -8
  62. package/skills/bugteam/scripts/bugteam_code_rules_gate.py +13 -1463
  63. package/skills/bugteam/scripts/bugteam_fix_hookspath.py +23 -358
  64. package/skills/bugteam/scripts/bugteam_preflight.py +13 -315
  65. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +2 -3
  66. package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +34 -1053
  67. package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +30 -347
  68. package/skills/bugteam/scripts/test_bugteam_preflight.py +30 -305
  69. package/skills/copilot-finding-triage/SKILL.md +80 -28
  70. package/skills/copilot-finding-triage/reference/tier-rubric.md +70 -11
  71. package/skills/copilot-finding-triage/templates/notification.md +8 -3
  72. package/skills/everything-search/SKILL.md +1 -2
  73. package/skills/grokify/SKILL.md +58 -0
  74. package/skills/grokify/templates/handoff-template.md +92 -0
  75. package/skills/orchestrator/SKILL.md +12 -8
  76. package/skills/orchestrator-refresh/SKILL.md +3 -3
  77. package/skills/pr-converge/SKILL.md +132 -233
  78. package/skills/pr-converge/reference/convergence-gates.md +102 -66
  79. package/skills/pr-converge/reference/examples.md +37 -25
  80. package/skills/pr-converge/reference/fix-protocol.md +7 -7
  81. package/skills/pr-converge/reference/multi-pr-orchestration.md +10 -4
  82. package/skills/pr-converge/reference/per-tick.md +64 -41
  83. package/skills/pr-converge/reference/state-schema.md +27 -2
  84. package/skills/pr-converge/scripts/CLAUDE.md +8 -0
  85. package/skills/pr-converge/scripts/README.md +4 -3
  86. package/skills/pr-converge/scripts/_pr_converge_path_setup.py +23 -0
  87. package/skills/pr-converge/scripts/check_convergence.py +189 -645
  88. package/skills/pr-converge/scripts/check_convergence_gates.py +235 -0
  89. package/skills/pr-converge/scripts/check_convergence_thread_gates.py +219 -0
  90. package/skills/pr-converge/scripts/conftest.py +8 -0
  91. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -0
  92. package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -0
  93. package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +26 -0
  94. package/skills/pr-converge/scripts/test_check_convergence.py +73 -228
  95. package/skills/pr-converge/scripts/test_check_convergence_contract.py +321 -0
  96. package/skills/pr-converge/scripts/test_check_convergence_gates.py +68 -0
  97. package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +75 -0
  98. package/skills/privacy-hygiene/SKILL.md +8 -7
  99. package/skills/reviewer-gates/SKILL.md +26 -8
  100. package/skills/session-log/SKILL.md +11 -12
  101. package/skills/session-tidy/SKILL.md +40 -30
  102. package/skills/skill-builder/CLAUDE.md +13 -10
  103. package/skills/skill-builder/SKILL.md +31 -31
  104. package/skills/skill-builder/references/CLAUDE.md +10 -6
  105. package/skills/skill-builder/references/delegation-map.md +13 -4
  106. package/skills/skill-builder/references/description-field.md +113 -0
  107. package/skills/skill-builder/references/self-audit-checklist.md +21 -4
  108. package/skills/skill-builder/references/skill-modularity.md +113 -0
  109. package/skills/skill-builder/references/skill-types.md +4 -0
  110. package/skills/skill-builder/templates/CLAUDE.md +4 -4
  111. package/skills/skill-builder/templates/gap-analysis.md +25 -1
  112. package/skills/skill-builder/workflows/CLAUDE.md +6 -4
  113. package/skills/skill-builder/workflows/improve-skill.md +17 -16
  114. package/skills/skill-builder/workflows/new-skill.md +34 -10
  115. package/skills/skill-builder/workflows/polish-skill.md +59 -43
  116. package/skills/usage-pause/SKILL.md +10 -14
  117. package/skills/bdd-protocol/CLAUDE.md +0 -26
  118. package/skills/bdd-protocol/SKILL.md +0 -30
  119. package/skills/bdd-protocol/references/CLAUDE.md +0 -10
  120. package/skills/bdd-protocol/references/anti-patterns.md +0 -26
  121. package/skills/bdd-protocol/references/example-mapping.md +0 -23
  122. package/skills/bg-agent/CLAUDE.md +0 -17
  123. package/skills/bg-agent/SKILL.md +0 -69
  124. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py +0 -55
  125. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_fix_hookspath_constants.py +0 -26
  126. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_preflight_constants.py +0 -35
  127. package/skills/caveman/CLAUDE.md +0 -15
  128. package/skills/caveman/SKILL.md +0 -38
  129. package/skills/code/CLAUDE.md +0 -17
  130. package/skills/code/SKILL.md +0 -178
  131. package/skills/deep-research/CLAUDE.md +0 -17
  132. package/skills/deep-research/SKILL.md +0 -80
  133. package/skills/findbugs/CLAUDE.md +0 -20
  134. package/skills/findbugs/SKILL.md +0 -241
  135. package/skills/fixbugs/CLAUDE.md +0 -19
  136. package/skills/fixbugs/SKILL.md +0 -142
  137. package/skills/gh-paginate/CLAUDE.md +0 -18
  138. package/skills/gh-paginate/SKILL.md +0 -84
  139. package/skills/gotcha/CLAUDE.md +0 -33
  140. package/skills/gotcha/SKILL.md +0 -73
  141. package/skills/implement/CLAUDE.md +0 -27
  142. package/skills/implement/SKILL.md +0 -66
  143. package/skills/implement/scripts/CLAUDE.md +0 -22
  144. package/skills/implement/scripts/append_note.py +0 -133
  145. package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +0 -22
  146. package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
  147. package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +0 -12
  148. package/skills/implement/scripts/test_append_note.py +0 -191
  149. package/skills/log-audit/CLAUDE.md +0 -20
  150. package/skills/log-audit/SKILL.md +0 -66
  151. package/skills/log-audit/reference/CLAUDE.md +0 -9
  152. package/skills/log-audit/reference/charter.md +0 -52
  153. package/skills/log-audit/scripts/CLAUDE.md +0 -27
  154. package/skills/log-audit/scripts/cluster_recurrences.py +0 -261
  155. package/skills/log-audit/scripts/collect_log_window.py +0 -199
  156. package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +0 -12
  157. package/skills/log-audit/scripts/log_audit_constants/__init__.py +0 -0
  158. package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +0 -23
  159. package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +0 -24
  160. package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +0 -49
  161. package/skills/log-audit/scripts/mine_copilot_findings.py +0 -302
  162. package/skills/log-audit/scripts/test_cluster_recurrences.py +0 -160
  163. package/skills/log-audit/scripts/test_collect_log_window.py +0 -111
  164. package/skills/log-audit/scripts/test_mine_copilot_findings.py +0 -126
  165. package/skills/logifix/CLAUDE.md +0 -36
  166. package/skills/logifix/SKILL.md +0 -69
  167. package/skills/logifix/scripts/CLAUDE.md +0 -16
  168. package/skills/logifix/scripts/logifix.ps1 +0 -205
  169. package/skills/monitor-open-prs/CLAUDE.md +0 -34
  170. package/skills/monitor-open-prs/SKILL.md +0 -88
  171. package/skills/monitor-open-prs/scripts/CLAUDE.md +0 -17
  172. package/skills/monitor-open-prs/scripts/discover_open_prs.py +0 -69
  173. package/skills/monitor-open-prs/scripts/test_discover_open_prs.py +0 -149
  174. package/skills/monitor-open-prs/test_skill_contract.py +0 -27
  175. package/skills/post-audit-findings/SKILL.md +0 -80
  176. package/skills/pr-consistency-audit/CLAUDE.md +0 -34
  177. package/skills/pr-consistency-audit/SKILL.md +0 -116
  178. package/skills/pr-consistency-audit/reference/CLAUDE.md +0 -16
  179. package/skills/pr-consistency-audit/reference/detection-rules.md +0 -96
  180. package/skills/pr-consistency-audit/reference/illustrations.md +0 -78
  181. package/skills/pr-fix-protocol/SKILL.md +0 -65
  182. package/skills/pr-review-responder/CLAUDE.md +0 -35
  183. package/skills/pr-review-responder/EXAMPLES.md +0 -590
  184. package/skills/pr-review-responder/PRINCIPLES.md +0 -533
  185. package/skills/pr-review-responder/README.md +0 -168
  186. package/skills/pr-review-responder/SKILL.md +0 -203
  187. package/skills/pr-review-responder/TESTING.md +0 -350
  188. package/skills/pr-scope-resolve/SKILL.md +0 -45
  189. package/skills/pre-compact/CLAUDE.md +0 -24
  190. package/skills/pre-compact/SKILL.md +0 -134
  191. package/skills/qbug/CLAUDE.md +0 -40
  192. package/skills/qbug/SKILL.md +0 -387
  193. package/skills/qbug/test_qbug_skill_audit_schema.py +0 -152
  194. package/skills/qbug/test_qbug_skill_post_fix_audit.py +0 -103
  195. package/skills/refine/CLAUDE.md +0 -44
  196. package/skills/refine/SKILL.md +0 -262
  197. package/skills/refine/templates/CLAUDE.md +0 -17
  198. package/skills/refine/templates/implementation-notes-template.html +0 -56
  199. package/skills/refine/templates/plan-template.md +0 -60
  200. package/skills/research-mode/CLAUDE.md +0 -35
  201. package/skills/research-mode/SKILL.md +0 -53
  202. package/skills/structure-prompt/CLAUDE.md +0 -42
  203. package/skills/structure-prompt/SKILL.md +0 -44
  204. package/skills/structure-prompt/reference/CLAUDE.md +0 -28
  205. package/skills/structure-prompt/reference/adversarial-tuning.md +0 -62
  206. package/skills/structure-prompt/reference/block-classification.md +0 -27
  207. package/skills/structure-prompt/reference/canonical-case.md +0 -48
  208. package/skills/structure-prompt/reference/citation-depth.md +0 -70
  209. package/skills/structure-prompt/reference/cleanup.md +0 -33
  210. package/skills/structure-prompt/reference/constraints.md +0 -33
  211. package/skills/structure-prompt/reference/directives.md +0 -37
  212. package/skills/structure-prompt/reference/examples.md +0 -72
  213. package/skills/structure-prompt/reference/instantiation.md +0 -51
  214. package/skills/structure-prompt/reference/output-contract.md +0 -72
  215. package/skills/structure-prompt/reference/per-category.md +0 -23
  216. package/skills/structure-prompt/reference/persona.md +0 -38
  217. package/skills/structure-prompt/reference/research.md +0 -33
  218. package/skills/structure-prompt/reference/structure.md +0 -28
  219. package/skills/verified-build/CLAUDE.md +0 -33
  220. package/skills/verified-build/SKILL.md +0 -33
@@ -0,0 +1,113 @@
1
+ # Skill modularity and composition
2
+
3
+ Source: [Lessons from Building Claude Code](thariq-x-post-skills.json) — Composing Skills; skill type notes on skill dependencies; Anthropic progressive disclosure (within-skill layering).
4
+
5
+ ## Two modularity layers
6
+
7
+ | Layer | What it controls | Where enforced |
8
+ |---|---|---|
9
+ | **Within skill** | SKILL.md stays a hub; detail lives in companion files | `progressive-disclosure.md`, self-audit line-cap items |
10
+ | **Across skills** | One skill = one capability; multi-step work invokes sibling skills by name | This file, self-audit modularity items, new/improve workflows |
11
+
12
+ Both layers apply. Progressive disclosure alone does not make a multi-capability skill modular.
13
+
14
+ ## Core rules
15
+
16
+ ### One capability per skill
17
+
18
+ A skill owns **one** clear job a user can name in one sentence. Signals it is too large:
19
+
20
+ - Description needs "and" for unrelated jobs
21
+ - Process has independent branches that never share gotchas or scripts
22
+ - Claude B only ever needs half the package for a typical task
23
+ - Gotchas cluster into two or more unrelated failure domains
24
+
25
+ When those hold, split or restructure as an orchestrator + sub-skills (below).
26
+
27
+ ### Compose by name (sub-skills)
28
+
29
+ > "You can just reference other skills by name, and the model will invoke them if they are installed."
30
+
31
+ There is no native dependency installer. Composition works by:
32
+
33
+ 1. Naming the sibling skill (`/skill-name` or the skill's trigger description).
34
+ 2. Stating **when** to invoke it (which process step).
35
+ 3. Stating **what** it must produce for the next step.
36
+ 4. Stating what to do if it is missing (refuse, degrade, or ask the user).
37
+
38
+ **Sub-skill** means a focused skill another skill invokes — not a nested folder inside the parent package. Sub-skills are peer skills in the skill library.
39
+
40
+ ### Prefer invoke over reimplement
41
+
42
+ When an existing skill already owns a step (PR scope resolve, self-audit handoff pattern, commit protocol, etc.), the new skill **names and invokes** that skill. It does not paste a second copy of that process into its own SKILL.md.
43
+
44
+ Exception: the existing skill is wrong for this domain, and the gap analysis records why a local procedure is required.
45
+
46
+ ### Orchestrator skills
47
+
48
+ Some capabilities are multi-step by nature (lifecycle skills, PR loops). The modular shape is:
49
+
50
+ ```
51
+ orchestrator-skill/ # thin: routing, order, refusal, handoff packets
52
+ SKILL.md # invokes named sub-skills at each step
53
+ sibling-skill-a/ # one capability
54
+ sibling-skill-b/ # one capability
55
+ ```
56
+
57
+ The orchestrator owns sequence and gates. Sub-skills own domain detail. skill-builder itself follows this shape: it orchestrates and delegates writing to `/skill-writer`.
58
+
59
+ ### Within-skill vs split
60
+
61
+ | Situation | Choice |
62
+ |---|---|
63
+ | One capability, large reference surface | Stay one skill; use progressive disclosure |
64
+ | Two capabilities that users invoke separately | Two skills |
65
+ | Multi-step workflow that always runs end-to-end | Orchestrator skill + named sub-skills for reusable steps |
66
+ | Overlap with an existing skill | Shrink the new skill; invoke the existing one; tighten both descriptions |
67
+
68
+ ## Composition plan (required before write)
69
+
70
+ Every new skill and every improve pass that changes scope records a composition plan in the gap analysis:
71
+
72
+ 1. **Capability sentence** — one job.
73
+ 2. **Related skills inventory** — existing skills that touch the same domain (scan installed skills and the package tree).
74
+ 3. **Reuse** — which steps invoke which skills.
75
+ 4. **Split** — if more than one capability, list the skills to create or keep separate.
76
+ 5. **Missing** — sub-skills that do not exist yet (build them first or as sibling packages in the same change).
77
+
78
+ ## How to document sub-skills in SKILL.md
79
+
80
+ In Process or a dedicated **Sub-skills** section:
81
+
82
+ ```markdown
83
+ ## Sub-skills
84
+
85
+ | Skill | When | Produces |
86
+ |---|---|---|
87
+ | `/pr-scope-resolve` | Step 1 — resolve the PR target | owner, repo, PR number, head ref |
88
+ | `/skill-writer` | Step 4 — author SKILL.md | skill package files |
89
+
90
+ If a listed skill is not installed, respond: `[exact refusal or degrade line]`.
91
+ ```
92
+
93
+ Self-audit requires this table (or equivalent) whenever the skill composes others.
94
+
95
+ ## Anti-patterns
96
+
97
+ - **Monolith skill** — one package that reimplements commit, review, deploy, and logging under one description.
98
+ - **Silent reimplementation** — copy-pasted steps from another skill with no name reference.
99
+ - **Folder nesting as composition** — burying a second skill's content under `workflows/` instead of a real sibling skill the model can select.
100
+ - **Vague dependency** — "use other skills as needed" with no names, when, or outputs.
101
+ - **Redundant twin** — a new skill whose description overlaps an existing one without a refusal boundary.
102
+
103
+ ## Checklist for authors
104
+
105
+ Copy into the response during new-skill Gather and improve Diagnose:
106
+
107
+ ```
108
+ - [ ] Capability fits one sentence without an unrelated "and"
109
+ - [ ] Related skills scanned; inventory written
110
+ - [ ] Reusable steps map to named skills (or justify local procedure)
111
+ - [ ] Multi-capability work is split or is an orchestrator with sub-skills
112
+ - [ ] SKILL.md will name each sub-skill with when + produces + missing behavior
113
+ ```
@@ -149,6 +149,8 @@ Skills that help fetch, push, and deploy code.
149
149
 
150
150
  > "These skills may reference other skills to collect data."
151
151
 
152
+ Compose peer skills by name (see `skill-modularity.md`). Do not paste those peers' procedures into this package.
153
+
152
154
  **Examples:** `babysit-pr`, `deploy-<service>`, `cherry-pick-prod`
153
155
 
154
156
  **Folder structure:**
@@ -226,3 +228,5 @@ skill-name/
226
228
  | "Manage infrastructure / cleanup" | 9. Infrastructure Operations |
227
229
 
228
230
  When the skill straddles multiple types, pick the dominant one for folder structure and note the secondary influence.
231
+
232
+ If it straddles **capabilities** (not just types), split into separate skills or a thin orchestrator plus sub-skills — see `skill-modularity.md`. Frontmatter `description` stays a trigger catalog for whichever package owns the job — see `description-field.md`.
@@ -1,14 +1,14 @@
1
1
  # skill-builder/templates
2
2
 
3
- Reusable template for skill-building artifacts.
3
+ Reusable templates for skill-building artifacts.
4
4
 
5
5
  ## Key files
6
6
 
7
7
  | File | Purpose |
8
8
  |---|---|
9
- | `gap-analysis.md` | Template for documenting gaps in an existing skill. Used during the "improve existing skill" workflow (Step 2 observation gathering) to structure findings before writing a new version. |
9
+ | `gap-analysis.md` | Template for gaps, composition plan, and description triggers. Used in new-skill Gather and improve diagnosis. |
10
10
 
11
11
  ## Conventions
12
12
 
13
- - The gap-analysis template is loaded by the `improve-skill.md` workflow, not the `new-skill.md` workflow.
14
- - Fill in the template inline during the workflow; do not commit completed gap analyses to this directory.
13
+ - Fill the template inline during the workflow; do not commit completed gap analyses to this directory.
14
+ - Composition plan and Description triggers sections are required before Write on a new skill.
@@ -6,12 +6,36 @@
6
6
 
7
7
  ## Task Description
8
8
 
9
- [What the user is trying to accomplish — the capability this skill should provide]
9
+ [One capability sentence — the single job this skill owns]
10
10
 
11
11
  ## Degree of Freedom
12
12
 
13
13
  [High | Medium | Low] — [Reasoning based on task fragility and variability]
14
14
 
15
+ ## Composition Plan
16
+
17
+ See `references/skill-modularity.md`.
18
+
19
+ - **Capability sentence:** [one job, no unrelated "and"]
20
+ - **Related skills inventory:** [skill → keep separate | invoke as sub-skill | absorb + reason]
21
+ - **Sub-skills to invoke:** [name → when → produces → missing behavior]
22
+ - **Split or orchestrator:** [one leaf skill | several skills | thin orchestrator + peers]
23
+ - **Missing sub-skills to create:** [names to build first or as siblings]
24
+
25
+ ## Description Triggers
26
+
27
+ See `references/description-field.md`. Not story prose.
28
+
29
+ - **Capability stem tokens:** [5–20 words]
30
+ - **Trigger phrases:** [comma-separated phrases, slash forms, file types]
31
+ - **Near-miss exclusions:** [tokens that must not select this skill]
32
+ - **Draft description string:**
33
+
34
+ ```yaml
35
+ description: >-
36
+ <stem>. Triggers: <phrases>.
37
+ ```
38
+
15
39
  ## Gaps Identified
16
40
 
17
41
  ### Gap 1: [Descriptive Name]
@@ -6,12 +6,14 @@ Step-by-step workflow files for each skill lifecycle phase, loaded on demand by
6
6
 
7
7
  | File | Purpose |
8
8
  |---|---|
9
- | `new-skill.md` | Full lifecycle for creating a new skill: 6 steps from intent capture through type classification, folder scaffolding, writing via skill-writer, self-audit, and delivery. |
10
- | `improve-skill.md` | Observation-first flow for improving an existing skill: 6 steps starting from real usage failures, gap analysis, targeted rewrite, and re-audit. |
11
- | `polish-skill.md` | Description audit and final validation: 5 steps for description optimization, trigger phrase review, and checklist sign-off. |
9
+ | `new-skill.md` | Full lifecycle: classify, scaffold, gather (composition + description triggers), write via skill-writer, self-audit, deliver. |
10
+ | `improve-skill.md` | Observation-first improve: diagnose activation/modularity/quality, targeted fix, re-audit. |
11
+ | `polish-skill.md` | Description trigger-catalog audit, progressive disclosure + modularity audit, checklist sign-off. |
12
12
 
13
13
  ## Conventions
14
14
 
15
15
  - `SKILL.md` routes to exactly one workflow file per invocation based on the user's intent (new / improve / polish).
16
- - Each workflow references `../references/self-audit-checklist.md` at its final step.
16
+ - Each workflow references `../references/self-audit-checklist.md` at its final verification step.
17
+ - New and improve load `skill-modularity.md` and `description-field.md` when gathering or diagnosing.
18
+ - Polish Step 1 is the dedicated description rewrite pass.
17
19
  - Load only the workflow that matches the active task; the other two stay out of context.
@@ -28,15 +28,7 @@ Spawn a subagent with the existing skill on a real task (see delegation-map.md f
28
28
 
29
29
  ### Transcript analysis
30
30
 
31
- > "Watch for unexpected exploration paths, missed connections, overreliance on certain sections, and ignored content."
32
-
33
- Document:
34
- - Where did the skill work well?
35
- - Where did it fail or produce subpar results?
36
- - Did Claude B follow the skill’s instructions as written?
37
- - Did Claude B ignore any sections or files?
38
- - Did Claude B explore in unexpected directions?
39
- - What would a gotcha have prevented?
31
+ Follow **Reading a transcript for observations** in `${CLAUDE_SKILL_DIR}/references/delegation-map.md`. Note what worked, what failed, and which gotcha would have prevented each failure.
40
32
 
41
33
  **Output:** Observation notes with specific failure examples.
42
34
 
@@ -50,8 +42,11 @@ Failure classification:
50
42
 
51
43
  | Symptom | Diagnosis | Apply |
52
44
  |---|---|---|
53
- | Skill never activates when it should | Description missing trigger phrases or too vague | Principles: Description field |
54
- | Skill activates when it shouldn’t | Description too broad, no refusal cases | Principles: Constraints and refusal cases |
45
+ | Skill never activates when it should | Description missing trigger phrases, story prose, or too vague | `description-field.md` trigger catalog |
46
+ | Skill activates when it shouldn’t | Description too broad / story; no refusal boundary | Description triggers + Constraints / when-this-applies |
47
+ | Description is multi-sentence narrative | Description used as summary/story | Rewrite per `description-field.md` |
48
+ | Skill owns unrelated jobs | Monolith / multi-capability | `skill-modularity.md` — split or orchestrator + sub-skills |
49
+ | Skill reimplements another skill’s steps | Silent reimplementation | Compose by name; sub-skills table |
55
50
  | Claude reads wrong files first | Structure not intuitive, hub doesn’t guide well | Progressive disclosure |
56
51
  | Claude ignores a companion file | File not signaled in SKILL.md or poorly linked | File index, hub pattern |
57
52
  | Claude over-explains basics | Skill states what Claude already knows | Principles: Concision |
@@ -60,6 +55,8 @@ Failure classification:
60
55
  | Claude errors on script execution | Script doesn’t handle errors, missing deps | Principles: Scripts |
61
56
  | Output format is wrong | Missing template or examples | Principles: Templates and examples |
62
57
 
58
+ When scope or activation is in play, re-read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md` and `${CLAUDE_SKILL_DIR}/references/description-field.md`.
59
+
63
60
  **Output:** Diagnosis per failure — which best practice was violated.
64
61
 
65
62
  ---
@@ -72,9 +69,11 @@ Failure classification:
72
69
 
73
70
  For each diagnosis from Step 2:
74
71
 
75
- 1. Read the relevant section in `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md` or the SKILL.md principles.
72
+ 1. Read the matching reference (`description-field.md`, `skill-modularity.md`, `progressive-disclosure.md`, or SKILL.md principles).
76
73
  2. Make the minimum change that addresses the failure.
77
- 3. Verify the fix doesn’t break anything that was working.
74
+ 3. For description failures: rewrite frontmatter into a trigger catalog (capability stem + Triggers list); strip story prose.
75
+ 4. For modularity failures: add sub-skills table, split packages, or thin the orchestrator; do not paste peer skill procedures.
76
+ 5. Verify the fix doesn’t break anything that was working.
78
77
 
79
78
  Delegate larger rewrites to `/skill-writer` using the refine-skill handoff from delegation-map.md.
80
79
 
@@ -121,6 +120,8 @@ Present to the user:
121
120
  1. **What was observed** — summary of failures from Step 1.
122
121
  2. **What was diagnosed** — which best practices were violated.
123
122
  3. **What changed** — delta summary (files modified, lines added/removed).
124
- 4. **New gotchas added** — list of gotchas captured.
125
- 5. **Audit summary** — post-fix audit results.
126
- 6. **Suggested re-test** — a concrete task to verify the fix with Claude B.
123
+ 4. **Description** — final frontmatter if rewritten (paste the trigger catalog).
124
+ 5. **Composition** — sub-skills or splits if modularity changed.
125
+ 6. **New gotchas added** — list of gotchas captured.
126
+ 7. **Audit summary** — post-fix audit results.
127
+ 8. **Suggested re-test** — a concrete task to verify the fix with Claude B.
@@ -52,10 +52,12 @@ Best-practice-driven lifecycle for building a skill from scratch.
52
52
 
53
53
  ## Step 3: Gather
54
54
 
55
- **Goal:** Collect domain knowledge, failure patterns, and gotchas from the user.
55
+ **Goal:** Collect domain knowledge, failure patterns, gotchas, and a composition plan.
56
56
 
57
57
  > "Build a Gotchas Section — these sections should be built up from common failure points that Claude runs into when using your skill."
58
58
 
59
+ Read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md` and `${CLAUDE_SKILL_DIR}/references/description-field.md` before the interview. Modularity and description triggers are gates: do not proceed to Write until the composition plan and trigger catalog drafts are filled.
60
+
59
61
  ### Interview questions
60
62
 
61
63
  Ask the user:
@@ -68,16 +70,26 @@ Ask the user:
68
70
  6. "Are there rules or constraints Claude must never violate?"
69
71
  7. "What tools, scripts, or libraries does Claude need to use?"
70
72
  8. "Does this skill need to run differently for different models (Haiku vs Opus)?"
73
+ 9. "In one sentence, what is the single capability this skill owns?"
74
+ 10. "Which existing skills already cover a step of this work? Which steps should this skill invoke by name?"
75
+ 11. "Is this one skill, several skills, or a thin orchestrator that calls sub-skills?"
76
+ 12. "What exact phrases, slash commands, or file types should select this skill?"
77
+
78
+ ### Related-skills inventory
79
+
80
+ Scan installed skills and the package skill tree for names that touch the same domain. List each with: keep separate / invoke as sub-skill / absorb (with reason if absorb).
71
81
 
72
82
  ### Generate gap analysis
73
83
 
74
84
  Use the template at `${CLAUDE_SKILL_DIR}/templates/gap-analysis.md`. Fill in:
75
85
 
76
86
  - Skill type and degree of freedom
77
- - Task description
87
+ - Task description (one capability sentence)
78
88
  - Gaps identified (what failed, what was needed)
79
89
  - Recurring patterns across gaps
80
90
  - Initial gotcha candidates
91
+ - **Composition plan** — capability sentence, related skills, sub-skills to invoke, split or orchestrator decision, missing sub-skills to create
92
+ - **Description triggers** — capability stem tokens + trigger phrase list (not story prose)
81
93
 
82
94
  ### Assess degree of freedom
83
95
 
@@ -91,7 +103,15 @@ Use the template at `${CLAUDE_SKILL_DIR}/templates/gap-analysis.md`. Fill in:
91
103
 
92
104
  Record the assessment with reasoning.
93
105
 
94
- **Output:** Completed gap analysis, initial gotchas list, degree-of-freedom assessment.
106
+ ### Modularity gate
107
+
108
+ Copy the author checklist from `skill-modularity.md` and check every box. If the capability sentence needs an unrelated "and", stop and split scope with the user before Step 4.
109
+
110
+ ### Description gate
111
+
112
+ Draft the frontmatter description using the template in `description-field.md`. Copy the description checklist and check every box. Story prose fails the gate.
113
+
114
+ **Output:** Completed gap analysis (composition plan + description triggers), initial gotchas, degree-of-freedom assessment, modularity checklist, draft description.
95
115
 
96
116
  ---
97
117
 
@@ -101,7 +121,7 @@ Record the assessment with reasoning.
101
121
 
102
122
  Delegate to `/skill-writer` using the structured handoff from `${CLAUDE_SKILL_DIR}/references/delegation-map.md`.
103
123
 
104
- The handoff must include: skill type, folder structure, gap analysis, initial gotchas, degree of freedom, constraints.
124
+ The handoff must include: skill type, folder structure, gap analysis (composition plan + description triggers), initial gotchas, degree of freedom, constraints, sub-skills to name in SKILL.md, exact description string to put in frontmatter.
105
125
 
106
126
  After skill-writer produces the draft:
107
127
 
@@ -109,8 +129,10 @@ After skill-writer produces the draft:
109
129
  2. Verify SKILL.md body is under 500 lines.
110
130
  3. Verify all references are one level deep.
111
131
  4. Verify files over 100 lines have a TOC.
132
+ 5. Verify modularity: single capability, sub-skills table when composing, no silent reimplementation of inventoried skills.
133
+ 6. Verify description is a trigger catalog per `description-field.md` (not story prose).
112
134
 
113
- Fix structural issues before proceeding.
135
+ Fix structural, modularity, and description issues before proceeding.
114
136
 
115
137
  **Output:** Complete skill package at the target directory.
116
138
 
@@ -134,14 +156,16 @@ For an independent check, spawn a subagent to run the audit (see delegation-map.
134
156
 
135
157
  ## Step 6: Deliver
136
158
 
137
- **Goal:** Hand off the finished skill with full documentation.
159
+ **Goal:** Hand off the finished skill with full documentation. Prompt user if they want a PR up with the skill.
138
160
 
139
161
  Present to the user:
140
162
 
141
163
  1. **File map** — every file created, with its purpose.
142
164
  2. **Skill type** — classification and why it fits.
143
165
  3. **Degree of freedom** — assessment and reasoning.
144
- 4. **Gotchas seeded** — initial gotchas captured.
145
- 5. **Audit summary** — "All 38 items: N passed, M N/A."
146
- 6. **Maintenance notes** — what to watch for in future usage that might warrant iteration.
147
- 7. **Suggested first test** — a concrete task to try with Claude B.
166
+ 4. **Composition plan** — capability sentence, sub-skills invoked, any skills split out.
167
+ 5. **Description** — final frontmatter trigger catalog (paste the string).
168
+ 6. **Gotchas seeded** — initial gotchas captured.
169
+ 7. **Audit summary** — "All checklist items: N passed, M N/A."
170
+ 8. **Maintenance notes** — what to watch for in future usage that might warrant iteration.
171
+ 9. **Suggested first test** — a concrete task to try with Claude B.
@@ -10,70 +10,83 @@ Final optimization pass for a skill that is functionally complete.
10
10
 
11
11
  ---
12
12
 
13
- ## Step 1: Description Audit
13
+ ## Step 1: Description trigger-catalog audit
14
14
 
15
- **Goal:** Verify the description field is optimized for model discovery.
15
+ **Goal:** Rewrite the frontmatter `description` into a dense trigger catalog. Selection metadata only — not a story.
16
+
17
+ Read `${CLAUDE_SKILL_DIR}/references/description-field.md` and apply its checklist in full.
16
18
 
17
19
  > "The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
18
20
 
19
21
  > "The description field is not a summary — it's a description of when to trigger."
20
22
 
21
- Check each requirement:
23
+ ### Fail conditions (must rewrite)
24
+
25
+ - Multi-sentence narrative or benefits language ("helps you", "ensures reliable…")
26
+ - First or second person
27
+ - Process/implementation detail that belongs in the body
28
+ - Missing concrete trigger phrases
29
+ - Overlap with a sibling skill with no distinguishing tokens
30
+
31
+ ### Required shape
32
+
33
+ ```yaml
34
+ description: >-
35
+ <capability tokens>. Triggers: <phrase>, <phrase>, <slash>, <filetype>.
36
+ ```
22
37
 
23
- - [ ] **Third person.** "Processes Excel files" not "I can help you process Excel files."
24
- - [ ] **Includes what AND when.** Both the capability and trigger contexts.
25
- - [ ] **Specific trigger phrases.** Different phrasings of the same intent should all match.
26
- - [ ] **Under 1024 characters.** Hard limit.
27
- - [ ] **No XML tags.**
28
- - [ ] **Distinguishable from similar skills.** If two skills overlap, the descriptions must make the boundary clear.
38
+ ### Checklist
39
+
40
+ - [ ] **Third person** no I/you
41
+ - [ ] **Capability stem** what tokens, ≤20 words, no story
42
+ - [ ] **Triggers list** — concrete phrases / slash forms / file types
43
+ - [ ] **Under 1024 characters** (prefer much shorter; always-on context)
44
+ - [ ] **No XML tags**
45
+ - [ ] **Not a story** — no narrative, benefits, or process dump
46
+ - [ ] **Sibling boundary** — distinguishable from related skills
29
47
 
30
48
  ### Trigger phrase review
31
49
 
32
50
  Generate 10 variations of the user's intent:
51
+
33
52
  - Formal and casual phrasings
34
- - Cases where the user doesn't explicitly name the skill but clearly needs it
53
+ - Cases where the user doesn't name the skill but clearly needs it
35
54
  - Cases where this skill competes with another but should win
36
55
 
37
- For each, answer: would the current description cause Claude to select this skill?
56
+ For each: would the current description select this skill?
57
+ If you aren't sure of user's intent, present options to the user via askuserquestion for trigger phases.
38
58
 
39
- Also check 5 near-miss phrasings — adjacent domains where this skill should NOT trigger. Verify the description doesn't cause false activation.
59
+ Also check 5 near-miss phrasings — adjacent domains that must not activate. Adjust Triggers tokens only as needed for boundary.
40
60
 
41
- ### Fix issues
61
+ ### Fix
42
62
 
43
- If the description fails any check, revise it. Show before/after with the specific change and why it improves discovery.
63
+ If any check fails, rewrite. Show before/after. The after form must match `description-field.md` good examples.
44
64
 
45
- **Output:** Verified description (and revised version if changes were made).
65
+ **Output:** Final description string (trigger catalog).
46
66
 
47
67
  ---
48
68
 
49
- ## Step 2: Progressive Disclosure Audit
50
-
51
- **Goal:** Verify the file structure follows all progressive disclosure rules.
52
-
53
- > "Keep SKILL.md body under 500 lines."
69
+ ## Step 2: Progressive disclosure and modularity audit
54
70
 
55
- Check:
71
+ **Goal:** Verify within-skill structure and cross-skill modularity.
56
72
 
57
- - [ ] SKILL.md body under 500 lines.
58
- - [ ] All reference files link directly from SKILL.md (one level deep).
59
- - [ ] Every file over 100 lines has a table of contents.
60
- - [ ] File index in SKILL.md lists every companion file with its purpose.
61
- - [ ] Forward slashes only in all paths.
62
- - [ ] File names are descriptive (`form_validation_rules.md`, not `doc2.md`).
63
- - [ ] Scripts clearly marked as execute vs read-as-reference.
73
+ 1. Apply hard rules in `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md`.
74
+ 2. Apply modularity rules in `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`.
75
+ 3. Cross-check matching items on `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
64
76
 
65
- ### Fix structural issues
77
+ ### Common fixes
66
78
 
67
- If any check fails, restructure. Common fixes:
68
- - SKILL.md too long move sections to companion files, leave links.
69
- - Nested referencessurface all links to SKILL.md.
70
- - Missing TOCadd to files over 100 lines.
79
+ - SKILL.md too long → move sections to companion files, leave links
80
+ - Nested referencessurface all links on SKILL.md
81
+ - Missing TOCadd to files over 100 lines
82
+ - Multi-capability packagesplit or orchestrator + named sub-skills
83
+ - Silent reimplementation → invoke peer skill by name; add Sub-skills table
71
84
 
72
- **Output:** Verified file structure (and restructured files if changes were made).
85
+ **Output:** Verified structure and composition (and edits if needed).
73
86
 
74
87
  ---
75
88
 
76
- ## Step 3: Gotcha Freshness
89
+ ## Step 3: Gotcha freshness
77
90
 
78
91
  **Goal:** Ensure gotchas reflect current observations.
79
92
 
@@ -83,20 +96,22 @@ If any check fails, restructure. Common fixes:
83
96
  - Check against recent usage: are there new failure modes not yet captured?
84
97
  - Remove gotchas for issues that no longer occur (the skill fixed them).
85
98
  - Verify each gotcha is actionable — a reader should know what to avoid and why.
99
+ - Verify they are relevant by going over them 1 by 1 with the user via AskUserQuestion.
86
100
 
87
101
  **Output:** Updated gotchas section (and any new gotchas for skill-builder itself).
88
102
 
89
103
  ---
90
104
 
91
- ## Step 4: Full Self-Audit
105
+ ## Step 4: Full self-audit
92
106
 
93
- **Goal:** Complete 38-point checklist pass.
107
+ **Goal:** Complete checklist pass including description and modularity items.
94
108
 
95
109
  Same as new-skill Step 5 and improve-skill Step 5:
96
110
 
97
111
  1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
98
112
  2. Check every item. Fix failures. Re-check.
99
113
  3. All items must be PASS or N/A.
114
+ 4. Description items and modularity items are never N/A for a delivered skill (sub-skills table alone may be N/A for pure leaf skills).
100
115
 
101
116
  **Output:** Completed checklist.
102
117
 
@@ -108,9 +123,10 @@ Same as new-skill Step 5 and improve-skill Step 5:
108
123
 
109
124
  Present to the user:
110
125
 
111
- 1. **Description** — final version, confirmed trigger phrases.
112
- 2. **File structure** — folder map with line counts.
113
- 3. **Gotchas** — current gotcha count and most recent additions.
114
- 4. **Audit summary** — "All 38 items: N passed, M N/A."
115
- 5. **Before/after** — description changes if any, structural changes if any.
116
- 6. **Maintenance notes** — what to watch for, when to re-audit.
126
+ 1. **Description** — final trigger-catalog string (paste it).
127
+ 2. **Composition** — sub-skills or leaf status.
128
+ 3. **File structure** — folder map with line counts.
129
+ 4. **Gotchas** — current gotcha count and most recent additions.
130
+ 5. **Audit summary** — "All checklist items: N passed, M N/A."
131
+ 6. **Before/after** — description rewrite and structural changes if any.
132
+ 7. **Maintenance notes** — what to watch for, when to re-audit.
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  name: usage-pause
3
- description: >-
4
- Waits out the account's 5-hour usage window in ScheduleWakeup stages that keep
5
- every agent context warm. Accepts a manual override like '/usage-pause
6
- 10:20pm' or '/usage-pause 74m'. Triggers: '/usage-pause', 'pause until the
7
- usage window resets', 'wait out the usage limit', 'usage limit pause'.
3
+ description: 5-hour usage window, agent context warm, weekly limit is near its cap. Triggers: '/usage-pause', 'pause until the usage window resets', 'wait out the usage limit', 'usage limit pause', 'usage limit', 'pause usage', 'usage pause'.
8
4
  argument-hint: "[reset time like 10:20pm | duration like 74m]"
9
5
  ---
10
6
 
@@ -37,27 +33,27 @@ On exit 0 the script prints one JSON object:
37
33
  | `session_utilization` | Percent of the 5-hour window spent (null on override) |
38
34
  | `weekly_utilization` | Percent of the weekly window spent (null on override) |
39
35
  | `weekly_resets_at` | When the weekly window resets (null on override) |
40
- | `weekly_near_cap` | True when the weekly meter is at or past 90 percent |
36
+ | `weekly_near_cap` | True when the weekly meter is at or past the warn threshold |
41
37
 
42
38
  On exit 2 the script prints `{"error": ...}`. Ask the user for a manual reset time via AskUserQuestion (offer clock-time and duration examples), then rerun with `--override`.
43
39
 
44
40
  ### Probe mechanism
45
41
 
46
- The resolver gets a bearer token from one of two sources and sends `GET https://api.anthropic.com/api/oauth/usage` with `Authorization: Bearer <token>` and `anthropic-beta: oauth-2025-04-20`. This is the same endpoint the interactive `/usage` panel reads. The response carries a `five_hour` bucket and a `seven_day` bucket, each with `utilization` (percent spent) and `resets_at`.
42
+ `scripts/resolve_usage_window.py` is the source of truth for live probe behavior. Endpoint URL, header names/values, credential path and token keys, response bucket keys, stage sizing, and the weekly warn threshold all live in `scripts/usage_pause_constants/resolve_usage_window_constants.py` read those modules for the current values; do not restate them here.
47
43
 
48
- Token sources, in order:
44
+ In short: the resolver picks a bearer token, probes the OAuth usage endpoint the interactive `/usage` panel uses, and returns the session and weekly buckets with utilization and reset times. Token sources, in order:
49
45
 
50
- - The Claude Code CLI's OAuth access token in `~/.claude/.credentials.json` (`claudeAiOauth.accessToken`, honored only while its `expiresAt` sits in the future).
51
- - The session ingress token in the file named by the `CLAUDE_SESSION_INGRESS_TOKEN_FILE` environment variable, read when the credential file token is unavailable. Claude Code cloud sessions set this variable and omit the credential file.
46
+ 1. The Claude Code CLI's stored OAuth access token (honored only while unexpired).
47
+ 2. The session ingress bearer token file named by `CLAUDE_SESSION_INGRESS_TOKEN_FILE` (cloud sessions).
52
48
 
53
- Fallbacks, in order: no usable token from either source, a failed request, or a response with no readable `five_hour` reset time all end in exit 2 — the manual-override ask above. The manual path works with no probe at all, so the skill functions even when both token sources are stale.
49
+ Fallbacks, in order: both token sources unavailable (expired/unreadable credential and no ingress file), a failed request, or a response with no readable session-window reset time all end in exit 2 — the manual-override ask above. The manual path works with no probe at all, so the skill functions even when both token sources are unavailable.
54
50
 
55
51
  Why this probe and not the others:
56
52
 
57
53
  - The interactive `/usage` panel shows the same data but has no scriptable output.
58
54
  - `claude -p --output-format json` spends usage to answer and its metadata reports per-call token counts, not the account window clock.
59
55
  - `anthropic-ratelimit-*` response headers cover API-key Messages traffic, not the subscription session window, and reading them also costs a request.
60
- - Refreshing the OAuth token from a script is out of scope: token rotation would desync the refresh token the CLI has on disk and log the CLI out. The resolver only ever reads its token sources.
56
+ - Refreshing the OAuth token from a script is out of scope: token rotation would desync the refresh token the CLI has on disk and log the CLI out. The resolver only ever reads tokens (credential file or session ingress file).
61
57
 
62
58
  ## Weekly limit guard
63
59
 
@@ -70,7 +66,7 @@ Before the first sleep:
70
66
  1. List active recurring loops (CronList). Record each one's schedule and prompt, then cancel it (CronDelete). Carry the recorded list inside the wakeup prompts so the state survives every stage.
71
67
  2. Schedule the first stage with ScheduleWakeup, using the first duration in `stages_seconds` and the stage prompt template below.
72
68
 
73
- The stage plan keeps every stage at or under 58 minutes (3480 seconds, inside the 3600-second clamp) and ends with a roughly 2-minute tail stage so the final firing lands just past the reset. A leftover too short to stand alone folds into the tail.
69
+ The stage plan (`stages_seconds` from the resolver) keeps every stage under the maximum stage length and ends with a short tail so the final firing lands just past the reset. Stage sizing constants live in `scripts/usage_pause_constants/resolve_usage_window_constants.py`; a leftover too short to stand alone folds into the tail.
74
70
 
75
71
  Every wakeup does exactly three things — ping, record, schedule — and dispatches no new work. The cache rationale: an unpinged idle agent left past the cache window resumes cold and re-reads its whole transcript, so pings run tighter than the cache lifetime and keep each agent's next real invocation cheap.
76
72
 
@@ -110,7 +106,7 @@ Fill each `<slot>` at schedule time: `<remaining_stage_durations>` is the tail o
110
106
  | `SKILL.md` | This flow: resolve, weekly guard, stage chain, templates |
111
107
  | `scripts/resolve_usage_window.py` | The window resolver and stage planner CLI |
112
108
  | `scripts/test_resolve_usage_window.py` | Behavioral tests for parsing, staging, token reading, extraction, CLI |
113
- | `scripts/usage_pause_constants/resolve_usage_window_constants.py` | Endpoint, credential keys, the session ingress token env var, stage sizing, thresholds, result keys |
109
+ | `scripts/usage_pause_constants/resolve_usage_window_constants.py` | Endpoint, credential keys, stage sizing, thresholds, result keys |
114
110
 
115
111
  ## Gotchas
116
112
 
@@ -1,26 +0,0 @@
1
- # bdd-protocol
2
-
3
- **Trigger:** `/bdd-protocol`, "Example Mapping", "BDD anti-patterns", "§7.6", writing executable specifications, BDD scenario quality, "the one where" discovery examples.
4
-
5
- On-demand BDD depth layered on top of the always-on `<behavior_protocol>` in the system prompt. The skill adds the Example Mapping algorithm (Smart & Molak §6.4), the scenario quality catalog (§7.6), outside-in test layout, and solo BDD patterns.
6
-
7
- ## Subdirectories
8
-
9
- | Directory | Role |
10
- |---|---|
11
- | `references/` | Loaded reference docs: Example Mapping algorithm and the anti-patterns catalog. |
12
-
13
- ## Key files
14
-
15
- | File | Role |
16
- |---|---|
17
- | `SKILL.md` | Entry point. `@`-imports both reference files so they load with the skill. Lists authorities and scope boundaries. |
18
- | `references/example-mapping.md` | Example Mapping algorithm: core moves ("The one where …"), the chat algorithm for solo use, time-boxing guidance. Source: Smart & Molak §6.4. |
19
- | `references/anti-patterns.md` | §7.6 scenario quality catalog: anti-patterns to avoid and the criteria for a good scenario. |
20
-
21
- ## What the skill adds
22
-
23
- The base `<behavior_protocol>` (Deliberate Discovery → Illustrate → Formulate → Automate) is always active. This skill adds depth only when:
24
- - The task needs Example Mapping steps or parking-lot question management.
25
- - Scenarios need the §7.6 quality bar applied.
26
- - Tests need outside-in layout using describe / when / should.