@event4u/agent-config 8.13.0 → 9.0.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 (279) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +136 -0
  3. package/README.md +1 -1
  4. package/dist/agent-src/commands/agent-handoff.md +35 -0
  5. package/dist/agent-src/commands/agents/init.md +1 -0
  6. package/dist/agent-src/commands/agents/optimize.md +1 -0
  7. package/dist/agent-src/commands/agents/user/accept.md +3 -2
  8. package/dist/agent-src/commands/agents/user/init.md +5 -4
  9. package/dist/agent-src/commands/agents/user/update.md +3 -2
  10. package/dist/agent-src/commands/agents/user.md +1 -0
  11. package/dist/agent-src/commands/agents.md +1 -0
  12. package/dist/agent-src/commands/analytics/show.md +1 -0
  13. package/dist/agent-src/commands/analytics.md +1 -0
  14. package/dist/agent-src/commands/analyze/decision.md +1 -0
  15. package/dist/agent-src/commands/analyze/incident.md +1 -0
  16. package/dist/agent-src/commands/analyze/near-miss.md +1 -0
  17. package/dist/agent-src/commands/analyze/postmortem.md +1 -0
  18. package/dist/agent-src/commands/analyze/premortem.md +1 -0
  19. package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
  20. package/dist/agent-src/commands/analyze.md +3 -2
  21. package/dist/agent-src/commands/brand/identity.md +6 -5
  22. package/dist/agent-src/commands/brand/review.md +6 -5
  23. package/dist/agent-src/commands/brand/strategy.md +6 -4
  24. package/dist/agent-src/commands/brand/tokens.md +7 -6
  25. package/dist/agent-src/commands/brand/voice.md +5 -4
  26. package/dist/agent-src/commands/brand.md +9 -7
  27. package/dist/agent-src/commands/bug/fix.md +1 -0
  28. package/dist/agent-src/commands/bug/investigate.md +1 -0
  29. package/dist/agent-src/commands/bug.md +2 -1
  30. package/dist/agent-src/commands/challenge-me/vision.md +1 -0
  31. package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
  32. package/dist/agent-src/commands/challenge-me.md +28 -6
  33. package/dist/agent-src/commands/chat-history.md +1 -0
  34. package/dist/agent-src/commands/check-current-md.md +1 -0
  35. package/dist/agent-src/commands/commit.md +1 -0
  36. package/dist/agent-src/commands/context/create.md +3 -2
  37. package/dist/agent-src/commands/context.md +1 -0
  38. package/dist/agent-src/commands/cost/profile.md +1 -0
  39. package/dist/agent-src/commands/cost.md +2 -1
  40. package/dist/agent-src/commands/council/analysis.md +1 -0
  41. package/dist/agent-src/commands/council/debate.md +1 -0
  42. package/dist/agent-src/commands/council/default.md +21 -20
  43. package/dist/agent-src/commands/council/design.md +1 -0
  44. package/dist/agent-src/commands/council/optimize.md +1 -0
  45. package/dist/agent-src/commands/council/pr.md +1 -0
  46. package/dist/agent-src/commands/council.md +1 -0
  47. package/dist/agent-src/commands/estimate-ticket.md +1 -0
  48. package/dist/agent-src/commands/feature/dev.md +1 -0
  49. package/dist/agent-src/commands/feature/explore.md +1 -0
  50. package/dist/agent-src/commands/feature/plan.md +1 -0
  51. package/dist/agent-src/commands/feature/refactor.md +1 -0
  52. package/dist/agent-src/commands/feature/roadmap.md +1 -0
  53. package/dist/agent-src/commands/feature.md +2 -1
  54. package/dist/agent-src/commands/fix/pr-comments.md +19 -0
  55. package/dist/agent-src/commands/fix.md +2 -1
  56. package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
  57. package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
  58. package/dist/agent-src/commands/ghostwriter/show.md +1 -0
  59. package/dist/agent-src/commands/ghostwriter/write.md +1 -0
  60. package/dist/agent-src/commands/ghostwriter.md +1 -0
  61. package/dist/agent-src/commands/grill-me.md +17 -12
  62. package/dist/agent-src/commands/humanize.md +1 -0
  63. package/dist/agent-src/commands/image/analyse.md +2 -1
  64. package/dist/agent-src/commands/image/create.md +1 -0
  65. package/dist/agent-src/commands/image/verify.md +1 -0
  66. package/dist/agent-src/commands/image.md +16 -12
  67. package/dist/agent-src/commands/implement-ticket.md +1 -0
  68. package/dist/agent-src/commands/judge/on-diff.md +1 -0
  69. package/dist/agent-src/commands/judge/solo.md +1 -0
  70. package/dist/agent-src/commands/judge/steps.md +1 -0
  71. package/dist/agent-src/commands/judge.md +1 -0
  72. package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
  73. package/dist/agent-src/commands/knowledge/forget.md +1 -0
  74. package/dist/agent-src/commands/knowledge/ingest.md +1 -0
  75. package/dist/agent-src/commands/knowledge/list.md +10 -0
  76. package/dist/agent-src/commands/knowledge.md +1 -0
  77. package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
  78. package/dist/agent-src/commands/memory/mine-session.md +1 -0
  79. package/dist/agent-src/commands/memory/promote.md +3 -2
  80. package/dist/agent-src/commands/memory.md +1 -0
  81. package/dist/agent-src/commands/mission/upgrade.md +45 -24
  82. package/dist/agent-src/commands/mode.md +1 -0
  83. package/dist/agent-src/commands/module/create.md +1 -0
  84. package/dist/agent-src/commands/module/explore.md +1 -0
  85. package/dist/agent-src/commands/module.md +1 -0
  86. package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
  87. package/dist/agent-src/commands/optimize/project.md +1 -0
  88. package/dist/agent-src/commands/optimize/prompt.md +1 -0
  89. package/dist/agent-src/commands/optimize.md +2 -1
  90. package/dist/agent-src/commands/orchestrate.md +1 -0
  91. package/dist/agent-src/commands/override.md +1 -0
  92. package/dist/agent-src/commands/package.md +2 -1
  93. package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
  94. package/dist/agent-src/commands/post-as/me.md +1 -0
  95. package/dist/agent-src/commands/post-as.md +1 -0
  96. package/dist/agent-src/commands/pr/create/description-only.md +1 -0
  97. package/dist/agent-src/commands/pr/create.md +19 -17
  98. package/dist/agent-src/commands/prediction-pool.md +7 -6
  99. package/dist/agent-src/commands/prepare-for-review.md +1 -0
  100. package/dist/agent-src/commands/profile/activate.md +1 -0
  101. package/dist/agent-src/commands/profile/deactivate.md +1 -0
  102. package/dist/agent-src/commands/profile.md +1 -0
  103. package/dist/agent-src/commands/project.md +2 -1
  104. package/dist/agent-src/commands/refine-ticket.md +7 -0
  105. package/dist/agent-src/commands/research/deep.md +1 -0
  106. package/dist/agent-src/commands/research.md +1 -0
  107. package/dist/agent-src/commands/review/routing.md +1 -0
  108. package/dist/agent-src/commands/review.md +2 -1
  109. package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
  110. package/dist/agent-src/commands/roadmap/materialize.md +1 -0
  111. package/dist/agent-src/commands/roadmap/process-full.md +1 -0
  112. package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
  113. package/dist/agent-src/commands/roadmap/process-step.md +1 -0
  114. package/dist/agent-src/commands/roadmap.md +1 -0
  115. package/dist/agent-src/commands/security-audit-config.md +2 -1
  116. package/dist/agent-src/commands/skill/preview.md +1 -0
  117. package/dist/agent-src/commands/skill.md +1 -0
  118. package/dist/agent-src/commands/skills/discover.md +1 -0
  119. package/dist/agent-src/commands/skills.md +1 -0
  120. package/dist/agent-src/commands/sync/agent-settings.md +1 -0
  121. package/dist/agent-src/commands/sync.md +2 -1
  122. package/dist/agent-src/commands/team/adversarial.md +3 -2
  123. package/dist/agent-src/commands/team/delegate.md +3 -2
  124. package/dist/agent-src/commands/team/review.md +3 -2
  125. package/dist/agent-src/commands/team/status.md +49 -18
  126. package/dist/agent-src/commands/team-knowledge.md +8 -6
  127. package/dist/agent-src/commands/team.md +21 -16
  128. package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
  129. package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
  130. package/dist/agent-src/commands/tests/execute.md +1 -0
  131. package/dist/agent-src/commands/tests.md +2 -1
  132. package/dist/agent-src/commands/update-form-request-messages.md +1 -0
  133. package/dist/agent-src/commands/upstream-contribute.md +1 -0
  134. package/dist/agent-src/commands/video/from-script.md +3 -2
  135. package/dist/agent-src/commands/video/from-song.md +22 -21
  136. package/dist/agent-src/commands/video/scene.md +1 -0
  137. package/dist/agent-src/commands/video/stitch.md +2 -1
  138. package/dist/agent-src/commands/video/storyboard.md +1 -0
  139. package/dist/agent-src/commands/video.md +1 -0
  140. package/dist/agent-src/commands/work.md +1 -0
  141. package/dist/agent-src/commands/worktree/cleanup.md +8 -7
  142. package/dist/agent-src/commands/worktree/create.md +1 -0
  143. package/dist/agent-src/commands/worktree/verify.md +1 -0
  144. package/dist/agent-src/commands/worktree.md +1 -0
  145. package/dist/agent-src/rules/active-remediation.md +12 -36
  146. package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
  147. package/dist/agent-src/rules/context-hygiene.md +19 -113
  148. package/dist/agent-src/rules/design-fidelity.md +4 -60
  149. package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
  150. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
  151. package/dist/agent-src/rules/improve-before-implement.md +4 -0
  152. package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
  153. package/dist/agent-src/rules/size-enforcement.md +10 -0
  154. package/dist/agent-src/rules/tool-safety.md +17 -3
  155. package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
  156. package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
  157. package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
  158. package/dist/agent-src/skills/code-review/SKILL.md +105 -93
  159. package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
  160. package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
  161. package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
  162. package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
  163. package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
  164. package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
  165. package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
  166. package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
  167. package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
  168. package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
  169. package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
  170. package/dist/agent-src/skills/docker/SKILL.md +10 -0
  171. package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
  172. package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
  173. package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
  174. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
  175. package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
  176. package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
  177. package/dist/agent-src/skills/laravel/SKILL.md +10 -0
  178. package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
  179. package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
  180. package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
  181. package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
  182. package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
  183. package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
  184. package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
  185. package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
  186. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
  187. package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
  188. package/dist/agent-src/skills/terraform/SKILL.md +10 -0
  189. package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
  190. package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
  191. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  192. package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  193. package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  194. package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  195. package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
  196. package/dist/discovery/deprecation-report.md +1 -1
  197. package/dist/discovery/discovery-manifest.json +256 -190
  198. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  199. package/dist/discovery/discovery-manifest.summary.md +5 -5
  200. package/dist/discovery/orphan-report.md +1 -1
  201. package/dist/discovery/packs.json +20 -17
  202. package/dist/discovery/trust-report.md +3 -3
  203. package/dist/discovery/workspaces.json +16 -13
  204. package/dist/install/install.mjs +10 -2
  205. package/dist/mcp/registry-manifest.json +3 -3
  206. package/dist/router.json +1 -1
  207. package/dist/scripts/condense.js +5 -0
  208. package/dist/scripts/condense.js.map +1 -1
  209. package/dist/server/schemas/settings.js +5 -1
  210. package/dist/server/schemas/settings.js.map +1 -1
  211. package/docs/CLAIMS.md +8 -1
  212. package/docs/SKILL_CENSUS.md +8 -0
  213. package/docs/architecture.md +2 -2
  214. package/docs/benchmark.md +67 -2
  215. package/docs/catalog.md +2 -2
  216. package/docs/contracts/ai-council-config.md +9 -2
  217. package/docs/contracts/ai-team-config.md +37 -4
  218. package/docs/contracts/prelaunch-diagnostics.md +151 -0
  219. package/docs/contracts/release-pr-gating.md +1 -0
  220. package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
  221. package/docs/featured-skills.md +2 -2
  222. package/docs/getting-started-by-role.md +1 -1
  223. package/docs/getting-started.md +16 -5
  224. package/docs/governance-advantage.md +1 -1
  225. package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
  226. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
  227. package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
  228. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
  229. package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
  230. package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
  231. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
  232. package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
  233. package/docs/guidelines/design-fidelity-mechanics.md +76 -0
  234. package/docs/parity/command-frontmatter.md +60 -0
  235. package/docs/proof.md +6 -5
  236. package/package.json +1 -1
  237. package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
  238. package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
  239. package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
  240. package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
  241. package/src/config/agent-settings.template.yml +34 -10
  242. package/src/config/prelaunch-areas.yml +36 -0
  243. package/src/scripts/_cli/cmd_doctor.ts +118 -26
  244. package/src/scripts/_lib/claude_plugin.ts +77 -2
  245. package/src/scripts/_lib/orchestration_record.ts +5 -0
  246. package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
  247. package/src/scripts/ai_team/config.ts +73 -1
  248. package/src/scripts/ai_team/review_gate.ts +636 -0
  249. package/src/scripts/ai_team/team_dispatch.ts +612 -0
  250. package/src/scripts/bench_ab_task_runner.ts +11 -1
  251. package/src/scripts/bench_parity_count.ts +279 -0
  252. package/src/scripts/build_linear_digest.ts +3 -1
  253. package/src/scripts/check_bridge_derivation.ts +172 -0
  254. package/src/scripts/check_consumer_scope_flip.ts +179 -0
  255. package/src/scripts/check_council_config_location.ts +115 -15
  256. package/src/scripts/check_host_loadability.ts +81 -0
  257. package/src/scripts/condense.ts +5 -0
  258. package/src/scripts/hook_manifest.yaml +12 -1
  259. package/src/scripts/lint_handoffs.ts +42 -0
  260. package/src/scripts/lint_skill_descriptions.ts +228 -0
  261. package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
  262. package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
  263. package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
  264. package/src/scripts/lint_supported_tools_matrix.ts +35 -0
  265. package/src/scripts/optimize_skill_description.ts +144 -0
  266. package/src/scripts/orchestration_record.ts +2 -1
  267. package/src/scripts/prelaunch_diagnostics.ts +248 -0
  268. package/src/scripts/run_skill_evals.ts +70 -4
  269. package/src/scripts/schemas/command.schema.json +7 -0
  270. package/src/scripts/schemas/evals.schema.json +105 -14
  271. package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
  272. package/src/scripts/schemas/skill.schema.json +18 -1
  273. package/src/scripts/schemas/subagent.schema.json +6 -0
  274. package/src/scripts/skill_linter.ts +43 -3
  275. package/src/scripts/smoke_host_loadability.sh +73 -0
  276. package/src/scripts/team_review_gate_hook.ts +115 -0
  277. package/src/scripts/trigger_eval_grandfather.json +1 -2
  278. package/src/scripts/utilization_report.ts +225 -0
  279. package/src/server/schemas/settings.ts +9 -1
@@ -0,0 +1,102 @@
1
+ ---
2
+ model_tier: medium
3
+ name: docx-authoring
4
+ description: "Use when generating or editing a Word .docx — create, fill a template, or edit body XML via a consumer library; round-trip validated. Triggers on 'generate a docx', 'fill this Word template'."
5
+ status: active
6
+ tier: senior
7
+ domain: process
8
+ compatibility: "Requires a consumer-installed OOXML library (python-docx for create/fill; a zip+xml toolchain for the unpack→edit→pack path). No LibreOffice/soffice dependency — that surface is gated (see pptx, road-to-ecosystem-harvest-document-skills Phase 2). Ships zero runtime in this package."
9
+ workspaces:
10
+ - agent-config-maintainer
11
+ packs:
12
+ - meta
13
+ ---
14
+
15
+ # docx-authoring
16
+
17
+ Wing-1 engineering skill for **writing** Word documents — the generation half of
18
+ the read→write cycle whose read side is [`markitdown`](../markitdown/SKILL.md).
19
+ Ships zero runtime in this package: the agent drives a library the consumer
20
+ already has (python-docx, or a zip+XML toolchain), exactly as `markitdown` wraps
21
+ a consumer-installed converter. Re-implements the **pattern**, never any
22
+ proprietary source.
23
+
24
+ ## When to use
25
+
26
+ - "Generate a .docx report / letter / contract from this content."
27
+ - "Fill this Word template with these values."
28
+ - "Edit the body of this .docx" (a heading, a table cell, a style).
29
+
30
+ Do NOT use for: reading a docx → Markdown (that is `markitdown`); slide decks
31
+ (`html-deck`, or the gated pptx surface); PDFs (`pdf-tools`).
32
+
33
+ ## Procedure
34
+
35
+ ### 1. Pick the path by task
36
+
37
+ | Task | Path |
38
+ |---|---|
39
+ | Create from scratch / structured content | Library create (python-docx `Document()`) — build paragraphs, tables, styles programmatically |
40
+ | Fill a supplied template | Open the template, replace placeholder runs in place, save a copy — never mutate the original |
41
+ | Surgical edit of existing body | **unpack → edit XML → pack-with-validate**: a `.docx` is a ZIP of XML; unzip, edit `word/document.xml`, re-zip preserving the archive structure |
42
+
43
+ ### 2. Honor the hard-won gotchas (encode as rules, not hope)
44
+
45
+ - **Page size defaults to US Letter** in most libraries — set A4 explicitly when the locale needs it; never assume.
46
+ - **Table columns need dual widths** — set BOTH the table grid width and each cell width, or renderers ignore one and collapse the layout.
47
+ - **No Unicode bullet glyphs** as literal characters (`•`, `‣`) — use the list-style paragraph, or the document loses its list semantics and screen readers skip it.
48
+ - **Runs, not paragraphs, carry formatting** — a placeholder that spans two runs will not match a naive whole-paragraph replace; split/merge runs first.
49
+
50
+ ### 3. Validate — round-trip, do not trust the write
51
+
52
+ 1. Re-open the generated file with the SAME library; assert it parses (a corrupt ZIP or malformed XML throws here).
53
+ 2. Read back one written value (a heading text, a table cell) and assert it equals what was written.
54
+ 3. For the unpack→pack path: confirm the archive still contains `[Content_Types].xml` and `word/document.xml` (dropping either produces a file Word refuses to open).
55
+
56
+ ## Output format
57
+
58
+ 1. The generated/edited `.docx` path.
59
+ 2. The validation result: parses ✅, read-back value matched ✅, required parts present ✅.
60
+ 3. Any gotcha that applied (e.g. "set A4 explicitly; template used Letter").
61
+
62
+ ## Gotcha
63
+
64
+ The most common silent failure is a file that **saves without error but Word
65
+ refuses to open**: an unpack→pack cycle that re-zipped with a directory entry,
66
+ wrong compression, or a dropped `[Content_Types].xml`. The round-trip re-open in
67
+ step 3 is the only check that catches it — a green "file written" line does not.
68
+
69
+ - **Silent corruption:** an unpack→pack cycle re-zipped with a directory entry or a dropped `[Content_Types].xml` → saves fine, Word shows "file is corrupt". Only the round-trip re-open catches it.
70
+
71
+ ## Do NOT
72
+
73
+ - Do NOT bundle or ship a Python toolkit in this package — drive the consumer's library (zero-runtime posture, like `markitdown`).
74
+ - Do NOT mutate a supplied template in place — always write a copy.
75
+ - Do NOT claim success on "file written"; claim it only after the round-trip re-open.
76
+ - Do NOT reach for LibreOffice/soffice — that dependency is gated (pptx surface).
77
+
78
+ ## Related Skills
79
+
80
+ **WHEN to use this**
81
+
82
+ - The target artifact is a Word `.docx` — a report, letter, contract, or a filled template.
83
+ - A `.docx` body needs a surgical edit (heading, table cell, style) via the unpack→edit→pack path.
84
+
85
+ **WHEN NOT to use this**
86
+
87
+ - Reading a docx into the conversation → [`markitdown`](../markitdown/SKILL.md).
88
+ - PDFs → [`pdf-tools`](../pdf-tools/SKILL.md); spreadsheets → [`spreadsheet-authoring`](../spreadsheet-authoring/SKILL.md); slide decks → [`html-deck`](../html-deck/SKILL.md).
89
+ - The task needs LibreOffice-backed rendering (pptx) — that surface is gated, do not reach for it here.
90
+
91
+ ## When the agent should load this
92
+
93
+ - "Generate a Word report from this content."
94
+ - "Fill this .docx template with these values."
95
+ - "Edit the heading / a table cell in this .docx."
96
+ - "Produce a contract as a .docx."
97
+
98
+ ## Output
99
+
100
+ 1. **Generated document** — the `.docx` path. Cite as `docx-output`.
101
+ 2. **Validation receipt** — parses on re-open ✅, read-back value matched ✅, required OOXML parts present ✅. Cite as `docx-validation`.
102
+ 3. **Gotcha log** — present only when a gotcha applied (page-size override, run-split for a template placeholder). Cite as `docx-gotchas`.
@@ -0,0 +1,25 @@
1
+ {
2
+ "skill": "github-ci",
3
+ "_calibration": "Seed for eval-schema v2 (ecosystem-harvest skill-quality-gates Phase 2). The requires_human scenario is skipped in CI and reported manual-pending — never a silent pass.",
4
+ "scenarios": [
5
+ {
6
+ "id": "fetches-real-ci-logs-not-guess",
7
+ "prompt": "The PR's Node Tests check is red. Diagnose why.",
8
+ "environment": "an open PR with a failing CI check",
9
+ "assertions": [
10
+ { "kind": "tool-choice", "must_use": ["bash"], "must_not_use": [] },
11
+ { "kind": "contains", "value": "log" }
12
+ ]
13
+ },
14
+ {
15
+ "id": "operator-confirms-rerun",
16
+ "prompt": "Re-run the failed CI job after the fix is pushed.",
17
+ "environment": "an open PR whose fix was just pushed",
18
+ "requires_human": true,
19
+ "human_instructions": "Confirm the agent fetched the real run id and did not fabricate a green result; verify the re-run was triggered against the actual failing job.",
20
+ "assertions": [
21
+ { "kind": "contains", "value": "run" }
22
+ ]
23
+ }
24
+ ]
25
+ }
@@ -48,8 +48,12 @@ human voice there; don't inject personality or restructure.
48
48
  smuggled instructions. Then rewrite the visible content.
49
49
  1. **Load catalog on demand.** Read
50
50
  [`data/patterns.md`](data/patterns.md) — five pattern groups,
51
- before/after pairs, false-positive guards. Don't paraphrase from
52
- memory; catalog is the reference.
51
+ before/after pairs, false-positive guards — and
52
+ [`references/anti-aiisms.md`](references/anti-aiisms.md) for the
53
+ orthogonal **severity axis** (High / Medium / Low) + self-validation
54
+ thresholds. Don't paraphrase from memory; catalog is the reference.
55
+ Act on a single **High** tell; require a cluster (≥ 2) for **Medium**;
56
+ leave isolated **Low** tells alone.
53
57
  2. **Draft rewrite.** Replace tells with plain alternatives; cover
54
58
  everything the original covers (five paragraphs in → five out), preserve
55
59
  meaning, match active voice source. Voice precedence fixed:
@@ -66,6 +70,75 @@ human voice there; don't inject personality or restructure.
66
70
  `npx tsx src/scripts/detect_ai_tells.ts --stdin --fail` on final
67
71
  draft. No runtime → step-3 audit is the fallback (degrade, don't
68
72
  skip audit).
73
+ 6. **Deterministic self-check + factual-integrity guard.** Re-scan the
74
+ final draft against the [`anti-aiisms.md`](references/anti-aiisms.md)
75
+ self-validation thresholds (dash density, consecutive-staccato cap,
76
+ uniform-bullet run, hedge stack, stock-vocabulary density): did the
77
+ rewrite clear flagged tells **without introducing new ones**? Re-run
78
+ over already-clean prose is a **no-op**. Where the rewrite touched a
79
+ number, date, name, quantity, or claim, emit
80
+ `[VERIFY: <original> → <rewritten>]` — a humanizing pass changes *how*
81
+ something is said, never *what is true*; a silent factual edit is a
82
+ defect, not a style win. **Long-rewrite re-anchor (guards against style slippage):** before
83
+ finishing a long rewrite, re-state the active style ruleset (intensity
84
+ level + voice precedence) so late paragraphs match early ones.
85
+ (`context-hygiene` may later own the generic re-anchor primitive; here
86
+ scoped to the humanize pass.)
87
+
88
+ ## Intensity levels
89
+
90
+ Pick the level from the request; default **balanced**. The level tunes the
91
+ self-validation thresholds, never the guards below:
92
+
93
+ - **subtle** — remove only Tier-High tells; leave register untouched.
94
+ - **balanced** (default) — High + clustered Medium; keep the author's cadence.
95
+ - **full** — High + Medium + over-used Low; the strongest de-slop.
96
+ - **voice-match** — full, then conform to a supplied voice sample (§ Voice-match).
97
+
98
+ **Excluded by design (do NOT build or invoke):**
99
+
100
+ - **Detector-evasion / anti-detector mode** — rewriting to defeat an
101
+ AI-text classifier. Conflicts with the media/disclosure transparency
102
+ floors ([`media-governance-routing`](../../rules/media-governance-routing.md),
103
+ the ghostwriter disclosure footer). Goal is prose that reads human
104
+ because the tells are gone, never prose engineered to fool a detector.
105
+ - **A shipped ML detector.** No runtime ML-classifier dependency
106
+ (no-new-runtime-dependency constraint). Deterministic
107
+ `detect_ai_tells.ts` is the only checker that ships. The score →
108
+ rewrite → re-score loop shape is kept only as an **optional
109
+ bring-your-own-checker** step: if the operator supplies a checker
110
+ command, the loop may call it with an audit trail; absent one, the
111
+ step-3 audit + step-6 self-check degrade gracefully. The suite never
112
+ ships the checker.
113
+
114
+ ## Voice-match — six fixed signals, not a vibe
115
+
116
+ When a voice sample is supplied (`--voice`, a profile fingerprint), extract a
117
+ small **fixed signal set** and match against it, not an impression:
118
+
119
+ 1. **Sentence-length rhythm** — the short/long alternation pattern.
120
+ 2. **Vocabulary register** — plain / technical / formal / colloquial.
121
+ 3. **Punctuation habits** — dash use, parentheticals, semicolons, ellipses.
122
+ 4. **Hedging density** — how often the author qualifies a claim.
123
+ 5. **Structural cadence** — paragraph length, list vs prose preference.
124
+ 6. **Idiom** — recurring phrases, era-bound references, signature asides.
125
+
126
+ Two distinct voice samples produce measurably different targets on these six
127
+ axes; matching means moving the draft toward the sample's values, never
128
+ inventing personality the sample does not show.
129
+
130
+ ## Principles (non-negotiable)
131
+
132
+ - **Subtract, don't add.** AI tone is a *residue to remove*, not warmth to
133
+ add. Adding warmth adds sycophancy — the loudest AI tell (wire to
134
+ [`direct-answers`](../../rules/direct-answers.md) Iron Law 1: no flattery).
135
+ Humanizing lowers the AI signal; never raises the agreeableness.
136
+ - **Style and stance are separate.** A request for a humanized *voice* is
137
+ not a request for *agreement*. Preserve disagreement, uncertainty,
138
+ hedged-because-genuinely-uncertain claims, and refusals **regardless of
139
+ intensity level** — a pass that softens a "no" into a "maybe" has
140
+ corrupted the stance, not the style. When the input takes a position or
141
+ declines, the rewrite keeps that position or declining, in plainer words.
69
142
 
70
143
  ## Guards (non-negotiable)
71
144
 
@@ -144,4 +217,7 @@ human voice there; don't inject personality or restructure.
144
217
 
145
218
  Pattern catalog root source: Wikipedia, "Signs of AI writing" (WikiProject
146
219
  AI Cleanup) — catalog wording in `data/patterns.md` authored fresh
147
- for this suite.
220
+ for this suite. Severity tiers + self-validation thresholds:
221
+ [`references/anti-aiisms.md`](references/anti-aiisms.md). Worked fixtures
222
+ for stance-preservation and voice-match:
223
+ [`references/fixtures.md`](references/fixtures.md).
@@ -0,0 +1,112 @@
1
+ # AI-ism severity tiers + self-validation thresholds
2
+
3
+ > On-demand reference for the [`humanizer`](../SKILL.md) skill
4
+ > (road-to-ecosystem-harvest-prose-authenticity, Source I — a prose
5
+ > anti-slop humanizer skill; provenance in the harvest index). Loaded only
6
+ > during an active humanize pass. Five **pattern groups** live in
7
+ > [`../data/patterns.md`](../data/patterns.md); this file adds the
8
+ > orthogonal **severity axis** (how reliable a tell each construction is)
9
+ > and the **self-validation thresholds** the deterministic self-check reads.
10
+ >
11
+ > Every threshold here is a **default, not a suite measurement** — a
12
+ > starting bound with its source, tunable per voice, never a validated
13
+ > claim about human prose.
14
+
15
+ ## Why a severity axis (orthogonal to the group taxonomy)
16
+
17
+ `patterns.md` groups tells by *kind* (content / language / style /
18
+ communication / filler). This file grades them by *diagnostic weight* — how
19
+ much a single occurrence tells you. Rewrite discipline is the same
20
+ (rewrite, don't delete); the tier decides **how hard to look** and **whether
21
+ one hit is worth acting on**. Clusters still win: two Medium tells
22
+ co-occurring outweigh one isolated High.
23
+
24
+ ## Tier High — almost always a tell (act on a single occurrence)
25
+
26
+ Single instance is strong evidence of machine authorship; these rarely
27
+ survive in genuine human prose.
28
+
29
+ - **Chat artifacts** in a deliverable — "I hope this helps", "Let me know
30
+ if…", "Would you like me to…", "Here is an overview of…". (patterns.md 4.1)
31
+ - **Knowledge-cutoff disclaimers** — "As of my last update…", "While
32
+ specific details are limited…". (4.2)
33
+ - **Sycophancy** — "Great question!", "You're absolutely right". (4.4)
34
+ - **Negative parallelism as a reflex** — "It's not just X — it's Y", "not
35
+ merely a song, but a statement". (2.3)
36
+ - **Significance inflation** — "marks a pivotal moment", "leaves an
37
+ indelible mark". (1.1)
38
+ - **Aphorism formulas** — "X is the currency of Y", "X is not a tool but a
39
+ mirror". (3.9)
40
+ - **Spaced double hyphens** (` -- `) — always a machine artifact. (3.1)
41
+
42
+ ## Tier Medium — a tell in combination (act when ≥2 co-occur)
43
+
44
+ Individually defensible; a cluster of two or more is a signature.
45
+
46
+ - **AI vocabulary** — delve, tapestry, showcase, testament, pivotal,
47
+ vibrant, intricate, seamless, underscore, ever-evolving. One is noise;
48
+ three in a paragraph is a confession. (2.1)
49
+ - **Rule-of-three padding** — forced triplets. (2.4)
50
+ - **Copula avoidance** — "serves as", "stands as", "represents a shift". (2.2)
51
+ - **Promotional register** — "nestled", "boasts", "rich cultural heritage". (1.4)
52
+ - **Superficial "-ing" analysis** — "…, highlighting the region's heritage". (1.3)
53
+ - **Weasel attributions** — "experts argue", "observers have cited". (1.5)
54
+ - **Staccato drama / manufactured punchlines** — runs of short fragments
55
+ engineered for quotability. (3.8)
56
+ - **Em/en-dash density above the deliverable cap** (~2 per 500 words). (3.1)
57
+ - **Signposting** — "let's dive in", "here's what you need to know". (5.4)
58
+ - **Fake-candid openers** — "Honestly?", "Look,", "Here's the thing". (5.6)
59
+
60
+ ## Tier Low — only when over-used (never act on isolated hits)
61
+
62
+ Common in ordinary human writing; a tell only at high density.
63
+
64
+ - **Filler phrases** — "in order to", "due to the fact that". (5.1)
65
+ - **Hedge stacks** — "could potentially possibly". (5.2)
66
+ - **Mechanical boldface / bold-header vertical lists** — a tell in chat/post
67
+ prose; **house style in this repo's own docs** (see the scope note below). (3.2, 3.3)
68
+ - **Title Case Headings**, **curly quotes**, **generic upbeat endings**. (3.4, 3.6, 5.3)
69
+ - **Synonym cycling**, **false ranges**. (2.5, 2.6)
70
+
71
+ ## Scope note — deliverables, not repo docs
72
+
73
+ This severity axis governs **deliverable prose** (posts, articles, ghostwriter
74
+ output, on-request README sections). It does **not** apply to this repo's own
75
+ `docs/**` reference prose: em dashes and bold inline headers are the suite's
76
+ **intentional house style** there (council 2026-07-11, recorded on
77
+ `detect_ai_tells.ts` and `road-to-humanized-writing`). A humanize pass never
78
+ runs over repo documentation — see SKILL.md § When NOT to use.
79
+
80
+ ## Self-validation thresholds (U4 — deterministic self-check bounds)
81
+
82
+ Read after a rewrite; each bound is a **default, not a suite measurement**.
83
+ The deterministic subset is enforced by
84
+ [`detect_ai_tells.ts`](../../../scripts/detect_ai_tells.ts) when a runtime is
85
+ available; without one, the step-3 audit checks these by eye.
86
+
87
+ | Bound | Default | Source |
88
+ |---|---|---|
89
+ | Em/en-dash density | ≤ ~2 per 500 words | patterns.md 3.1 (CP1 parity with design-antipatterns) |
90
+ | Consecutive staccato fragments | ≤ 3 short declaratives in a row | patterns.md 3.8 |
91
+ | Uniform-shape bullets | merge a run of ≥ 4 identically-shaped `- **X:** …` bullets into prose or real sentences | patterns.md 3.3 |
92
+ | Hedge stack | ≤ 1 hedge per claim | patterns.md 5.2 |
93
+ | Stock-vocabulary density | ≤ 2 Tier-Medium AI-vocabulary words per 100 words | patterns.md 2.1 |
94
+
95
+ **Did the rewrite clear the flagged tells without introducing new ones?** A
96
+ re-run over already-clean prose is a no-op. If a bound is intentionally
97
+ exceeded by a voice fingerprint (a person who genuinely writes in dashes),
98
+ the fingerprint wins and the bound is suppressed for that pass.
99
+
100
+ ## Factual-integrity guard (U4)
101
+
102
+ Where a rewrite touches factual content — a number, date, name, quantity, or
103
+ claim — emit a flag rather than silently altering it:
104
+
105
+ ```
106
+ [VERIFY: <original span> → <rewritten span>]
107
+ ```
108
+
109
+ A humanizing pass changes *how* something is said, never *what is true*. The
110
+ flag makes any factual delta reviewable; the author confirms or reverts. A
111
+ rewrite that would drop or alter a fact without a `[VERIFY:]` flag is a
112
+ defect, not a style improvement.
@@ -0,0 +1,70 @@
1
+ # Humanizer worked fixtures
2
+
3
+ > On-demand fixtures for the [`humanizer`](../SKILL.md) skill — the
4
+ > behavioral cases the U2 (style/stance separation) and U5 (six-signal
5
+ > voice-match) verify clauses reference
6
+ > (road-to-ecosystem-harvest-prose-authenticity, Source I).
7
+
8
+ ## Fixture 1 — stance survives the style pass (U2)
9
+
10
+ A humanize pass lowers the AI signal; it must **not** soften a refusal or a
11
+ disagreement into agreement. Input takes a firm negative position with two
12
+ Tier-High tells (sycophancy + chat artifact + significance inflation):
13
+
14
+ **Before (AI-toned refusal):**
15
+
16
+ > Great question! Unfortunately, I'm not able to merge this to `main` right
17
+ > now — doing so would mark a pivotal moment that bypasses the review gate.
18
+ > Let me know if you'd like me to walk through the alternatives!
19
+
20
+ **After (humanized — tells gone, refusal intact):**
21
+
22
+ > I can't merge this to `main` — it would skip the review gate. The
23
+ > alternatives are to open a PR for review or to get an explicit override
24
+ > from a maintainer.
25
+
26
+ The rewrite removed the flattery, the chat artifact, and the significance
27
+ inflation, and **kept the "no"**. A rewrite that turned this into "I could
28
+ probably merge this if you'd like!" would have corrupted the stance — a
29
+ defect, not a humanize. Same rule for hedged-because-genuinely-uncertain
30
+ claims: uncertainty the author actually holds stays.
31
+
32
+ ## Fixture 2 — two voice samples, measurably different targets (U5)
33
+
34
+ The six-signal extraction produces distinct targets for distinct samples —
35
+ matching moves the draft toward the sample's values, never toward a generic
36
+ "human" vibe.
37
+
38
+ **Sample A — terse operator:**
39
+
40
+ > Deploy failed. Rolled back. Root cause: the migration locked the orders
41
+ > table for 40s. Fix lands tomorrow.
42
+
43
+ | Signal | Sample A target |
44
+ |---|---|
45
+ | Sentence-length rhythm | very short, uniform (4–8 words) |
46
+ | Vocabulary register | plain / operational |
47
+ | Punctuation habits | periods only; no dashes, no parentheticals |
48
+ | Hedging density | zero |
49
+ | Structural cadence | clipped declaratives, no lists |
50
+ | Idiom | incident-log shorthand ("root cause:", "lands") |
51
+
52
+ **Sample B — discursive essayist:**
53
+
54
+ > What struck me, reading the migration post-mortem again, was how ordinary
55
+ > the failure looked in advance — a lock we'd all seen a hundred times, on a
56
+ > table nobody thought of as hot until, suddenly, it was.
57
+
58
+ | Signal | Sample B target |
59
+ |---|---|
60
+ | Sentence-length rhythm | long, winding; one sentence per idea |
61
+ | Vocabulary register | reflective / literary |
62
+ | Punctuation habits | em dashes + nested clauses (fingerprint allows dashes) |
63
+ | Hedging density | moderate ("looked", "thought of as") |
64
+ | Structural cadence | single flowing paragraph |
65
+ | Idiom | narrative asides ("What struck me…") |
66
+
67
+ The two targets diverge on every axis — a draft matched to A is not a draft
68
+ matched to B. Sample B is also a case where the dash-density default is
69
+ **suppressed**: the fingerprint genuinely writes in dashes, so the fingerprint
70
+ wins (SKILL § voice precedence).
@@ -70,7 +70,13 @@ not reviewable — flag it and stop.
70
70
  - Does it introduce a new implicit assumption (ordering, timezone,
71
71
  encoding, locale)?
72
72
 
73
- ### 4. Verdict
73
+ ### 4. False-positive gate — restate before you flag
74
+
75
+ Before an issue enters the verdict, restate as one falsifiable sentence naming the concrete input or state that triggers it + wrong behavior that follows. Issue whose trigger you cannot name from the diff is not a finding — drop it (or return `revise` asking for missing context, never a speculative flag).
76
+
77
+ For 🔴 findings, run devil's-advocate pass before finalizing: actively try to refute (guard upstream in same diff? caller already validates? branch unreachable for claimed input?). Models systematically overrate severity — a 🔴 that survives refutation is credible; one never challenged is noise. Reject rationalizations "it looks wrong" (pattern-recognition is not analysis) and "flag it just in case" (over-reporting erodes the verdict's trust).
78
+
79
+ ### 5. Verdict
74
80
 
75
81
  | Verdict | When to return it |
76
82
  |---|---|
@@ -188,6 +188,16 @@ When generating Laravel code:
188
188
  - Do NOT use facades in service classes — use dependency injection.
189
189
  - Do NOT skip middleware for route groups that need authentication.
190
190
 
191
+ ## Known pitfalls
192
+
193
+ | Symptom | Root cause | Fix |
194
+ |---|---|---|
195
+ | A list endpoint fires hundreds of queries / is slow under load | N+1: a relation is accessed inside a loop without eager loading | Eager-load with `with('relation')`; enable `Model::preventLazyLoading()` in non-prod to catch it early |
196
+ | Config changes / new env vars have no effect in production | `config:cache` cached the old config, and `env()` returns `null` once config is cached | Read env only in `config/*`, use `config()` elsewhere; re-run `config:cache` on deploy |
197
+ | A form field silently isn't saved | The attribute isn't in `$fillable` and mass-assignment drops it | Add it to `$fillable` (or set it explicitly); never blanket-`$guarded = []` on user input |
198
+ | Queued jobs never run / run with stale code | No worker is running, or workers weren't restarted after a deploy so they hold the old code in memory | Run/supervise `queue:work`; `queue:restart` on every deploy |
199
+ | Timestamps or times are off by hours | Comparing/formatting a Carbon instance without honoring `config('app.timezone')` vs the DB's UTC storage | Store UTC; convert for display; set the app timezone explicitly, don't assume server local time |
200
+
191
201
  ## Gotcha
192
202
 
193
203
  - `env()` only works in config files — use `config()` everywhere else.
@@ -68,6 +68,41 @@ Walk the diff with the following gates:
68
68
  Cells without evidence block the launch — surface, do not
69
69
  hand-wave.
70
70
 
71
+ ### 2b. Epistemics block — the diagnostic report (contract-backed)
72
+
73
+ For a consumer-facing diagnostic (not just the merge decision), emit a
74
+ report per [`docs/contracts/prelaunch-diagnostics.md`](../../../docs/contracts/prelaunch-diagnostics.md)
75
+ (schema: `prelaunch-report.schema.json`). Rules:
76
+
77
+ - **Coverage backbone** — diagnose exactly the fixed area vocabulary
78
+ (`prelaunch-areas.yml`): auth · migrations · secrets · observability ·
79
+ rollback · agent-governance. No ad-hoc areas.
80
+ - **Every area gets one state:** `pass` (cited evidence REQUIRED) ·
81
+ `finding` (IDs listed) · `unknown` (honest default — **absence of
82
+ findings is Unknown, never an automatic Pass**) · `not-applicable`
83
+ (reason required).
84
+ - **Findings carry immutable IDs** (`AC-<AREA>-NNN`) — retitle freely,
85
+ never re-assign; the ID is the diff key across runs.
86
+ - **Verdict:** any open P0 → NOT ready, regardless of every other area;
87
+ any open P1 or a launch-gate area not at pass/N-A → NOT ready. Ready is
88
+ the residual state, never the default.
89
+ - **Questions section** — list the questions that would change the
90
+ diagnosis; the next run converts them into evidence or findings.
91
+ - Validate + verdict via
92
+ `./scripts-run src/scripts/prelaunch_diagnostics validate <report.json>`;
93
+ regression-gate against the committed baseline via
94
+ `… diff <baseline> <current> --ci` (contract § 4–6).
95
+
96
+ ### 2c. Fix loop (approval-gated, read-only diagnostic)
97
+
98
+ Rank open findings by severity, then launch-gate membership; propose the
99
+ **safest first approval batch** (reversible, small blast radius — explicitly
100
+ not the full backlog). Status vocabulary per finding: `open · fixed ·
101
+ accepted-risk · deferred-with-reason · suppressed-with-evidence ·
102
+ not-applicable` — everything except open/fixed carries a reason. Rescore
103
+ whenever evidence changes. The diagnostic itself never mutates the project;
104
+ fixes flow through the normal approval-gated engines.
105
+
71
106
  ### 3. Plan the rollout
72
107
 
73
108
  - **Mechanism** — flag, canary cohort, blue-green, immediate.
@@ -43,6 +43,27 @@ For each conflicted file:
43
43
  3. **Understand "theirs"** — what does the incoming branch intend?
44
44
  4. **Check if both changes are needed** — often both sides added different things.
45
45
 
46
+ ### 2b. Merge Resolution Plan — mandatory before touching a conflict
47
+
48
+ After reading both sides, write the plan; under `autonomous-execution` the
49
+ approval gate applies (a standing mandate states the plan and proceeds; an
50
+ interactive session surfaces it and waits):
51
+
52
+ ```
53
+ ## Merge Resolution Plan
54
+ - Conflicts: {N files / M hunks}
55
+ - Execution order: {dependency leaves first — a file nothing else imports
56
+ resolves before the files that import it}
57
+ | file | strategy | rationale |
58
+ |---|---|---|
59
+ - Decisions needed from the user: {semantic/deleted-modified items, or none}
60
+ - Validation: {targeted checks to run after resolution}
61
+ ```
62
+
63
+ **Backup before resolution:** every deleted-modified file is copied to a
64
+ temp path (`$TMPDIR/merge-backup-<ts>/<file>`) and the path noted in the
65
+ plan BEFORE any resolution touches it.
66
+
46
67
  ### 3. Resolution strategies
47
68
 
48
69
  | Situation | Strategy |
@@ -54,6 +75,8 @@ For each conflicted file:
54
75
  | Migration conflicts (same timestamp) | **Rename** — adjust timestamp to avoid collision |
55
76
  | Auto-generated files (OpenAPI spec, baselines) | **Regenerate** — resolve source, then regenerate the output |
56
77
  | Formatting-only conflicts | **Accept either** — then run quality tools to normalize |
78
+ | Import-block conflicts (both sides added imports) | **Keep both** — union the imports, drop duplicates, let the linter order them |
79
+ | Binary files (images, archives, compiled assets) | **Pick one side whole** — never splice; regenerate from source if generated, else ask which side wins |
57
80
 
58
81
  ### 4. File-type specific rules (stack-aware)
59
82
 
@@ -104,6 +127,13 @@ For each conflicted file:
104
127
  - Import statement ordering
105
128
  - Formatting-only differences
106
129
 
130
+ ### 5b. Resolution log — one line per conflict
131
+
132
+ Every resolved conflict gets a one-line explanation ("kept both — additive
133
+ imports"; "took theirs — lockfile regenerated") collected into the final
134
+ summary: the auditable log the reviewer reads instead of re-deriving each
135
+ hunk decision.
136
+
107
137
  ### 6. Verify after resolution
108
138
 
109
139
  After resolving ALL conflicts:
@@ -0,0 +1,101 @@
1
+ ---
2
+ model_tier: medium
3
+ name: pdf-tools
4
+ description: "Use when creating, merging, splitting, filling, or extracting from a PDF — library-per-task, output validated. Triggers on 'merge these PDFs', 'fill this PDF form', 'split the PDF', 'create a PDF'."
5
+ status: active
6
+ tier: senior
7
+ domain: process
8
+ compatibility: "Requires consumer-installed PDF libraries: pypdf (merge/split/rotate/encrypt/extract), reportlab (create), a form library for AcroForm fill; an OCR engine (e.g. tesseract) only for the OCR task. No LibreOffice dependency. Ships zero runtime in this package."
9
+ workspaces:
10
+ - agent-config-maintainer
11
+ packs:
12
+ - meta
13
+ ---
14
+
15
+ # pdf-tools
16
+
17
+ Wing-1 engineering skill for **PDF write/transform** — `markitdown` reads a PDF
18
+ to Markdown; this creates, merges, fills, and extracts. Ships zero runtime: the
19
+ agent drives libraries the consumer has. Pattern re-implementation only.
20
+
21
+ ## When to use
22
+
23
+ - "Merge / split / rotate / encrypt these PDFs."
24
+ - "Fill this PDF form (AcroForm) with these values."
25
+ - "Create a PDF from this content."
26
+ - "Extract the text / tables from this PDF" (structured extraction beyond `markitdown`'s Markdown).
27
+ - "OCR this scanned PDF."
28
+
29
+ Do NOT use for: PDF → Markdown ingestion (`markitdown`); Word (`docx-authoring`).
30
+
31
+ ## Procedure
32
+
33
+ ### 1. Library per task — do not force one tool
34
+
35
+ | Task | Library path |
36
+ |---|---|
37
+ | merge / split / rotate / encrypt | pypdf — page-level operations, no rendering |
38
+ | create from content | reportlab (canvas / platypus) |
39
+ | form-fill (AcroForm) | a form-aware library; map field name → value, then flatten if the form must not be re-editable |
40
+ | text / table extraction | a text-layer extractor; tables need a layout-aware pass, not naive text |
41
+ | OCR (scanned/image PDF) | an OCR engine over rasterized pages — ONLY when there is no text layer |
42
+
43
+ ### 2. Decide flatten-or-keep on form fills
44
+
45
+ A filled AcroForm stays editable unless flattened. Flatten when the PDF is a
46
+ final artifact (an invoice, a signed form); keep fields when the recipient must
47
+ edit further. State which you chose — a silently-editable "final" form is a
48
+ correctness bug.
49
+
50
+ ### 3. Validate — assert output validity, do not trust the write
51
+
52
+ 1. Re-open the output with pypdf; assert `len(reader.pages)` matches the expected count (merge = sum; split = 1 per part).
53
+ 2. For a form-fill: read back one field value (pre-flatten) or extract the rendered text (post-flatten) and assert the value is present.
54
+ 3. For create: assert the file opens and page 1 carries expected text.
55
+
56
+ ## Output format
57
+
58
+ 1. The output PDF path(s).
59
+ 2. Validation: page count matches expected ✅, read-back value/text present ✅.
60
+ 3. For fills: flatten decision stated (flattened / kept-editable + why).
61
+
62
+ ## Gotcha
63
+
64
+ **OCR is a last resort, not the default extraction path.** Running OCR over a
65
+ PDF that already has a text layer produces worse output (OCR errors) than the
66
+ existing text and burns time. Check for a text layer first; OCR only when it is
67
+ genuinely absent.
68
+
69
+ - **Editable "final" form:** a filled AcroForm left un-flattened ships as a "signed invoice" the recipient can silently alter → flatten when the artifact is final.
70
+
71
+ ## Do NOT
72
+
73
+ - Do NOT bundle a Python toolkit in this package — drive the consumer's libraries (zero-runtime posture).
74
+ - Do NOT OCR a PDF that has a text layer.
75
+ - Do NOT leave a "final" filled form editable without saying so.
76
+ - Do NOT claim success on "file written"; claim it only after the re-open + page-count assertion.
77
+
78
+ ## Related Skills
79
+
80
+ **WHEN to use this**
81
+
82
+ - The task creates, merges, splits, rotates, encrypts, or form-fills a PDF.
83
+ - Structured text/table extraction beyond `markitdown`'s Markdown, or OCR of a scanned PDF.
84
+
85
+ **WHEN NOT to use this**
86
+
87
+ - PDF → Markdown ingestion → [`markitdown`](../markitdown/SKILL.md).
88
+ - Word documents → [`docx-authoring`](../docx-authoring/SKILL.md); spreadsheets → [`spreadsheet-authoring`](../spreadsheet-authoring/SKILL.md).
89
+
90
+ ## When the agent should load this
91
+
92
+ - "Merge / split / rotate these PDFs."
93
+ - "Fill this PDF form."
94
+ - "Create a PDF from this content."
95
+ - "Extract the tables from this PDF / OCR this scan."
96
+
97
+ ## Output
98
+
99
+ 1. **Output PDF(s)** — the path(s). Cite as `pdf-output`.
100
+ 2. **Validation receipt** — page count matches expected ✅, read-back value/text present ✅. Cite as `pdf-validation`.
101
+ 3. **Fill decision** — present on form-fills: flattened / kept-editable + why. Cite as `pdf-fill-decision`.
@@ -0,0 +1,15 @@
1
+ {
2
+ "skill": "quality-tools",
3
+ "_calibration": "Seed for eval-schema v2 (ecosystem-harvest skill-quality-gates Phase 2). tool-choice + trajectory assertions are trace-gated: pass:null (manual-pending) in CI until a recorded tool-trace.json exists.",
4
+ "scenarios": [
5
+ {
6
+ "id": "runs-project-pinned-tools",
7
+ "prompt": "Fix the failing lint on the changed files.",
8
+ "environment": "a project whose pinned quality CLI is defined in its task runner",
9
+ "assertions": [
10
+ { "kind": "tool-choice", "must_use": ["bash"], "must_not_use": [] },
11
+ { "kind": "trajectory_budget", "n": 8 }
12
+ ]
13
+ }
14
+ ]
15
+ }