claude-dev-env 1.93.1 → 1.95.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 (262) hide show
  1. package/_shared/advisor/CLAUDE.md +2 -2
  2. package/_shared/advisor/advisor-protocol.md +35 -27
  3. package/_shared/advisor/scripts/config/advisor_scripts_constants/model_tier_run_validator_constants.py +3 -2
  4. package/_shared/advisor/scripts/model_tier_run_validator.py +23 -15
  5. package/_shared/advisor/scripts/tests/test_model_tier_run_validator.py +81 -17
  6. package/_shared/pr-loop/CLAUDE.md +1 -0
  7. package/_shared/pr-loop/audit-contract.md +1 -1
  8. package/_shared/pr-loop/gh-payloads.md +3 -3
  9. package/_shared/pr-loop/post-audit-thread-contract.md +51 -0
  10. package/_shared/pr-loop/scripts/README.md +2 -2
  11. package/_shared/pr-loop/scripts/fix_hookspath.py +47 -12
  12. package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +0 -69
  13. package/_shared/pr-loop/scripts/tests/test_fix_hookspath.py +497 -374
  14. package/_shared/pr-loop/state-schema.md +3 -22
  15. package/bin/CLAUDE.md +11 -2
  16. package/bin/ever-shipped-skills.mjs +70 -0
  17. package/bin/install.mjs +138 -13
  18. package/bin/install.prune.test.mjs +457 -0
  19. package/bin/install.test.mjs +10 -4
  20. package/docs/CODE_RULES.md +1 -1
  21. package/hooks/blocking/CLAUDE.md +2 -0
  22. package/hooks/blocking/code_rules_enforcer.py +4 -0
  23. package/hooks/blocking/code_rules_shared.py +82 -0
  24. package/hooks/blocking/code_rules_test_layout.py +9 -3
  25. package/hooks/blocking/pii_commit_command.py +398 -0
  26. package/hooks/blocking/pii_payload_scan.py +133 -0
  27. package/hooks/blocking/pii_prevention_blocker.py +151 -449
  28. package/hooks/blocking/plain_language_blocker.py +138 -4
  29. package/hooks/blocking/sensitive_file_protector.py +114 -48
  30. package/hooks/blocking/tdd_enforcer.py +9 -2
  31. package/hooks/blocking/test_code_rules_enforcer_scratchpad.py +105 -0
  32. package/hooks/blocking/test_code_rules_shared.py +181 -0
  33. package/hooks/blocking/test_pii_prevention_blocker.py +299 -0
  34. package/hooks/blocking/test_plain_language_blocker_allowlist.py +184 -0
  35. package/hooks/blocking/test_sensitive_file_protector.py +185 -0
  36. package/hooks/blocking/test_tdd_enforcer_scratchpad.py +105 -0
  37. package/hooks/blocking/test_verdict_directory_write_blocker.py +42 -7
  38. package/hooks/hooks_constants/CLAUDE.md +4 -2
  39. package/hooks/hooks_constants/code_rules_path_utils_constants.py +0 -2
  40. package/hooks/hooks_constants/harness_scratchpad_constants.py +17 -0
  41. package/hooks/hooks_constants/local_identity.py +65 -15
  42. package/hooks/hooks_constants/pii_prevention_constants.py +16 -0
  43. package/hooks/hooks_constants/plain_language_blocker_constants.py +5 -0
  44. package/hooks/hooks_constants/pr_description_enforcer_constants.py +1 -1
  45. package/hooks/hooks_constants/sensitive_file_protector_constants.py +42 -0
  46. package/hooks/hooks_constants/test_local_identity.py +68 -0
  47. package/hooks/pyproject.toml +75 -4
  48. package/hooks/validators/CLAUDE.md +1 -1
  49. package/hooks/validators/README.md +2 -0
  50. package/hooks/validators/python_style_checks.py +114 -136
  51. package/hooks/validators/python_style_helpers.py +95 -0
  52. package/hooks/validators/test_python_style_checks.py +0 -164
  53. package/hooks/validators/test_python_style_checks_decorator_gap.py +119 -0
  54. package/hooks/validators/test_python_style_fixes.py +251 -0
  55. package/hooks/validators/test_python_style_helpers.py +125 -0
  56. package/package.json +1 -1
  57. package/rules/CLAUDE.md +1 -0
  58. package/rules/anti-corollary-tests.md +69 -0
  59. package/rules/bdd.md +1 -3
  60. package/rules/code-reviews.md +1 -1
  61. package/rules/gh-paginate.md +1 -1
  62. package/rules/plain-language.md +2 -0
  63. package/scripts/CLAUDE.md +10 -1
  64. package/scripts/Get-SessionAccount.ps1 +210 -0
  65. package/scripts/tests/CLAUDE.md +15 -1
  66. package/scripts/tests/Get-SessionAccount.Tests.ps1 +350 -0
  67. package/skills/CLAUDE.md +6 -27
  68. package/skills/anthropic-plan/SKILL.md +1 -13
  69. package/skills/autoconverge/CLAUDE.md +5 -2
  70. package/skills/autoconverge/SKILL.md +112 -387
  71. package/skills/autoconverge/reference/CLAUDE.md +4 -1
  72. package/skills/autoconverge/reference/closing-report.md +9 -2
  73. package/skills/autoconverge/reference/convergence.md +26 -22
  74. package/skills/autoconverge/reference/headless-safety.md +44 -0
  75. package/skills/autoconverge/reference/multi-pr.md +88 -0
  76. package/skills/autoconverge/reference/self-closing-loop.md +84 -0
  77. package/skills/autoconverge/reference/stop-conditions.md +21 -13
  78. package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +87 -27
  79. package/skills/autoconverge/workflow/converge.contract.test.mjs +40 -10
  80. package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +179 -47
  81. package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
  82. package/skills/autoconverge/workflow/converge.mjs +286 -96
  83. package/skills/bugteam/CLAUDE.md +1 -1
  84. package/skills/bugteam/CONSTRAINTS.md +3 -3
  85. package/skills/bugteam/PROMPTS.md +8 -19
  86. package/skills/bugteam/SKILL.md +13 -14
  87. package/skills/bugteam/reference/CLAUDE.md +1 -1
  88. package/skills/bugteam/reference/README.md +2 -3
  89. package/skills/bugteam/reference/audit-and-teammates.md +2 -2
  90. package/skills/bugteam/reference/copilot-gap-analysis.md +2 -0
  91. package/skills/bugteam/reference/github-pr-reviews.md +56 -38
  92. package/skills/bugteam/reference/team-setup.md +11 -11
  93. package/skills/bugteam/scripts/CLAUDE.md +6 -6
  94. package/skills/bugteam/scripts/README.md +20 -8
  95. package/skills/bugteam/scripts/bugteam_code_rules_gate.py +13 -1463
  96. package/skills/bugteam/scripts/bugteam_fix_hookspath.py +23 -358
  97. package/skills/bugteam/scripts/bugteam_preflight.py +13 -315
  98. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +2 -3
  99. package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +34 -1053
  100. package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +30 -347
  101. package/skills/bugteam/scripts/test_bugteam_preflight.py +30 -305
  102. package/skills/closeout/SKILL.md +153 -0
  103. package/skills/closeout/reference/handoff-prompt-template.md +72 -0
  104. package/skills/closeout/reference/issue-body-templates.md +108 -0
  105. package/skills/closeout/reference/pii-redaction-checklist.md +36 -0
  106. package/skills/copilot-finding-triage/SKILL.md +80 -28
  107. package/skills/copilot-finding-triage/reference/tier-rubric.md +70 -11
  108. package/skills/copilot-finding-triage/templates/notification.md +8 -3
  109. package/skills/everything-search/SKILL.md +1 -2
  110. package/skills/grokify/SKILL.md +58 -0
  111. package/skills/grokify/templates/handoff-template.md +92 -0
  112. package/skills/orchestrator/SKILL.md +35 -25
  113. package/skills/orchestrator-refresh/SKILL.md +15 -11
  114. package/skills/pr-converge/CLAUDE.md +1 -1
  115. package/skills/pr-converge/SKILL.md +132 -233
  116. package/skills/pr-converge/reference/convergence-gates.md +102 -66
  117. package/skills/pr-converge/reference/examples.md +37 -25
  118. package/skills/pr-converge/reference/fix-protocol.md +7 -7
  119. package/skills/pr-converge/reference/multi-pr-orchestration.md +10 -4
  120. package/skills/pr-converge/reference/per-tick.md +64 -41
  121. package/skills/pr-converge/reference/state-schema.md +27 -2
  122. package/skills/pr-converge/scripts/CLAUDE.md +8 -0
  123. package/skills/pr-converge/scripts/README.md +4 -3
  124. package/skills/pr-converge/scripts/_pr_converge_path_setup.py +23 -0
  125. package/skills/pr-converge/scripts/check_convergence.py +189 -645
  126. package/skills/pr-converge/scripts/check_convergence_gates.py +235 -0
  127. package/skills/pr-converge/scripts/check_convergence_thread_gates.py +219 -0
  128. package/skills/pr-converge/scripts/conftest.py +8 -0
  129. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -0
  130. package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -0
  131. package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +26 -0
  132. package/skills/pr-converge/scripts/test_check_convergence.py +73 -228
  133. package/skills/pr-converge/scripts/test_check_convergence_contract.py +321 -0
  134. package/skills/pr-converge/scripts/test_check_convergence_gates.py +68 -0
  135. package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +75 -0
  136. package/skills/pr-fix-protocol/SKILL.md +20 -20
  137. package/skills/privacy-hygiene/SKILL.md +4 -3
  138. package/skills/reviewer-gates/SKILL.md +26 -8
  139. package/skills/session-log/SKILL.md +11 -12
  140. package/skills/session-tidy/SKILL.md +40 -30
  141. package/skills/skill-builder/CLAUDE.md +13 -10
  142. package/skills/skill-builder/SKILL.md +31 -31
  143. package/skills/skill-builder/references/CLAUDE.md +10 -6
  144. package/skills/skill-builder/references/delegation-map.md +13 -4
  145. package/skills/skill-builder/references/description-field.md +113 -0
  146. package/skills/skill-builder/references/self-audit-checklist.md +21 -4
  147. package/skills/skill-builder/references/skill-modularity.md +113 -0
  148. package/skills/skill-builder/references/skill-types.md +4 -0
  149. package/skills/skill-builder/templates/CLAUDE.md +4 -4
  150. package/skills/skill-builder/templates/gap-analysis.md +25 -1
  151. package/skills/skill-builder/workflows/CLAUDE.md +6 -4
  152. package/skills/skill-builder/workflows/improve-skill.md +17 -16
  153. package/skills/skill-builder/workflows/new-skill.md +34 -10
  154. package/skills/skill-builder/workflows/polish-skill.md +59 -43
  155. package/skills/team-advisor/SKILL.md +15 -11
  156. package/skills/usage-pause/SKILL.md +10 -14
  157. package/system-prompts/software-engineer.xml +7 -6
  158. package/hooks/validators/test_verify_paths.py +0 -32
  159. package/hooks/validators/verify_paths.py +0 -57
  160. package/skills/bdd-protocol/CLAUDE.md +0 -26
  161. package/skills/bdd-protocol/SKILL.md +0 -30
  162. package/skills/bdd-protocol/references/CLAUDE.md +0 -10
  163. package/skills/bdd-protocol/references/anti-patterns.md +0 -26
  164. package/skills/bdd-protocol/references/example-mapping.md +0 -23
  165. package/skills/bg-agent/CLAUDE.md +0 -17
  166. package/skills/bg-agent/SKILL.md +0 -69
  167. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py +0 -55
  168. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_fix_hookspath_constants.py +0 -26
  169. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_preflight_constants.py +0 -35
  170. package/skills/caveman/CLAUDE.md +0 -15
  171. package/skills/caveman/SKILL.md +0 -38
  172. package/skills/code/CLAUDE.md +0 -17
  173. package/skills/code/SKILL.md +0 -178
  174. package/skills/deep-research/CLAUDE.md +0 -17
  175. package/skills/deep-research/SKILL.md +0 -80
  176. package/skills/findbugs/CLAUDE.md +0 -20
  177. package/skills/findbugs/SKILL.md +0 -241
  178. package/skills/fixbugs/CLAUDE.md +0 -19
  179. package/skills/fixbugs/SKILL.md +0 -142
  180. package/skills/gh-paginate/CLAUDE.md +0 -18
  181. package/skills/gh-paginate/SKILL.md +0 -84
  182. package/skills/gotcha/CLAUDE.md +0 -33
  183. package/skills/gotcha/SKILL.md +0 -73
  184. package/skills/implement/CLAUDE.md +0 -27
  185. package/skills/implement/SKILL.md +0 -66
  186. package/skills/implement/scripts/CLAUDE.md +0 -22
  187. package/skills/implement/scripts/append_note.py +0 -133
  188. package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +0 -22
  189. package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
  190. package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +0 -12
  191. package/skills/implement/scripts/test_append_note.py +0 -191
  192. package/skills/log-audit/CLAUDE.md +0 -20
  193. package/skills/log-audit/SKILL.md +0 -66
  194. package/skills/log-audit/reference/CLAUDE.md +0 -9
  195. package/skills/log-audit/reference/charter.md +0 -52
  196. package/skills/log-audit/scripts/CLAUDE.md +0 -27
  197. package/skills/log-audit/scripts/cluster_recurrences.py +0 -261
  198. package/skills/log-audit/scripts/collect_log_window.py +0 -199
  199. package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +0 -12
  200. package/skills/log-audit/scripts/log_audit_constants/__init__.py +0 -0
  201. package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +0 -23
  202. package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +0 -24
  203. package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +0 -49
  204. package/skills/log-audit/scripts/mine_copilot_findings.py +0 -302
  205. package/skills/log-audit/scripts/test_cluster_recurrences.py +0 -160
  206. package/skills/log-audit/scripts/test_collect_log_window.py +0 -111
  207. package/skills/log-audit/scripts/test_mine_copilot_findings.py +0 -126
  208. package/skills/logifix/CLAUDE.md +0 -36
  209. package/skills/logifix/SKILL.md +0 -69
  210. package/skills/logifix/scripts/CLAUDE.md +0 -16
  211. package/skills/logifix/scripts/logifix.ps1 +0 -205
  212. package/skills/monitor-open-prs/CLAUDE.md +0 -34
  213. package/skills/monitor-open-prs/SKILL.md +0 -88
  214. package/skills/monitor-open-prs/scripts/CLAUDE.md +0 -17
  215. package/skills/monitor-open-prs/scripts/discover_open_prs.py +0 -69
  216. package/skills/monitor-open-prs/scripts/test_discover_open_prs.py +0 -149
  217. package/skills/monitor-open-prs/test_skill_contract.py +0 -27
  218. package/skills/post-audit-findings/SKILL.md +0 -80
  219. package/skills/pr-consistency-audit/CLAUDE.md +0 -34
  220. package/skills/pr-consistency-audit/SKILL.md +0 -116
  221. package/skills/pr-consistency-audit/reference/CLAUDE.md +0 -16
  222. package/skills/pr-consistency-audit/reference/detection-rules.md +0 -96
  223. package/skills/pr-consistency-audit/reference/illustrations.md +0 -78
  224. package/skills/pr-review-responder/CLAUDE.md +0 -35
  225. package/skills/pr-review-responder/EXAMPLES.md +0 -590
  226. package/skills/pr-review-responder/PRINCIPLES.md +0 -533
  227. package/skills/pr-review-responder/README.md +0 -168
  228. package/skills/pr-review-responder/SKILL.md +0 -203
  229. package/skills/pr-review-responder/TESTING.md +0 -350
  230. package/skills/pr-scope-resolve/SKILL.md +0 -45
  231. package/skills/pre-compact/CLAUDE.md +0 -24
  232. package/skills/pre-compact/SKILL.md +0 -134
  233. package/skills/qbug/CLAUDE.md +0 -40
  234. package/skills/qbug/SKILL.md +0 -387
  235. package/skills/qbug/test_qbug_skill_audit_schema.py +0 -152
  236. package/skills/qbug/test_qbug_skill_post_fix_audit.py +0 -103
  237. package/skills/refine/CLAUDE.md +0 -44
  238. package/skills/refine/SKILL.md +0 -262
  239. package/skills/refine/templates/CLAUDE.md +0 -17
  240. package/skills/refine/templates/implementation-notes-template.html +0 -56
  241. package/skills/refine/templates/plan-template.md +0 -60
  242. package/skills/research-mode/CLAUDE.md +0 -35
  243. package/skills/research-mode/SKILL.md +0 -53
  244. package/skills/structure-prompt/CLAUDE.md +0 -42
  245. package/skills/structure-prompt/SKILL.md +0 -44
  246. package/skills/structure-prompt/reference/CLAUDE.md +0 -28
  247. package/skills/structure-prompt/reference/adversarial-tuning.md +0 -62
  248. package/skills/structure-prompt/reference/block-classification.md +0 -27
  249. package/skills/structure-prompt/reference/canonical-case.md +0 -48
  250. package/skills/structure-prompt/reference/citation-depth.md +0 -70
  251. package/skills/structure-prompt/reference/cleanup.md +0 -33
  252. package/skills/structure-prompt/reference/constraints.md +0 -33
  253. package/skills/structure-prompt/reference/directives.md +0 -37
  254. package/skills/structure-prompt/reference/examples.md +0 -72
  255. package/skills/structure-prompt/reference/instantiation.md +0 -51
  256. package/skills/structure-prompt/reference/output-contract.md +0 -72
  257. package/skills/structure-prompt/reference/per-category.md +0 -23
  258. package/skills/structure-prompt/reference/persona.md +0 -38
  259. package/skills/structure-prompt/reference/research.md +0 -33
  260. package/skills/structure-prompt/reference/structure.md +0 -28
  261. package/skills/verified-build/CLAUDE.md +0 -33
  262. package/skills/verified-build/SKILL.md +0 -33
@@ -1,60 +0,0 @@
1
- ---
2
- type: plan
3
- project: <project-or-topic-area>
4
- date: <YYYY-MM-DD>
5
- status: Draft
6
- tags: [refine, plan]
7
- ---
8
-
9
- # <Plan title>
10
-
11
- One-paragraph framing of what the plan delivers and why now.
12
-
13
- ## Goal
14
-
15
- What completing this plan produces. Stated as an outcome, not an activity.
16
-
17
- ## Non-goals
18
-
19
- What is intentionally out of scope. Each item is a thing a reader might assume is included.
20
-
21
- - <Non-goal one>
22
- - <Non-goal two>
23
-
24
- ## Current state
25
-
26
- What exists today that this plan builds on or changes. Cite files, hooks, skills, decisions found during the fan-out. Each bullet is one concrete claim with a path or reference.
27
-
28
- - `<path/to/file>` — <what it currently does that matters>
29
- - `<vault note path>` — <decision or prior session this plan inherits from>
30
-
31
- ## Implementation
32
-
33
- Ordered steps. Each step states the file or surface it touches and the concrete change. Subagents to spawn are named with their `subagent_type`.
34
-
35
- 1. **<Step title>** — <file path or surface>. <Concrete change>.
36
- 2. **<Step title>** — <file path or surface>. <Concrete change>.
37
- 3. **<Step title>** — <file path or surface>. <Concrete change>.
38
-
39
- ## Decisions log
40
-
41
- Each meaningful choice the interview surfaced, with the reasoning. Future-you reads this to understand why the plan looks the way it does.
42
-
43
- | Decision | Choice | Reasoning |
44
- |---|---|---|
45
- | <Question the interview answered> | <What was chosen> | <Why this over the alternatives> |
46
- | <Question the interview answered> | <What was chosen> | <Why this over the alternatives> |
47
-
48
- ## Risks / open questions
49
-
50
- What could break this plan, and what is still unresolved. Each item is actionable — either has a mitigation or is flagged for the user to resolve before implementation begins.
51
-
52
- - **<Risk one>** — <Mitigation, or "open: needs decision before step N">
53
- - **<Risk two>** — <Mitigation, or "open: needs decision before step N">
54
-
55
- ## Acceptance
56
-
57
- What "done" looks like. Observable behavior, file existence, command output — concrete and verifiable.
58
-
59
- - [ ] <Verifiable outcome one>
60
- - [ ] <Verifiable outcome two>
@@ -1,35 +0,0 @@
1
- # research-mode
2
-
3
- Activates three anti-hallucination constraints: cite every claim, say "I don't know" when evidence is lacking, and quote directly from source documents.
4
-
5
- **Trigger:** "research mode", "toggle research", `/research-mode`.
6
-
7
- ## Purpose
8
-
9
- Enforces factual accuracy for research tasks by requiring citations and explicit uncertainty. Stays active until the user exits with "exit research mode".
10
-
11
- ## Key files
12
-
13
- | File | Purpose |
14
- |---|---|
15
- | `SKILL.md` | The complete skill — three constraints, source authority hierarchy, exit condition. No companion files. |
16
-
17
- ## Three active constraints (all simultaneous)
18
-
19
- 1. **Say "I don't know"** when no credible source backs a claim.
20
- 2. **Verify with citations** — every recommendation cites a specific source (project file, URL, named expert, or official docs).
21
- 3. **Direct quotes for factual grounding** — extract actual text before analyzing; ground in word-for-word quotes.
22
-
23
- ## Source authority hierarchy
24
-
25
- 1. Official vendor/creator documentation
26
- 2. Files in the current project
27
- 3. Academic papers, named researchers
28
- 4. Reputable external sources with URLs
29
- 5. Blog posts and community content (lowest; never cited alone when official docs exist)
30
-
31
- ## Conventions
32
-
33
- - This mode is not the default; it applies only after the trigger fires.
34
- - Creative thinking and brainstorming are out of scope for this mode.
35
- - The global `~/.claude/rules/research-mode.md` carries the same three constraints as always-on background rules; this skill makes them explicit and surfaced during the session.
@@ -1,53 +0,0 @@
1
- ---
2
- name: research-mode
3
- description: "Enforces anti-hallucination constraints by requiring citations, source grounding, and explicit 'I don't know' responses when evidence is lacking. Activates for research tasks where factual accuracy is critical. Triggers: 'research mode', 'toggle research', '/research-mode'."
4
- ---
5
-
6
- # Research Mode
7
-
8
- Activates three anti-hallucination constraints based on Anthropic's documentation. Stay in this mode until the user says to exit.
9
-
10
- Source: [Anthropic - Reduce Hallucinations](https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/reduce-hallucinations)
11
-
12
- ## Constraints (ALL active simultaneously)
13
-
14
- ### 1. Say "I don't know"
15
- If you don't have a credible source for a claim, say so. Don't guess. Don't infer. "I don't have data on this" is always a valid answer.
16
-
17
- ### 2. Verify with citations
18
- Every recommendation, claim, or piece of advice must cite a specific source:
19
- - A file in the current project
20
- - An external source found via web search (with URL)
21
- - A named expert, paper, or researcher
22
- - Official documentation
23
-
24
- If you generate a claim and cannot find a supporting source, retract it. Do not present it.
25
-
26
- ### 3. Direct quotes for factual grounding
27
- When working from documents, extract the actual text first before analyzing. Ground your response in word-for-word quotes, not paraphrased summaries. Reference the quote when making your point.
28
-
29
- ## Source Authority Hierarchy
30
-
31
- When evaluating sources, follow this priority order. Higher-tier sources take precedence when claims conflict.
32
-
33
- 1. **Official vendor/creator documentation** — the authoritative source for any external tool, library, API, or protocol. Always check for this first.
34
- 2. **Files in the current project** — for local code, the codebase is the source of truth.
35
- 3. **Academic papers, named researchers** — peer-reviewed or attributed expert analysis.
36
- 4. **Reputable external sources with URLs** — established publications, conference talks, verified technical content.
37
- 5. **Blog posts, tutorials, community content** — useful for context but lowest authority. Never cite these alone when official docs exist.
38
-
39
- ### When official docs don't exist
40
-
41
- If researching an external tool, library, or API and no official vendor/creator documentation can be found, state this explicitly. Do not silently fall back to secondary sources — the absence of official docs is itself a finding the user needs to know.
42
-
43
- ### Local code exception
44
-
45
- For local project code — custom themes, workflows, databases, internal tools — the codebase itself is the authority. Official documentation applies only to the external tools and libraries the project uses, not to the project's own custom logic.
46
-
47
- ## What this mode is NOT
48
- - It is NOT the default. Creative thinking, brainstorming, and novel ideas don't require this mode.
49
- - It does NOT mean "be slow." Research efficiently. Use tools in parallel.
50
- - It does NOT mean "only use existing ideas." You can synthesize across sources to reach new conclusions, but the inputs must be grounded.
51
-
52
- ## How to exit
53
- Say "exit research mode" or switch to any other task.
@@ -1,42 +0,0 @@
1
- # structure-prompt
2
-
3
- Restructures a prompt in one pass: orders blocks, converts persona framing to task constraints, enforces per-category dispositions, expands placeholder tokens, adds `file:line` citations, marks the canonical sub-bucket, and sharpens adversarial-pass phrasing.
4
-
5
- **Trigger:** `/structure-prompt`, "optimize this prompt", "minimally invasive edit" to a prompt artifact, "tighten this prompt".
6
-
7
- ## Purpose
8
-
9
- Applies a spoke-based ruleset to a prompt artifact. Each spoke targets a specific structural problem (persona framing, narrative directives, missing citations, etc.). One pass per invocation.
10
-
11
- ## Key files
12
-
13
- | File | Purpose |
14
- |---|---|
15
- | `SKILL.md` | Hub — pre-flight, first-invocation reads, spoke routing table |
16
- | `reference/block-classification.md` | How to classify each block in the input prompt |
17
- | `reference/research.md` | When a spoke needs information not in the input |
18
- | `reference/output-contract.md` | How to emit the rewritten prompt |
19
- | `reference/structure.md` | Re-ordering blocks and handling large content regions |
20
- | `reference/persona.md` | Converting role assignments to task constraints |
21
- | `reference/per-category.md` | Enforcing per-category dispositions |
22
- | `reference/directives.md` | Rewriting performance directives |
23
- | `reference/constraints.md` | Rewriting narrative directives |
24
- | `reference/instantiation.md` | Expanding placeholder tokens |
25
- | `reference/citation-depth.md` | Adding `file:line` citations |
26
- | `reference/canonical-case.md` | Marking the canonical sub-bucket with ⭐ |
27
- | `reference/adversarial-tuning.md` | Sharpening adversarial-pass phrasing |
28
- | `reference/cleanup.md` | Fixing typos, mixed bullet styles, untagged code blocks |
29
- | `reference/examples.md` | Spoke-matched examples for situations not covered above |
30
-
31
- ## Subdirectories
32
-
33
- | Directory | Purpose |
34
- |---|---|
35
- | `reference/` | One file per spoke; loaded on demand based on the routing table in `SKILL.md` |
36
-
37
- ## Conventions
38
-
39
- - On first invocation, read `block-classification.md`, `research.md`, and `output-contract.md` before anything else.
40
- - The input arrives as the user's message body, a fenced block within it, or a file path argument.
41
- - Emit the result as a single fenced block (paste mode) or rewrite the file in place (file-path mode).
42
- - Load only the reference files the input situation matches — not all of them.
@@ -1,44 +0,0 @@
1
- ---
2
- name: structure-prompt
3
- description: >-
4
- Restructures a user-provided prompt: orders blocks, swaps persona framing for
5
- task constraints, expands placeholder tokens, and adds file:line citations.
6
- Triggers: /structure-prompt, 'optimize this prompt', 'minimally invasive edit'
7
- to a prompt artifact, or 'tighten this prompt'.
8
- ---
9
-
10
- # structure-prompt
11
-
12
- One pass per invocation. Classify each block of the input prompt, apply the matching spoke rules, and emit the rewritten prompt as a single fenced block (paste mode) or rewrite the file in place (file-path mode).
13
-
14
- ## Pre-flight
15
-
16
- The input prompt arrives as the user's message body, as a fenced block within it, or as a file path argument. Treat the entire input as the artifact under optimization.
17
-
18
- ## First invocation of a session
19
-
20
- Read [`reference/block-classification.md`](reference/block-classification.md), then [`reference/research.md`](reference/research.md), then [`reference/output-contract.md`](reference/output-contract.md).
21
-
22
- ## Match situation, read spoke
23
-
24
- | Situation | Read |
25
- |---|---|
26
- | Starting any optimization | [`reference/block-classification.md`](reference/block-classification.md) |
27
- | A spoke needs information that isn't in the input | [`reference/research.md`](reference/research.md) |
28
- | Input contains a fenced code block, diff, dump, transcript, or single content region ≥ 500 characters, OR blocks appear out of canonical sequence (mission, metadata, framework, questions, output spec, data body) | [`reference/structure.md`](reference/structure.md) |
29
- | Input opens with a role assignment ("You are…", "Act as…", "Imagine you are…", "As a…", "Pretend to be…", "Role:…") | [`reference/persona.md`](reference/persona.md) |
30
- | Input names 2+ categories, surfaces, sub-buckets, items, checks, or criteria the agent processes | [`reference/per-category.md`](reference/per-category.md) |
31
- | Input contains performance directives ("be thorough", "think step by step", "you are an expert", "please", "kindly") | [`reference/directives.md`](reference/directives.md) |
32
- | Input contains narrative directives ("try to", "look at", "make sure", "consider", "be sure to", "think about") | [`reference/constraints.md`](reference/constraints.md) |
33
- | Input contains placeholder tokens (`[REPO/ARTIFACT]`, `[INLINE THE FULL ARTIFACT HERE]`, `[N]`, etc.) | [`reference/instantiation.md`](reference/instantiation.md) |
34
- | Sub-bucket bullets reference identifiers from the data body without `file:line` citations | [`reference/citation-depth.md`](reference/citation-depth.md) |
35
- | Framework has 5+ sub-buckets and no ⭐ canonical-case marker | [`reference/canonical-case.md`](reference/canonical-case.md) |
36
- | Output spec contains generic adversarial-pass phrasing ("missed at least N bugs/findings") | [`reference/adversarial-tuning.md`](reference/adversarial-tuning.md) |
37
- | Input has typos, mixed bullet styles, untagged code blocks, trailing whitespace, blank-line runs, or non-sequential heading levels | [`reference/cleanup.md`](reference/cleanup.md) |
38
- | Situation doesn't match any spoke above | [`reference/examples.md`](reference/examples.md) |
39
- | Emitting the rewritten prompt | [`reference/output-contract.md`](reference/output-contract.md) |
40
-
41
- ## Folder map
42
-
43
- - `SKILL.md` — this hub.
44
- - `reference/` — rule detail per situation.
@@ -1,28 +0,0 @@
1
- # structure-prompt/reference
2
-
3
- One reference file per optimization spoke, loaded on demand by the routing table in `SKILL.md`.
4
-
5
- ## Key files
6
-
7
- | File | Purpose |
8
- |---|---|
9
- | `block-classification.md` | How to classify each block in the input prompt (mission, metadata, framework, questions, output spec, data body). Read on every invocation. |
10
- | `research.md` | Steps to take when a spoke needs information not in the input. Read on every invocation. |
11
- | `output-contract.md` | How to emit the rewritten prompt (fenced paste mode or in-place file rewrite). Read on every invocation. |
12
- | `structure.md` | Re-ordering blocks and handling large content regions (≥500 chars, fenced code, diffs, transcripts). |
13
- | `persona.md` | Converting role assignments ("You are…", "Act as…") to task constraints. |
14
- | `per-category.md` | Enforcing per-category dispositions when the prompt names 2+ categories or criteria. |
15
- | `directives.md` | Rewriting performance directives ("be thorough", "think step by step"). |
16
- | `constraints.md` | Rewriting narrative directives ("try to", "make sure", "consider"). |
17
- | `instantiation.md` | Expanding placeholder tokens (`[REPO/ARTIFACT]`, `[N]`, etc.). |
18
- | `citation-depth.md` | Adding `file:line` citations to sub-bucket bullets that reference identifiers. |
19
- | `canonical-case.md` | Marking the ⭐ canonical sub-bucket when a framework has 5+ sub-buckets and none is marked. |
20
- | `adversarial-tuning.md` | Sharpening generic adversarial-pass phrasing. |
21
- | `cleanup.md` | Fixing typos, mixed bullet styles, untagged code blocks, trailing whitespace. |
22
- | `examples.md` | Spoke-matched examples for situations not covered by the named spokes above. |
23
-
24
- ## Conventions
25
-
26
- - Read `block-classification.md`, `research.md`, and `output-contract.md` on every first invocation of a session.
27
- - For all other files: load only the one(s) that match the input situation — the `SKILL.md` routing table maps each situation to its spoke file.
28
- - Never load the full set; spoke files are designed for on-demand use to keep context lean.
@@ -1,62 +0,0 @@
1
- # Sharpen the adversarial-pass phrasing
2
-
3
- The output spec usually closes with an adversarial second-pass instruction like *assume your first pass missed at least 3 P1 bugs across these N sub-buckets — find them*. When that phrase uses a generic noun (`bugs`, `findings`, `issues`, `problems`), the skill replaces the noun with one that names the category's specific failure mode.
4
-
5
- ## Detection
6
-
7
- The fix fires when the output spec contains a phrase matching this shape, with a generic noun:
8
-
9
- - "missed at least `<number>` [bugs / findings / issues / problems]" — optionally preceded by a severity tier (`P0` or `P1`) when the framework uses tiered findings.
10
-
11
- A noun is "generic" when it could apply to any audit category. A noun is "specific" when it names the failure mode of the category.
12
-
13
- ## How to derive the specific noun
14
-
15
- Read the mission line and the framework header. Pull the category's domain from there. Match against this lookup:
16
-
17
- | Category domain | Specific failure-mode noun |
18
- |---|---|
19
- | API contracts (signatures, return types, callback shape) | contract drifts |
20
- | Selector / query / engine compatibility | engine-version incompatibilities |
21
- | Resource cleanup (handles, locks, subscriptions) | leaked resources |
22
- | Scoping and ordering | scope or ordering bugs |
23
- | Dead code | dead code paths |
24
- | Silent failures (swallowed exceptions, dropped errors) | silent failures |
25
- | Bounds and overflow | bounds or overflow bugs |
26
- | Security boundaries | trust-boundary violations |
27
- | Concurrency | concurrency hazards |
28
- | Code rules compliance | rule violations |
29
- | Codebase conflicts (incomplete propagation) | parallel sites that should have been updated alongside the diff |
30
-
31
- When the category sits outside this list, derive the noun from the framework's most prominent axis name (e.g., a framework whose axes all name "selectors" → "selector incompatibilities").
32
-
33
- ## Procedure
34
-
35
- 1. Find the adversarial-pass sentence in the output spec.
36
- 2. Identify the generic noun in that sentence.
37
- 3. Replace it with the specific noun from the table or framework.
38
- 4. Keep the rest of the sentence intact: count (e.g., "3"), severity tier (e.g., "P1") when the original phrase carries one, and the closing "find them".
39
-
40
- ## Examples
41
-
42
- Before (generic):
43
- > "assume your first pass missed at least 3 P1 bugs across these 7 sub-buckets — find them"
44
-
45
- After (Category B):
46
- > "assume your first pass missed at least 3 P1 engine-version incompatibilities across these 7 sub-buckets — find them"
47
-
48
- After (Category K):
49
- > "assume your first pass missed at least 3 P1 parallel sites that should have been updated alongside the diff across these 7 sub-buckets — find them"
50
-
51
- After (Category C):
52
- > "assume your first pass missed at least 3 P1 leaked resources across these 7 sub-buckets — find them"
53
-
54
- ## What stays put
55
-
56
- When the adversarial phrase already names a specific failure mode, the noun stays. The skill changes only generic nouns.
57
-
58
- The count (e.g., 3) and severity tier (e.g., P1) stay intact when the original phrase carries them. Some categories name a noun that doesn't fit the P-tier model — Codebase Conflicts ("parallel sites that should have been updated alongside the diff") is the canonical example — but preservation still applies: if the original phrase includes a tier, the rewritten phrase includes it too. The rule is preservation, not insertion or removal.
59
-
60
- ## Disposition reporting
61
-
62
- Every outcome emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines. When the noun was replaced: `> Gap: Adversarial-pass noun sharpened — "bugs" → "<specific noun>".` When the phrase already carries a specific noun: `> Gap: Adversarial-pass noun verified — "<specific noun>" already specific.` Silent pass is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
@@ -1,27 +0,0 @@
1
- # Block classification
2
-
3
- Every input prompt decomposes into six block types. Tag each region of the input as exactly one type before applying any spoke rules.
4
-
5
- ## Block types
6
-
7
- **Mission block.** One sentence stating what the agent does. The opening directive of the prompt.
8
-
9
- **Metadata block.** Identifiers, SHAs, PR numbers, target paths, ID prefixes, scope flags, mode toggles. Short atomic facts the agent uses as parameters.
10
-
11
- **Framework block.** The checklist, sub-bucket list, surface list, category list, or step list the agent processes. Multi-item structures with named entries.
12
-
13
- **Questions block.** Cross-cutting questions, synthesis questions, or open questions the agent answers after completing the framework.
14
-
15
- **Output spec block.** The format the agent's output takes — totals header, per-item shape, ordering, severity tags, locator format, length cap, lead phrase, closing phrase.
16
-
17
- **Data body block.** Any of:
18
- - Fenced code block (triple backtick) that sits INSIDE the prompt content — not the outer paste-mode fence that wraps the entire prompt artifact
19
- - Diff, file dump, transcript, log, table, or document inlined as content
20
- - Any single content region of 500 characters or more that the agent inspects rather than acts on
21
-
22
- ## Tagging procedure
23
-
24
- 1. Read the input prompt top to bottom.
25
- 2. Annotate each region with exactly one tag.
26
- 3. Confirm every content region is either tagged with one of the six block types or part of a gap-report block. Gap-note lines (`> Gap:`) and `<!-- gap-report:` comment blocks from a prior invocation form a passthrough region — preserved in place during classification and reordering, not re-tagged. During emission, the gap-report region is deterministically replaced by the current run's gap notes per [`output-contract.md`](output-contract.md). The gap-report region sits at the end of the prompt and carries no classification tag.
27
- 4. Proceed to the matching spoke.
@@ -1,48 +0,0 @@
1
- # Mark the canonical sub-bucket with ⭐
2
-
3
- When a framework has many sub-buckets, one of them usually carries the category's signature failure mode. Marking that sub-bucket with ⭐ helps the auditing agent give it extra attention.
4
-
5
- ## Detection
6
-
7
- The marker fires when BOTH hold:
8
-
9
- - The framework has 5 or more sub-buckets
10
- - No sub-bucket already carries the ⭐ marker
11
-
12
- The third condition — whether a canonical signal exists — is determined during selection (below), not detection. When selection finds no clear canonical case, the marker pass does not mark and instead emits a gap note per the [no silent action](output-contract.md#disposition-invariants) invariant.
13
-
14
- ## How to pick the canonical sub-bucket
15
-
16
- In order:
17
-
18
- 1. **Rubric match.** When the calling framework provides a sibling rubric (e.g., at `../category_rubrics/<name>.md` in audit-rubric layouts) and that rubric describes a "Canonical example" or names one axis as the signature pattern, pick that sub-bucket. When no sibling rubric exists, skip this step and fall through to bullet density.
19
- 2. **Bullet density.** When the rubric stays silent, count the concrete bullets per sub-bucket. The sub-bucket with the most bullets that cite a real identifier or line number wins.
20
- 3. **Identifier density.** When two sub-buckets tie on bullet count, pick the one whose identifiers appear most often in the data body.
21
-
22
- ## How to mark it
23
-
24
- Append `⭐ canonical <category-letter> case` after the sub-bucket title, on the same line.
25
-
26
- Derive `<category-letter>` from the leading letter of the sub-bucket id (`K3` → `K`, `A2` → `A`, `B1` → `B`). When the framework uses non-lettered sub-bucket ids or no ids at all (e.g., bullets titled `Surface 1`, `Item 1`, `Check 1`), drop the letter and write `⭐ canonical case`.
27
-
28
- Example before:
29
- ```
30
- **K3. Primary path vs fallback path**
31
- - The file's `if resolved_skill_path is not None:` branch (line 121) is the PRIMARY path…
32
- ```
33
-
34
- Example after:
35
- ```
36
- **K3. Primary path vs fallback path** ⭐ canonical K case
37
- - The file's `if resolved_skill_path is not None:` branch (line 121) is the PRIMARY path…
38
- ```
39
-
40
- ## What stays put
41
-
42
- When a ⭐ marker already lives somewhere in the framework, the marker pass leaves it alone — the prompt's author already chose. The skill marks at most one sub-bucket per invocation.
43
-
44
- When research turns up no clear canonical case (the bullets are evenly weighted, no rubric guidance, no identifier-density signal), the marker pass leaves the framework unmarked AND MUST emit a gap note via the paste-mode or file-path-mode gap-report mechanism that [`output-contract.md`](output-contract.md) defines for the active emission mode. The framework reads fine without an arbitrary pick, but the deferral itself is recorded — see the [no silent action](output-contract.md#disposition-invariants) invariant.
45
-
46
- ## Disposition reporting
47
-
48
- Every outcome emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines. When a sub-bucket was marked: `> Gap: ⭐ canonical <letter> case marker added to sub-bucket "<sub-bucket-id>".` When the framework has fewer than 5 sub-buckets or already carries a ⭐ marker: `> Gap: Canonical-case marker verified — <reason>.` When no clear canonical case exists: `> Gap: Canonical-case marker skipped — framework has 5+ sub-buckets but <rubric match / bullet density / identifier density> found no clear canonical case.` Silent pass is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
@@ -1,70 +0,0 @@
1
- # Add file:line citations on identifier mentions
2
-
3
- When a sub-bucket bullet names an identifier (a function, variable, cmdlet, file path) that also lives in the data body, the bullet earns more value with a `file:line` citation appended.
4
-
5
- ## Detection
6
-
7
- Two separate paths, evaluated for every backtick-wrapped identifier in each bullet:
8
-
9
- **Citation-candidate path.** An identifier is a citation candidate when all three hold:
10
- - The bullet contains a backtick-wrapped identifier (e.g., `os.walk`, `New-ScheduledTaskTrigger`, `_log_walk_error`)
11
- - The identifier also appears in the data body
12
- - No `file:line` citation already follows that identifier within the bullet
13
-
14
- **Citation-unavailable path.** An identifier triggers the unavailable path when all three hold:
15
- - The bullet contains a backtick-wrapped identifier
16
- - The identifier does NOT appear in the data body — its file is not included in the diff or the identifier is external (e.g., a stdlib symbol, a framework API)
17
- - No `(citation unavailable: <reason>)` marker already follows that identifier within the bullet
18
-
19
- Both paths fire independently per identifier. A bullet can contain both citable and unciteable identifiers.
20
-
21
- ## Procedure
22
-
23
- **For citation candidates:**
24
- 1. For each citation candidate, search the data body for the identifier.
25
- 2. Find every occurrence of the identifier in the data body. When the data body uses explicit line numbers (e.g., a code block prefixed with file:line annotations or a diff), use those. When the data body has no line numbers (e.g., a raw pasted dump), use the 1-based line index within the data-body block as `<line>`. Apply the multiple-occurrence policy below to determine which lines to cite.
26
- 3. Append the citation in this format immediately after the backtick-wrapped identifier: `` `identifier` (`<file>:<line>`)``. When the bullet contains multiple identifiers, cite each one inline after its owning backtick span. The `<file>` value comes from the data-body block's heading or label (e.g., the filename in a `### file.py` heading, the diff header, or the code block's language tag). When the data body has no file identity at all (a raw paste with no heading or label), use `data-body:<line>`. The examples below illustrate both single-identifier and multi-identifier bullets.
27
-
28
- ## Multiple occurrences
29
-
30
- When the identifier appears one or more times across the data body:
31
-
32
- - 1–3 occurrences → cite all of them: `(file_a.py:42, file_a.py:88, file_b.ps1:12)`
33
- - 4 or more → cite the first and last with `…` between: `(file_a.py:42, …, file_b.ps1:200)`
34
-
35
- ## Examples
36
-
37
- Before:
38
- ```
39
- - uses `os.walk` with `_log_walk_error` — `_log_walk_error` matches the exact signature stdlib calls.
40
- ```
41
-
42
- After (2 occurrences: definition plus one call site):
43
- ```
44
- - uses `os.walk` (`sweep_empty_dirs.py:23`) with `_log_walk_error` (`sweep_empty_dirs.py:23, sweep_empty_dirs.py:33`) — `_log_walk_error` matches the exact signature stdlib calls.
45
- ```
46
-
47
- Before:
48
- ```
49
- - `Get-ScheduledTask`, `New-ScheduledTaskTrigger`, `New-ScheduledTaskAction`, `Register-ScheduledTask`, `Unregister-ScheduledTask` — verify each call's parameter shape.
50
- ```
51
-
52
- After (one occurrence per cmdlet):
53
- ```
54
- - `Get-ScheduledTask` (`Install-SweepEmptyDirs.ps1:248`), `New-ScheduledTaskTrigger` (`Install-SweepEmptyDirs.ps1:297`), `New-ScheduledTaskAction` (`Install-SweepEmptyDirs.ps1:296`), `Register-ScheduledTask` (`Install-SweepEmptyDirs.ps1:300`), `Unregister-ScheduledTask` (`Install-SweepEmptyDirs.ps1:267`) — verify each call's parameter shape.
55
- ```
56
-
57
- ## What stays put
58
-
59
- When the identifier is a generic concept (e.g., `if version`, `if FLAG`) rather than a real symbol in the data body, the bullet stays as-written. Citations apply to actual identifiers, not category-shaped placeholders.
60
-
61
- When the identifier sits in a file the data body doesn't include (e.g., the bullet mentions `os.walk` but the diff doesn't define it), the citation skips that identifier. The skipped citation MUST emit BOTH:
62
-
63
- 1. An inline gap marker adjacent to the identifier: `(citation unavailable: <reason>)` — so the bullet is not visually identical to a successful citation when read in isolation.
64
- 2. A gap note via the paste-mode or file-path-mode gap-report mechanism that [`output-contract.md`](output-contract.md) defines for the active emission mode.
65
-
66
- Both records are required by the [no silent action](output-contract.md#disposition-invariants) invariant: the reader of the bullet alone must see the gap, and the reader of the output as a whole must see the gap.
67
-
68
- ## Disposition reporting
69
-
70
- Every outcome emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines. When citations were added: `> Gap: Citations added — <N> identifier(s) cited at file:line.` When no citation candidates exist: `> Gap: Citation-depth verified — no uncited identifiers found.` When a citation was unavailable: `> Gap: Citation unavailable for "<identifier>" — <reason>.` Silent pass is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
@@ -1,33 +0,0 @@
1
- # Surface cleanup
2
-
3
- The optimized prompt has consistent surface formatting.
4
-
5
- ## Pass list
6
-
7
- | Surface | State after cleanup |
8
- |---|---|
9
- | Typos in mission, metadata, framework, output spec, or questions | Spelled correctly |
10
- | Bullet style within a single section | Single style throughout (`-`) |
11
- | Code block language tags | Every fenced block inside the prompt artifact carries a language tag |
12
- | Trailing whitespace on lines | Removed |
13
- | Runs of 3+ blank lines | Collapsed to one blank line |
14
- | Heading levels | Sequential within each block (no jumps from `#` to `###`) |
15
-
16
- ## Scope
17
-
18
- This pass changes surface formatting only. Identifiers, content, and ordering pass through unchanged.
19
-
20
- ## Typo-correction carve-out
21
-
22
- Typo fixes apply only to plain-language prose — narrative sentences, mission statements, instructions to the agent, and similar running text. The pass leaves these surfaces untouched even when they look like typos:
23
-
24
- - Text inside backtick code spans (e.g., `` `mispelled_var` `` stays as-is)
25
- - Text inside fenced code blocks (any language, any content)
26
- - Identifiers, file paths, URLs, IDs, SHAs, ID prefixes, proper names
27
- - Any quoted substring the user could be referencing literally (e.g., `"recieve"` in quotes stays as-is)
28
-
29
- These surfaces are subject to the byte-for-byte preservation invariant in [`output-contract.md`](output-contract.md). When in doubt about whether a token is prose or a literal reference, leave it unchanged.
30
-
31
- ## Disposition reporting
32
-
33
- Every surface-formatting change emits an action note via the mechanism that [`output-contract.md`](output-contract.md) defines (e.g., `> Gap: Typo corrected in mission line — "recieve" → "receive".`, `> Gap: Code block language tag added — python.`). When the surface pass makes zero changes, emit a single note: `> Gap: Surface cleanup verified — no formatting issues found.` Silent pass is forbidden — see the [no silent action](output-contract.md#disposition-invariants) invariant.
@@ -1,33 +0,0 @@
1
- # Narrative directives → measurable criteria
2
-
3
- Every narrative directive in the optimized prompt names a measurable criterion.
4
-
5
- ## Detection patterns
6
-
7
- A narrative directive opens with a soft verb:
8
- - "Try to `<X>`"
9
- - "Look at `<X>`"
10
- - "Make sure to `<X>`"
11
- - "Consider `<X>`"
12
- - "Be sure to `<X>`"
13
- - "Think about `<X>`"
14
-
15
- ## Transformation
16
-
17
- Rewrite each narrative directive as a hard constraint with a measurable criterion.
18
-
19
- | Narrative input | Constraint output |
20
- |---|---|
21
- | "Try to be concise" | "Output ≤ 200 words." |
22
- | "Look at the security aspects" | "Inspect: input validation, auth checks, secret handling." |
23
- | "Make sure to verify" | "Verify each claim against the source. Cite file:line." |
24
- | "Consider edge cases" | "Enumerate: empty input, max-size input, concurrent input, malformed input." |
25
- | "Think about performance" | "Report wall-clock cost and memory cost for each candidate." |
26
-
27
- ## Omission carve-out
28
-
29
- When a narrative directive resists rewriting without inventing scope the original prompt did not authorize, omit the directive from the rewritten prompt AND emit a gap note that records both the omitted directive verbatim and the reason it could not be made measurable (e.g., `> Gap: Omitted directive "Consider the edge cases" — no measurable criterion authorized by the source.`). The gap note routes through the paste-mode or file-path-mode gap-report mechanism that [`output-contract.md`](output-contract.md) defines for the active emission mode. Silent omission is forbidden — see the [no silent no-op](output-contract.md#disposition-invariants) invariant.
30
-
31
- ## Cross-spoke deduplication
32
-
33
- When the [`directives.md`](directives.md) spoke has already produced identical measurable criteria (e.g., both spokes derive the same surface enumeration from overlapping input), the constraints spoke does not emit a duplicate output line. Instead it reports a merged gap note (e.g., `> Gap: Narrative directive "Try to find" merged with directives output — both derived the same measurable criteria "Inspect: SQL injection, XSS, auth issues."`). The gap note records the deduplication, satisfying the [no silent action](output-contract.md#disposition-invariants) invariant without emitting a duplicate line that the rewritten prompt would carry twice.
@@ -1,37 +0,0 @@
1
- # Performance directives → measurable constraints
2
-
3
- Every performance directive in the optimized prompt maps to a measurable constraint or a specific scope.
4
-
5
- ## Detection patterns
6
-
7
- Common performance directives:
8
- - "Take a deep breath"
9
- - "Think step by step" / "Let's think step by step"
10
- - "You are an expert"
11
- - "Be thorough"
12
- - "Be comprehensive"
13
- - "Be careful" / "carefully"
14
- - "Do your best"
15
- - "Please"
16
- - "Kindly"
17
-
18
- ## Transformation
19
-
20
- Each directive maps to a measurable constraint or to omission:
21
-
22
- | Directive | Replacement |
23
- |---|---|
24
- | "Be thorough" | A surface enumeration. e.g., "Inspect: input validation, auth, secret handling." |
25
- | "Be comprehensive" | A count target. e.g., "Produce at least 8 findings." |
26
- | "Be careful" / "carefully" | A locator requirement. e.g., "Cite file:line for every claim." |
27
- | "Think step by step" / "Let's think step by step" | omitted |
28
- | "Take a deep breath" | omitted |
29
- | "Please" / "Kindly" | omitted |
30
- | "You are an expert" | omitted (covered by the mission line) — unless the persona spoke's creative-writing carve-out preserved the role line intact, in which case leave "You are an expert" in place |
31
- | "Do your best" | omitted |
32
-
33
- Every transformation outcome — whether the directive was mapped to a measurable constraint or omitted — MUST emit an action note recording what changed via the mechanism that [`output-contract.md`](output-contract.md) defines (e.g., `> Gap: Directive "Be thorough" replaced with surface enumeration "Inspect: input validation, auth, secret handling."` or `> Gap: Directive "Take a deep breath" omitted — no measurable equivalent.`). See the [no silent action](output-contract.md#disposition-invariants) invariant.
34
-
35
- ## Show-reasoning carve-out
36
-
37
- "Think step by step" stays intact when the prompt explicitly requires the agent to show its reasoning chain in the output. The carve-out MUST emit a gap note via the paste-mode or file-path-mode mechanism that [`output-contract.md`](output-contract.md) defines. See the [no silent no-op](output-contract.md#disposition-invariants) invariant.