claude-dev-env 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CLAUDE.md +1 -1
  2. package/hooks/blocking/CLAUDE.md +1 -0
  3. package/hooks/blocking/code_rules_shared.py +126 -47
  4. package/hooks/blocking/config/CLAUDE.md +2 -0
  5. package/hooks/blocking/config/verified_commit_context_constants.py +21 -0
  6. package/hooks/blocking/config/verified_commit_gate_output_constants.py +14 -0
  7. package/hooks/blocking/conftest.py +36 -30
  8. package/hooks/blocking/convergence_gate_blocker.py +76 -8
  9. package/hooks/blocking/plain_language_blocker.py +8 -0
  10. package/hooks/blocking/state_description_blocker.py +4 -1
  11. package/hooks/blocking/test_code_rules_shared.py +120 -20
  12. package/hooks/blocking/test_convergence_gate_blocker.py +146 -0
  13. package/hooks/blocking/test_plain_language_blocker.py +15 -0
  14. package/hooks/blocking/test_state_description_blocker.py +15 -0
  15. package/hooks/blocking/test_verified_commit_config_bootstrap.py +18 -0
  16. package/hooks/blocking/test_verified_commit_gate_additional_context.py +134 -0
  17. package/hooks/blocking/tests/test_verified_commit_gate.py +41 -0
  18. package/hooks/blocking/verified_commit_config_bootstrap.py +22 -10
  19. package/hooks/blocking/verified_commit_gate.py +113 -568
  20. package/hooks/blocking/verified_commit_gate_parts/CLAUDE.md +28 -0
  21. package/hooks/blocking/verified_commit_gate_parts/__init__.py +1 -0
  22. package/hooks/blocking/verified_commit_gate_parts/command_tokenization.py +174 -0
  23. package/hooks/blocking/verified_commit_gate_parts/deny_payload.py +53 -0
  24. package/hooks/blocking/verified_commit_gate_parts/deny_reason.py +80 -0
  25. package/hooks/blocking/verified_commit_gate_parts/directory_resolution.py +170 -0
  26. package/hooks/blocking/verified_commit_gate_parts/gated_invocations.py +205 -0
  27. package/hooks/blocking/verified_commit_gate_parts/tests/conftest.py +10 -0
  28. package/hooks/blocking/verified_commit_gate_parts/tests/test_command_tokenization.py +94 -0
  29. package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_payload.py +17 -0
  30. package/hooks/blocking/verified_commit_gate_parts/tests/test_deny_reason.py +38 -0
  31. package/hooks/blocking/verified_commit_gate_parts/tests/test_directory_resolution.py +71 -0
  32. package/hooks/blocking/verified_commit_gate_parts/tests/test_gated_invocations.py +61 -0
  33. package/hooks/hooks_constants/CLAUDE.md +4 -1
  34. package/hooks/hooks_constants/code_rules_path_utils_constants.py +1 -0
  35. package/hooks/hooks_constants/convergence_gate_blocker_constants.py +36 -0
  36. package/hooks/hooks_constants/harness_scratchpad_constants.py +10 -9
  37. package/hooks/hooks_constants/mypy_integration_constants.py +16 -0
  38. package/hooks/validators/mypy_integration.py +145 -24
  39. package/hooks/validators/python_antipattern_checks.py +16 -0
  40. package/hooks/validators/run_all_validators.py +9 -3
  41. package/hooks/validators/test_mypy_integration.py +154 -0
  42. package/hooks/validators/test_python_antipattern_checks.py +112 -1
  43. package/hooks/validators/test_run_all_validators_pretooluse.py +16 -0
  44. package/package.json +1 -1
  45. package/rules/CLAUDE.md +1 -0
  46. package/rules/verified-commit-gate-skip.md +28 -0
  47. package/skills/auditing-claude-config/CLAUDE.md +2 -1
  48. package/skills/auditing-claude-config/SKILL.md +114 -176
  49. package/skills/auditing-claude-config/reference/probe-hook.md +74 -0
  50. package/skills/autoconverge/CLAUDE.md +1 -0
  51. package/skills/autoconverge/SKILL.md +310 -346
  52. package/skills/autoconverge/reference/CLAUDE.md +1 -0
  53. package/skills/autoconverge/reference/copilot-findings.md +51 -0
  54. package/skills/closeout/SKILL.md +7 -9
  55. package/skills/copilot-finding-triage/SKILL.md +5 -7
  56. package/skills/copilot-review/CLAUDE.md +3 -2
  57. package/skills/copilot-review/SKILL.md +119 -155
  58. package/skills/copilot-review/templates/subagent-prompt.md +49 -0
  59. package/skills/fresh-branch/CLAUDE.md +6 -9
  60. package/skills/fresh-branch/SKILL.md +84 -33
  61. package/skills/fresh-branch/scripts/create_fresh_branch.py +445 -0
  62. package/skills/fresh-branch/scripts/fresh_branch_scripts_constants/__init__.py +1 -0
  63. package/skills/fresh-branch/scripts/fresh_branch_scripts_constants/fresh_branch_cli_constants.py +74 -0
  64. package/skills/fresh-branch/scripts/test_create_fresh_branch.py +670 -0
  65. package/skills/pr-converge/SKILL.md +277 -422
  66. package/skills/pr-converge/reference/CLAUDE.md +1 -0
  67. package/skills/pr-converge/reference/progress-checklist.md +168 -0
  68. package/skills/pr-converge/test_step5_host_branch.py +8 -6
  69. package/skills/pr-loop-cloud-transport/SKILL.md +1 -1
  70. package/skills/privacy-hygiene/SKILL.md +68 -115
  71. package/skills/privacy-hygiene/reference/sweep-procedure.md +62 -0
  72. package/skills/session-log/CLAUDE.md +2 -1
  73. package/skills/session-log/SKILL.md +4 -26
  74. package/skills/session-log/templates/frontmatter.md +40 -0
  75. package/skills/skill-builder/CLAUDE.md +8 -7
  76. package/skills/skill-builder/SKILL.md +26 -11
  77. package/skills/skill-builder/references/CLAUDE.md +3 -1
  78. package/skills/skill-builder/references/delegation-map.md +21 -12
  79. package/skills/skill-builder/references/description-field.md +9 -11
  80. package/skills/skill-builder/references/deterministic-elements.md +218 -0
  81. package/skills/skill-builder/references/self-audit-checklist.md +62 -45
  82. package/skills/skill-builder/references/skill-modularity.md +8 -9
  83. package/skills/skill-builder/templates/CLAUDE.md +2 -2
  84. package/skills/skill-builder/templates/gap-analysis.md +15 -0
  85. package/skills/skill-builder/workflows/CLAUDE.md +5 -5
  86. package/skills/skill-builder/workflows/improve-skill.md +18 -9
  87. package/skills/skill-builder/workflows/new-skill.md +23 -15
  88. package/skills/skill-builder/workflows/polish-skill.md +28 -21
@@ -100,14 +100,13 @@ Self-audit requires this table (or equivalent) whenever the skill composes other
100
100
  - **Vague dependency** — "use other skills as needed" with no names, when, or outputs.
101
101
  - **Redundant twin** — a new skill whose description overlaps an existing one without a refusal boundary.
102
102
 
103
- ## Checklist for authors
103
+ ## Task seeds for authors
104
104
 
105
- Copy into the response during new-skill Gather and improve Diagnose:
105
+ Register each item as a session task during new-skill Gather and improve Diagnose (`TaskCreate` / `TodoWrite`). Complete with evidence. Do not track as markdown checkboxes.
106
+
107
+ - Capability fits one sentence without an unrelated "and"
108
+ - Related skills scanned; inventory written
109
+ - Reusable steps map to named skills (or justify local procedure)
110
+ - Multi-capability work is split or is an orchestrator with sub-skills
111
+ - SKILL.md will name each sub-skill with when + produces + missing behavior
106
112
 
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
- ```
@@ -6,9 +6,9 @@ Reusable templates for skill-building artifacts.
6
6
 
7
7
  | File | Purpose |
8
8
  |---|---|
9
- | `gap-analysis.md` | Template for gaps, composition plan, and description triggers. Used in new-skill Gather and improve diagnosis. |
9
+ | `gap-analysis.md` | Template for gaps, composition plan, description triggers, and deterministic-elements inventory. Used in new-skill Gather and improve diagnosis. |
10
10
 
11
11
  ## Conventions
12
12
 
13
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.
14
+ - Composition plan, Description triggers, and Deterministic Elements Inventory sections are required before Write on a new skill.
@@ -36,6 +36,21 @@ description: >-
36
36
  <stem>. Triggers: <phrases>.
37
37
  ```
38
38
 
39
+ ## Deterministic Elements Inventory
40
+
41
+ See `references/deterministic-elements.md`. Required before Write.
42
+
43
+ | Step | Class (`deterministic` / `judgment` / `borderline`) | Home path | Evidence (one line) | Paired test (if code) |
44
+ |---|---|---|---|---|
45
+ | [step name] | [class] | [`scripts/…` / `workflow/…` / `templates/…` / `reference/…` / `SKILL.md`] | [why this class] | [`test_…` / N/A + reason] |
46
+
47
+ Rules:
48
+
49
+ - Every `deterministic` row has a real path under `scripts/`, `workflow/`, `templates/`, `reference/`, or `task-seed:…` — not prose-only.
50
+ - Every code path has a paired test path (or a one-line pure-data reason).
51
+ - Every required multi-step work list uses `task-seed:…` plus a body seed instruction (no markdown `- [ ]` board).
52
+ - A `borderline` row kept in prose has a one-line why it stays in the body.
53
+
39
54
  ## Gaps Identified
40
55
 
41
56
  ### Gap 1: [Descriptive Name]
@@ -6,14 +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: 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. |
9
+ | `new-skill.md` | Full lifecycle: classify, scaffold, gather (composition + description triggers + deterministic inventory), write via skill-writer, self-audit, deliver. |
10
+ | `improve-skill.md` | Observation-first improve: diagnose activation/modularity/quality/deterministic prose, targeted fix, re-audit. |
11
+ | `polish-skill.md` | Description trigger-catalog audit; progressive disclosure + modularity + deterministic audit; task-seeded self-audit. |
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
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
+ - New and improve load `skill-modularity.md`, `description-field.md`, and `deterministic-elements.md` when gathering or diagnosing.
18
+ - Polish Step 1 is the dedicated description rewrite pass; Step 2 covers structure, modularity, and deterministic placement.
19
19
  - Load only the workflow that matches the active task; the other two stay out of context.
@@ -52,10 +52,16 @@ Failure classification:
52
52
  | Claude over-explains basics | Skill states what Claude already knows | Principles: Concision |
53
53
  | Claude follows instructions too rigidly | Skill railroads instead of guiding | Principles: Degree of freedom |
54
54
  | Claude makes same mistake repeatedly | Missing gotcha | Principles: Gotchas |
55
- | Claude errors on script execution | Script doesn’t handle errors, missing deps | Principles: Scripts |
55
+ | Claude errors on script execution | Script doesn’t handle errors, missing deps | Principles: Scripts + `deterministic-elements.md` CODE_RULES bar |
56
56
  | Output format is wrong | Missing template or examples | Principles: Templates and examples |
57
+ | Mechanical sequence only in markdown | Deterministic work left as prose | `deterministic-elements.md` — extract to scripts/workflow |
58
+ | Detection/validation is a giant one-liner in body | Executable logic not in `scripts/` | `deterministic-elements.md` |
59
+ | Fenced Python/JS in SKILL.md is the real implementation | Code not shipped as a file | Extract to `scripts/` or `workflow/` + paired test |
60
+ | Script has magic literals / no tests | CODE_RULES bar missed | `deterministic-elements.md` + CODE_RULES |
61
+ | Skill uses `- [ ]` for agent progress | Work list not on task tool | Task-seed catalog + seed instruction (`deterministic-elements.md`) |
62
+ | "Copy checklist into response" protocol | Markdown as tracker | Switch to TaskCreate / TodoWrite seeding |
57
63
 
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`.
64
+ When scope, activation, or deterministic placement is in play, re-read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`, `${CLAUDE_SKILL_DIR}/references/description-field.md`, and `${CLAUDE_SKILL_DIR}/references/deterministic-elements.md`.
59
65
 
60
66
  **Output:** Diagnosis per failure — which best practice was violated.
61
67
 
@@ -69,11 +75,13 @@ When scope or activation is in play, re-read `${CLAUDE_SKILL_DIR}/references/ski
69
75
 
70
76
  For each diagnosis from Step 2:
71
77
 
72
- 1. Read the matching reference (`description-field.md`, `skill-modularity.md`, `progressive-disclosure.md`, or SKILL.md principles).
78
+ 1. Read the matching reference (`description-field.md`, `skill-modularity.md`, `deterministic-elements.md`, `progressive-disclosure.md`, or SKILL.md principles).
73
79
  2. Make the minimum change that addresses the failure.
74
80
  3. For description failures: rewrite frontmatter into a trigger catalog (capability stem + Triggers list); strip story prose.
75
81
  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.
82
+ 5. For deterministic failures: extract mechanical work to `scripts/` / `workflow/` / `templates/` / `reference/`; body only points and handles exit codes; apply CODE_RULES + paired tests to new code.
83
+ 6. For checkbox/tracker failures: replace markdown `- [ ]` boards with a plain task-seed list and a seed instruction (`TaskCreate` / `TodoWrite`).
84
+ 7. Verify the fix doesn’t break anything that was working.
77
85
 
78
86
  Delegate larger rewrites to `/skill-writer` using the refine-skill handoff from delegation-map.md.
79
87
 
@@ -104,10 +112,10 @@ For each failure observed in Step 1:
104
112
  Same process as new-skill Step 5:
105
113
 
106
114
  1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
107
- 2. Check every item. Fix failures. Re-check.
115
+ 2. Register every bullet as a session task; complete with evidence. Fix failures. Re-complete those tasks.
108
116
  3. Pay special attention to items that overlap with the diagnosis from Step 2 — those were the failures; confirm they’re now fixed.
109
117
 
110
- **Output:** Completed checklist, all PASS or N/A.
118
+ **Output:** Audit summary; all PASS or N/A.
111
119
 
112
120
  ---
113
121
 
@@ -122,6 +130,7 @@ Present to the user:
122
130
  3. **What changed** — delta summary (files modified, lines added/removed).
123
131
  4. **Description** — final frontmatter if rewritten (paste the trigger catalog).
124
132
  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.
133
+ 6. **Deterministic extracts** — scripts/workflows/templates added or moved out of prose.
134
+ 7. **New gotchas added** — list of gotchas captured.
135
+ 8. **Audit summary** — post-fix audit results.
136
+ 9. **Suggested re-test** — a concrete task to verify the fix with Claude B.
@@ -56,7 +56,7 @@ Best-practice-driven lifecycle for building a skill from scratch.
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.
59
+ Read `${CLAUDE_SKILL_DIR}/references/skill-modularity.md`, `${CLAUDE_SKILL_DIR}/references/description-field.md`, and `${CLAUDE_SKILL_DIR}/references/deterministic-elements.md` before the interview. Modularity, description triggers, and deterministic inventory are gates: do not proceed to Write until the composition plan, trigger catalog draft, and deterministic-elements inventory are filled.
60
60
 
61
61
  ### Interview questions
62
62
 
@@ -74,6 +74,7 @@ Ask the user:
74
74
  10. "Which existing skills already cover a step of this work? Which steps should this skill invoke by name?"
75
75
  11. "Is this one skill, several skills, or a thin orchestrator that calls sub-skills?"
76
76
  12. "What exact phrases, slash commands, or file types should select this skill?"
77
+ 13. "Which steps of this work are fixed procedures (same inputs → same outputs, machine-checkable) versus open judgment?"
77
78
 
78
79
  ### Related-skills inventory
79
80
 
@@ -90,6 +91,7 @@ Use the template at `${CLAUDE_SKILL_DIR}/templates/gap-analysis.md`. Fill in:
90
91
  - Initial gotcha candidates
91
92
  - **Composition plan** — capability sentence, related skills, sub-skills to invoke, split or orchestrator decision, missing sub-skills to create
92
93
  - **Description triggers** — capability stem tokens + trigger phrase list (not story prose)
94
+ - **Deterministic elements inventory** — each process step classified; home path; paired test for code
93
95
 
94
96
  ### Assess degree of freedom
95
97
 
@@ -105,13 +107,17 @@ Record the assessment with reasoning.
105
107
 
106
108
  ### Modularity gate
107
109
 
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.
110
+ Register each task seed from `skill-modularity.md` on the session task list (`TaskCreate` / `TodoWrite`). Complete with evidence. If the capability sentence needs an unrelated "and", stop and split scope with the user before Step 4.
109
111
 
110
112
  ### Description gate
111
113
 
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.
114
+ Draft the frontmatter description using the template in `description-field.md`. Register each description task seed and complete with evidence. Story prose fails the gate.
113
115
 
114
- **Output:** Completed gap analysis (composition plan + description triggers), initial gotchas, degree-of-freedom assessment, modularity checklist, draft description.
116
+ ### Deterministic-elements gate
117
+
118
+ Register each task seed under **Required task seeds** in `deterministic-elements.md`. Complete with evidence. Every deterministic step must have a planned `scripts/`, `workflow/`, `templates/`, `reference/`, or task-seed path. Prose-only mechanical sequences and markdown checkbox boards fail the gate.
119
+
120
+ **Output:** Completed gap analysis (composition plan + description triggers + deterministic inventory), initial gotchas, degree-of-freedom assessment, modularity gate done, draft description.
115
121
 
116
122
  ---
117
123
 
@@ -121,7 +127,7 @@ Draft the frontmatter description using the template in `description-field.md`.
121
127
 
122
128
  Delegate to `/skill-writer` using the structured handoff from `${CLAUDE_SKILL_DIR}/references/delegation-map.md`.
123
129
 
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.
130
+ The handoff must include: skill type, folder structure, gap analysis (composition plan + description triggers + deterministic inventory), initial gotchas, degree of freedom, constraints, sub-skills to name in SKILL.md, exact description string to put in frontmatter, script/test paths for every deterministic step.
125
131
 
126
132
  After skill-writer produces the draft:
127
133
 
@@ -131,8 +137,9 @@ After skill-writer produces the draft:
131
137
  4. Verify files over 100 lines have a TOC.
132
138
  5. Verify modularity: single capability, sub-skills table when composing, no silent reimplementation of inventoried skills.
133
139
  6. Verify description is a trigger catalog per `description-field.md` (not story prose).
140
+ 7. Verify deterministic inventory: every deterministic step has a real code/artifact/task-seed path; no prose-only mechanical sequences; no markdown checkbox boards for required work; scripts follow CODE_RULES and have paired tests.
134
141
 
135
- Fix structural, modularity, and description issues before proceeding.
142
+ Fix structural, modularity, description, and deterministic-element issues before proceeding.
136
143
 
137
144
  **Output:** Complete skill package at the target directory.
138
145
 
@@ -143,14 +150,14 @@ Fix structural, modularity, and description issues before proceeding.
143
150
  **Goal:** Verify every best practice is satisfied before delivery.
144
151
 
145
152
  1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
146
- 2. Copy the checklist into your response.
147
- 3. Check every item against the built skill. For each: PASS, FAIL with file:line evidence, or N/A with reason.
148
- 4. Every FAIL must be fixed before proceeding. Apply fixes, then re-check that item.
149
- 5. When all items are PASS or N/A, proceed to Step 6.
153
+ 2. Register **every** bullet as a session task (`TaskCreate` / `TodoWrite`).
154
+ 3. Complete each task against the built skill: PASS, FAIL with file:line evidence, or N/A with reason.
155
+ 4. Every FAIL must be fixed before proceeding. Apply fixes, then re-open/complete that task.
156
+ 5. When all tasks are PASS or N/A, proceed to Step 6.
150
157
 
151
158
  For an independent check, spawn a subagent to run the audit (see delegation-map.md).
152
159
 
153
- **Output:** Completed checklist with all items PASS or N/A.
160
+ **Output:** Audit summary (PASS / N/A / FAIL-fixed counts). All items PASS or N/A.
154
161
 
155
162
  ---
156
163
 
@@ -165,7 +172,8 @@ Present to the user:
165
172
  3. **Degree of freedom** — assessment and reasoning.
166
173
  4. **Composition plan** — capability sentence, sub-skills invoked, any skills split out.
167
174
  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.
175
+ 6. **Deterministic inventory** — steps classified; script/template/reference paths; tests for code.
176
+ 7. **Gotchas seeded** — initial gotchas captured.
177
+ 8. **Audit summary** — "All checklist items: N passed, M N/A."
178
+ 9. **Maintenance notes** — what to watch for in future usage that might warrant iteration.
179
+ 10. **Suggested first test** — a concrete task to try with Claude B.
@@ -35,15 +35,17 @@ description: >-
35
35
  <capability tokens>. Triggers: <phrase>, <phrase>, <slash>, <filetype>.
36
36
  ```
37
37
 
38
- ### Checklist
38
+ ### Description task seeds
39
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
40
+ Register each as a session task; complete with evidence (no markdown checkboxes):
41
+
42
+ - **Third person** — no I/you
43
+ - **Capability stem** what tokens, ≤20 words, no story
44
+ - **Triggers list** concrete phrases / slash forms / file types
45
+ - **Under 1024 characters** (prefer much shorter; always-on context)
46
+ - **No XML tags**
47
+ - **Not a story** — no narrative, benefits, or process dump
48
+ - **Sibling boundary** — distinguishable from related skills
47
49
 
48
50
  ### Trigger phrase review
49
51
 
@@ -66,13 +68,14 @@ If any check fails, rewrite. Show before/after. The after form must match `descr
66
68
 
67
69
  ---
68
70
 
69
- ## Step 2: Progressive disclosure and modularity audit
71
+ ## Step 2: Progressive disclosure, modularity, and deterministic audit
70
72
 
71
- **Goal:** Verify within-skill structure and cross-skill modularity.
73
+ **Goal:** Verify within-skill structure, cross-skill modularity, and deterministic placement.
72
74
 
73
75
  1. Apply hard rules in `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md`.
74
76
  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`.
77
+ 3. Apply deterministic-elements rules in `${CLAUDE_SKILL_DIR}/references/deterministic-elements.md`.
78
+ 4. Cross-check matching items on `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
76
79
 
77
80
  ### Common fixes
78
81
 
@@ -81,8 +84,11 @@ If any check fails, rewrite. Show before/after. The after form must match `descr
81
84
  - Missing TOC → add to files over 100 lines
82
85
  - Multi-capability package → split or orchestrator + named sub-skills
83
86
  - Silent reimplementation → invoke peer skill by name; add Sub-skills table
87
+ - Mechanical sequence / fenced program / giant detector only in body → extract to `scripts/` or `workflow/`; point from process steps; add paired tests and `*_constants/` as needed
88
+ - Verbatim templates inline → `templates/`; long fixed tables → `reference/`
89
+ - Markdown `- [ ]` progress boards → plain task-seed list + seed instruction (`TaskCreate` / `TodoWrite`)
84
90
 
85
- **Output:** Verified structure and composition (and edits if needed).
91
+ **Output:** Verified structure, composition, and deterministic placement (and edits if needed).
86
92
 
87
93
  ---
88
94
 
@@ -104,16 +110,16 @@ If any check fails, rewrite. Show before/after. The after form must match `descr
104
110
 
105
111
  ## Step 4: Full self-audit
106
112
 
107
- **Goal:** Complete checklist pass including description and modularity items.
113
+ **Goal:** Complete checklist pass including description, modularity, and deterministic items.
108
114
 
109
115
  Same as new-skill Step 5 and improve-skill Step 5:
110
116
 
111
117
  1. Read `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`.
112
- 2. Check every item. Fix failures. Re-check.
118
+ 2. Register every bullet as a session task; complete with evidence. Fix failures. Re-complete.
113
119
  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).
120
+ 4. Description items, modularity items, and process-step classification are never N/A for a delivered skill (sub-skills table alone may be N/A for pure leaf skills; script/test rows are N/A only when the package has zero code files and every step is judgment).
115
121
 
116
- **Output:** Completed checklist.
122
+ **Output:** Audit summary; all PASS or N/A.
117
123
 
118
124
  ---
119
125
 
@@ -125,8 +131,9 @@ Present to the user:
125
131
 
126
132
  1. **Description** — final trigger-catalog string (paste it).
127
133
  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.
134
+ 3. **Deterministic inventory** — any extracts to scripts/templates/reference.
135
+ 4. **File structure** — folder map with line counts.
136
+ 5. **Gotchas** — current gotcha count and most recent additions.
137
+ 6. **Audit summary** — "All checklist items: N passed, M N/A."
138
+ 7. **Before/after** — description rewrite and structural changes if any.
139
+ 8. **Maintenance notes** — what to watch for, when to re-audit.