@event4u/agent-config 2.11.0 → 2.13.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 (75) hide show
  1. package/.agent-src/commands/council/analysis.md +142 -0
  2. package/.agent-src/commands/council/debate.md +129 -0
  3. package/.agent-src/commands/council/default.md +8 -0
  4. package/.agent-src/commands/council/design.md +16 -12
  5. package/.agent-src/commands/council/optimize.md +16 -15
  6. package/.agent-src/commands/council/pr.md +12 -12
  7. package/.agent-src/commands/council.md +48 -2
  8. package/.agent-src/personas/advisors/contrarian.md +95 -0
  9. package/.agent-src/personas/advisors/executor.md +99 -0
  10. package/.agent-src/personas/advisors/expansionist.md +98 -0
  11. package/.agent-src/personas/advisors/first-principles.md +98 -0
  12. package/.agent-src/personas/advisors/outsider.md +102 -0
  13. package/.agent-src/rules/copilot-routing.md +19 -0
  14. package/.agent-src/rules/devcontainer-routing.md +20 -0
  15. package/.agent-src/rules/laravel-routing.md +20 -0
  16. package/.agent-src/rules/symfony-routing.md +20 -0
  17. package/.agent-src/skills/ai-council/SKILL.md +180 -2
  18. package/.agent-src/skills/canvas-design/SKILL.md +132 -0
  19. package/.agent-src/skills/canvas-design/evals/triggers.json +16 -0
  20. package/.agent-src/skills/copilot-config/SKILL.md +1 -1
  21. package/.agent-src/skills/devcontainer/SKILL.md +1 -1
  22. package/.agent-src/skills/doc-coauthoring/SKILL.md +129 -0
  23. package/.agent-src/skills/doc-coauthoring/evals/triggers.json +16 -0
  24. package/.agent-src/skills/laravel/SKILL.md +1 -1
  25. package/.agent-src/skills/project-analysis-core/SKILL.md +1 -1
  26. package/.agent-src/skills/project-analyzer/SKILL.md +1 -1
  27. package/.agent-src/skills/skill-writing/SKILL.md +101 -16
  28. package/.agent-src/skills/sql-writing/SKILL.md +1 -1
  29. package/.agent-src/skills/symfony-workflow/SKILL.md +1 -1
  30. package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  31. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  32. package/.claude-plugin/marketplace.json +5 -1
  33. package/AGENTS.md +1 -1
  34. package/CHANGELOG.md +78 -0
  35. package/CONTRIBUTING.md +5 -0
  36. package/README.md +3 -3
  37. package/config/agent-settings.template.yml +5 -84
  38. package/docs/architecture/multi-tool-projection.md +53 -0
  39. package/docs/architecture/{compression.md → source-projection.md} +21 -3
  40. package/docs/architecture.md +6 -6
  41. package/docs/catalog.md +21 -11
  42. package/docs/contracts/adr-architectural-consensus-mechanism.md +67 -0
  43. package/docs/contracts/adr-level-6-productization.md +2 -2
  44. package/docs/contracts/ai-council-config.md +186 -0
  45. package/docs/contracts/command-clusters.md +57 -1
  46. package/docs/contracts/multi-tool-projection-fidelity.md +109 -0
  47. package/docs/getting-started.md +2 -2
  48. package/package.json +1 -1
  49. package/scripts/_archive/README.md +59 -0
  50. package/scripts/ai_council/_default_prices.py +10 -1
  51. package/scripts/ai_council/advisors.py +148 -0
  52. package/scripts/ai_council/clients.py +189 -4
  53. package/scripts/ai_council/config.py +368 -0
  54. package/scripts/ai_council/consensus.py +290 -0
  55. package/scripts/ai_council/orchestrator.py +634 -16
  56. package/scripts/ai_council/prompts.py +335 -0
  57. package/scripts/check_compressed_paths.py +6 -1
  58. package/scripts/check_references.py +25 -0
  59. package/scripts/ci_time_ratio.py +168 -0
  60. package/scripts/council_cli.py +1007 -32
  61. package/scripts/measure_projection_bytes.py +159 -0
  62. package/scripts/measure_roadmap_trajectory.py +112 -0
  63. package/scripts/probe_projection_fidelity.py +202 -0
  64. package/scripts/run_skill_evals.py +185 -0
  65. package/scripts/schemas/skill.schema.json +4 -0
  66. package/scripts/score_skill_selection.py +198 -0
  67. package/scripts/skill_collision_clusters.py +162 -0
  68. package/scripts/skill_linter.py +71 -1
  69. /package/scripts/{_backfill_skill_domains.py → _archive/_backfill_skill_domains.py} +0 -0
  70. /package/scripts/{_bootstrap_tier_frontmatter.py → _archive/_bootstrap_tier_frontmatter.py} +0 -0
  71. /package/scripts/{_p43_bodies.py → _archive/_p43_bodies.py} +0 -0
  72. /package/scripts/{_p43_compress.py → _archive/_p43_compress.py} +0 -0
  73. /package/scripts/{_p4_migrate.py → _archive/_p4_migrate.py} +0 -0
  74. /package/scripts/{_phase2_shim_helper.py → _archive/_phase2_shim_helper.py} +0 -0
  75. /package/scripts/{_pilot_council_question.py → _archive/_pilot_council_question.py} +0 -0
@@ -292,6 +292,65 @@ NEVER ships the host verdict as council output. Provider attribution
292
292
  stays visible in the per-member sections; host verdicts stay
293
293
  attributed to the host.
294
294
 
295
+ ## Synthesis templates (lens-aware)
296
+
297
+ The **Convergence / Divergence** slot in `council:render` output is
298
+ populated with a lens-specific synthesis prompt. The host agent reads
299
+ this prompt and writes the summary in the shape it dictates. The five
300
+ templates live in `scripts/ai_council/prompts.py::_SYNTHESIS_TABLE`
301
+ and are exposed via `synthesis_template(mode)`.
302
+
303
+ **R4 Q4 split** — decision lenses get a structured Karpathy-style
304
+ template; creative lenses stay open-ended prose (bare slot):
305
+
306
+ | Lens | Class | Synthesis sections |
307
+ |---|---|---|
308
+ | `default` | decision | Agreement · Clashes · Blind spots · Recommendation · Next step |
309
+ | `pr` | decision | Consensus · Conflicts · Must-fix before merge · Recommendation |
310
+ | `analysis` | decision | Top-10 by consensus · Supporting · Outliers |
311
+ | `design` | creative | *(no template — open prose passthrough)* |
312
+ | `optimize` | creative | *(no template — open prose passthrough)* |
313
+
314
+ Input modes (`prompt` / `roadmap` / `diff` / `files`) inherit the
315
+ `default` decision template — they are bundling shapes, not lenses.
316
+
317
+ **Source citations:**
318
+ * Template shape — Round 2 council verdict
319
+ (`agents/council-sessions/2026-05-14-ai-council-redesign/round-1.md`,
320
+ Opus's lens-adaptive synthesis proposal).
321
+ * Decision/creative split — Round 4 Q4 verdict
322
+ (`agents/council-sessions/2026-05-14-ai-council-redesign/round-3-responses.json`).
323
+ R4 reframed `optimize` as creative because perf trade-offs resist
324
+ pre-templated shape — Performance-wins / Trade-offs /
325
+ Implementation-order is too rigid for the variety of optimize-lens
326
+ artefacts. R4 reframed `design` for the same reason — design
327
+ critiques are inherently narrative.
328
+
329
+ ### `--prose-synthesis` escape hatch (R4 Q4)
330
+
331
+ Both `council:run` and `council:render` accept symmetric escape-hatch
332
+ flags on top of the lens table:
333
+
334
+ * `--prose-synthesis` — force creative-lens passthrough (bare slot)
335
+ regardless of lens. Use when the user on `default`/`pr`/`analysis`
336
+ prefers a narrative recommendation over the structured template.
337
+ * `--no-prose-synthesis` — force the `default` structured template
338
+ even on a creative lens. Use when a `design` or `optimize` artefact
339
+ has a one-shot need for Karpathy-style structure.
340
+
341
+ The flag is mutually exclusive — picking one disables the other on
342
+ the same invocation. When `council:run` records either flag in the
343
+ output JSON, `council:render` honours it unless the renderer is
344
+ called with an explicit flag of its own.
345
+
346
+ ### Renderer lens resolution
347
+
348
+ `council:render <responses.json>` resolves the active lens in this
349
+ order: explicit `--prompt-mode` flag > `prompt_mode` field in the
350
+ payload > `mode` field in the payload > `None` (default decision
351
+ template). The `--prose-synthesis` / `--no-prose-synthesis` flag
352
+ overrides the table regardless of how the lens resolved.
353
+
295
354
  ## Do NOT
296
355
 
297
356
  - Do NOT paraphrase council output into the host agent's voice — strip
@@ -435,8 +494,8 @@ prompt as `<original artefact> + <prior round, anonymised>` so each
435
494
  member can refine, agree, or push back on the previous critique
436
495
  without seeing which provider produced which point.
437
496
 
438
- The default round count comes from `ai_council.min_rounds` in
439
- `.agent-settings.yml` (default `2` so members critique each other
497
+ The default round count comes from `defaults.min_rounds` in
498
+ `agents/.ai-council.yml` (default `2` so members critique each other
440
499
  at least once before convergence). The host agent does **not** ask
441
500
  "how many rounds?" when the requested count is `<= min_rounds` —
442
501
  the settings owner already made that decision. Ask only when a
@@ -516,6 +575,121 @@ internal "more feedback" follow-up loop (1 / 2 / 3 menu) is
516
575
  **inside** a single member's chat thread and is orthogonal to the
517
576
  orchestrator-level rounds.
518
577
 
578
+ ### `/council debate` sub-command (progressive disclosure)
579
+
580
+ `/council debate <artefact> [--rounds N] [--continue-as-debate <session>]`
581
+ runs an **interactive** multi-round critique with a confirmation gate
582
+ between every round so the user can stop the spend at any point.
583
+
584
+ | Property | Behaviour |
585
+ |---|---|
586
+ | Round flow | Same orchestrator as `rounds:N` (`run_debate()`), but each round prints its responses then pauses on a y/n prompt before launching the next round. |
587
+ | Cost gate | After every round the CLI prints `Spent so far: $X · Next round: ~$Y · Cap: $Z`. `n` exits cleanly with partial results; `y` continues. |
588
+ | Hard cap | If the projected next-round cost would breach `max_total_usd`, `run_debate()` raises `DebateCapExceeded` and the CLI exits with the partial transcript. No silent overrun. |
589
+ | `--continue-as-debate` | Seeds round 1 from an existing `/council default` (or analysis lens) session. No round-1 API calls are billed; round 2+ run normally. Member list must match. |
590
+ | Session files | One file per round under `agents/council-sessions/<slug>/debate-round-NN.md`. |
591
+ | Anonymisation | Identical to `rounds:N`. The continue-as-debate path also anonymises the seeded round-1 responses when building the round-2 prompt. |
592
+
593
+ Use this when the artefact is genuinely contentious and the user
594
+ wants to control depth interactively. For a fire-and-forget
595
+ multi-round run, prefer `consult(..., rounds=N)` or `--rounds N` on
596
+ `/council default`.
597
+
598
+
599
+ ## Karpathy peer-review (opt-in)
600
+
601
+ After the final deliberation round, an optional **anonymous peer-review
602
+ pass** lets each member critique the *other* members' responses for
603
+ blind spots before synthesis. Inspired by Andrej Karpathy's "ask the
604
+ strongest models to review each other anonymously" pattern; see his
605
+ [talks / threads on inter-model critique](https://karpathy.ai/) and the
606
+ internal verdict in
607
+ `agents/council-sessions/2026-05-14-ai-council-redesign/round-2.md`
608
+ (R2 split: one approve-as-flag, one reject-as-default → opt-in only).
609
+
610
+ Pipeline order when every feature is active:
611
+
612
+ ```
613
+ deliberation rounds → peer-review → consensus-scoring → synthesis
614
+ ```
615
+
616
+ Activation — two equivalent paths:
617
+
618
+ * CLI: `--peer-review` on `council:estimate` or `council:run`.
619
+ * Config: `ai_council.peer_review.enabled: true` in
620
+ `agents/.ai-council.yml`. Default is `false`.
621
+
622
+ Mechanics:
623
+
624
+ 1. The final deliberation round's outputs are anonymised into
625
+ `Response-A`, `Response-B`, … in stable input order. Provider /
626
+ model identity is stripped (Iron-Law neutrality holds); empty or
627
+ errored deliberation responses are skipped.
628
+ 2. Each member receives an N−1 view (its own response filtered out)
629
+ plus the Karpathy prompt: *strongest response*, *weakest blind
630
+ spot*, *what did everyone miss*, *refinement*.
631
+ 3. The N critiques flow back into synthesis through a
632
+ "Peer-Review-Surfaced Blind Spots" addendum on the lens template.
633
+ 4. **Advisor preserve-persona (R4 Q3, hard-coded):** when the
634
+ deliberation was an advisor-mode run (Phase 6), anonymisation
635
+ strips provider identity but **preserves the advisor persona
636
+ label**. Peer-review renders as `Response A (Contrarian)`, never
637
+ `Response A (Anthropic Opus)`. Plain-member runs strip identity
638
+ entirely.
639
+
640
+ Cost — adds exactly N billable calls (one per member) at the same
641
+ per-call cost as a deliberation call. The `council:estimate` table
642
+ surfaces the delta as a `+peer-review: +N calls (~+$X)` row.
643
+
644
+ Needs ≥ 2 distinct deliberation outputs; below that the round is a
645
+ no-op and nothing extra is billed. Self-review is structurally
646
+ impossible — a member never sees its own response.
647
+
648
+ ## Thinking-style advisors (replace-mode)
649
+
650
+ Phase 6 introduces five **advisor personas** the council adopts in
651
+ *replace-mode*: an enabled advisor substitutes its bound member's
652
+ plain call with the same provider running the advisor's persona
653
+ prompt. Total call count stays the same — only the system prompt
654
+ swaps.
655
+
656
+ | Advisor | Default bound member | Focus |
657
+ |---|---|---|
658
+ | **Contrarian** | `anthropic` | strongest counterargument, hidden assumptions |
659
+ | **First-Principles** | `anthropic` | strip metaphor, derive from physics / math / cost |
660
+ | **Expansionist** | `openai` | adjacent opportunities, second-order effects |
661
+ | **Outsider** | `openai` | naive-but-sharp questions, beginner's-mind probes |
662
+ | **Executor** | `anthropic` | what ships this quarter, what blocks delivery |
663
+
664
+ Activation — edit `agents/.ai-council.yml` and flip the advisor's
665
+ `enabled: true`. Optional `model: <name>` overrides the bound
666
+ member's default model. An advisor referencing a disabled member
667
+ fails closed at config load — never silently skipped.
668
+
669
+ ```yaml
670
+ advisors:
671
+ contrarian:
672
+ enabled: true # ← swap anthropic's plain call for contrarian
673
+ member: anthropic
674
+ # model: claude-opus-4 # optional pin
675
+ ```
676
+
677
+ `council:estimate` surfaces every active swap on a dedicated line
678
+ above the cost table:
679
+
680
+ ```
681
+ council:estimate · mode=prompt · members=2 (billable=2)
682
+ advisor: Contrarian on anthropic via claude-sonnet-4-5
683
+ anthropic/claude-sonnet-4-5: ~991 in + 256 out = $0.0068
684
+ openai/gpt-4o: ~208 in + 256 out = $0.0031
685
+ ```
686
+
687
+ Cost-bounded — replace-mode never adds calls. The persona prompt is
688
+ larger than plain (~1k extra input tokens per swap); output tokens
689
+ and call count are unaffected. Peer-review preserves the advisor
690
+ label while stripping provider identity (`Response A (Contrarian)`).
691
+ Two enabled advisors on the same member is a config error.
692
+
519
693
  ## See also
520
694
 
521
695
  - `/council` command — the user-facing entry point.
@@ -523,6 +697,10 @@ orchestrator-level rounds.
523
697
  network, no spend, but no diversity of weights either).
524
698
  - `scripts/ai_council/prompts.py` — neutrality preamble + per-mode
525
699
  system prompts.
700
+ - `scripts/ai_council/advisors.py` — replace-mode planning + persona
701
+ resolution.
526
702
  - `scripts/ai_council/bundler.py` — redaction pattern set + size
527
703
  guard.
528
704
  - `docs/customization.md` § `ai_council.*` — settings reference.
705
+ - `docs/contracts/ai-council-config.md` § advisors — schema + precedence
706
+ contract.
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: canvas-design
3
+ description: "Use when creating static visual art — posters, marketing visuals, brand assets, PDF/PNG design pieces — even if the user just says 'design a poster' or 'mach uns ein Visual'."
4
+ source: package
5
+ domain: product
6
+ ---
7
+
8
+ # canvas-design
9
+
10
+ ## When to use
11
+
12
+ Use when:
13
+
14
+ * User asks for a poster, marketing visual, brand asset, social-media graphic, cover art
15
+ * Output is a static `.pdf` or `.png` design piece (not a UI mockup, not a wireframe)
16
+ * The deliverable is the visual artifact itself
17
+
18
+ Do NOT use when:
19
+
20
+ * Designing a UI component or app screen → `fe-design`, `ui-component-architect`, `react-shadcn-ui`, `blade-ui`, `flux`
21
+ * Tailwind / shadcn / Flux component styling → `tailwind-engineer`
22
+ * Brand voice / tone definition → `voice-and-tone-design`
23
+ * Release announcement copy → `release-comms`
24
+
25
+ ## Goal
26
+
27
+ Produce one finished visual artifact (`.pdf` or `.png`) backed by an original design philosophy. Both files ship together.
28
+
29
+ The work emphasizes: visual expression over text · original direction (no artist mimicry) · composition that looks deliberated, not generated.
30
+
31
+ ## Preconditions
32
+
33
+ * Brief from user (theme, intent, occasion, target medium, size constraint)
34
+ * Output directory: `agents/design-assets/{slug}/` — create if missing
35
+ * Image-generation tooling available (Python with Pillow / matplotlib / cairo, SVG → PNG conversion, or whatever the environment ships)
36
+
37
+ ## Procedure
38
+
39
+ ### 1. Brief intake
40
+
41
+ One numbered-options block surfaces: theme / occasion · target medium + dimensions (web 1200×630? print A3? square 1080×1080?) · color & mood direction · hard constraints (logo required? color to avoid?) · single page or series.
42
+
43
+ If the brief says "in the style of [living artist]", flag the copyright risk and propose an original direction.
44
+
45
+ ### 2. Design philosophy
46
+
47
+ Author `agents/design-assets/{slug}/philosophy.md` — 4–6 paragraphs naming:
48
+
49
+ * **Movement name** — 1–2 words ("Chromatic Silence", "Brutalist Joy", "Analog Meditation")
50
+ * **Visual language** — how the philosophy manifests through space, form, color, scale, composition, rhythm
51
+ * **Text role** — sparse, accent only; never paragraphs
52
+ * **Craftsmanship anchor** — visible deliberation, not template polish
53
+
54
+ Stay aesthetically specific but leave interpretive room for the canvas execution.
55
+
56
+ ### 3. Subtle conceptual thread
57
+
58
+ Identify a single niche reference embedded in the work — not announced, woven into form / color / composition. A jazz musician quoting another song: those who know catch it, others enjoy the music.
59
+
60
+ Document it in `philosophy.md` under `## Subtle reference`.
61
+
62
+ ### 4. Canvas execution
63
+
64
+ Produce `agents/design-assets/{slug}/{slug}.{pdf|png}`:
65
+
66
+ 1. Pick the execution tool (Pillow, matplotlib, SVG, or framework-native)
67
+ 2. Limited palette — 2–5 colors, intentional and cohesive
68
+ 3. Geometric or organic forms per philosophy
69
+ 4. Text — sparse, design-forward, integrated as visual element; never overlapping, never falling off canvas
70
+ 5. Margins — every element contained, breathing room
71
+ 6. Repeating patterns, layered elements, systematic markers as the philosophy permits
72
+
73
+ ### 5. Refinement pass
74
+
75
+ After the first render, **do not add more graphics**. Refine what exists:
76
+
77
+ * Tighten composition cohesion
78
+ * Adjust spacing, alignment, color balance
79
+ * Replace fonts if they fight the philosophy
80
+ * Remove any element that doesn't earn its place
81
+
82
+ Render the refined version. Overwrite the artifact.
83
+
84
+ ### 6. Multi-page (optional)
85
+
86
+ If the user requests a series, treat each page as a story beat — distinct but philosophically continuous. Bundle as a multi-page PDF or numbered PNGs (`{slug}-01.png`, `{slug}-02.png`, …).
87
+
88
+ ### 7. Validation
89
+
90
+ * `philosophy.md` exists with movement name + 4–6 paragraphs + subtle-reference section
91
+ * Artifact file exists at the expected path
92
+ * Open and verify: nothing falls off canvas, no overlapping text, palette ≤ 5 distinct colors, every element has margin
93
+ * Original work — no traceable artist-style copy
94
+
95
+ ## Output format
96
+
97
+ 1. `agents/design-assets/{slug}/philosophy.md`
98
+ 2. `agents/design-assets/{slug}/{slug}.{pdf|png}` (or numbered series for multi-page)
99
+ 3. One concluding line stating both file paths
100
+
101
+ ## Gotcha
102
+
103
+ * **No artist mimicry** — copying a living artist's signature style is copyright risk and breaks the original-work mandate. Propose an original direction.
104
+ * **Text discipline** — most pieces fail because text creeps in as paragraphs. Words are visual accents, not explanation.
105
+ * **One canvas** — single page unless multi-page is explicitly requested.
106
+ * **Font availability** — the environment may not ship your target font. Pick a fallback before render time, or download into the working dir first.
107
+ * **Output location** — always `agents/design-assets/{slug}/`. Never write binary artifacts to the repo root or to source-of-truth dirs.
108
+ * **Refinement loop is real** — first render is the draft, not the deliverable.
109
+
110
+ ## Frugality Standards
111
+
112
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md).
113
+
114
+ * Per the default-terse rule, `philosophy.md` opens with the movement name — no "In this document I will describe …" frame.
115
+ * Per the cheap-question check, numbered-options blocks only at brief intake (where consequences differ).
116
+ * Per the post-action summary suppression, ship the files; skip an "## Artist statement" wrapper.
117
+
118
+ **Pre-save self-check:**
119
+
120
+ 1. Does `philosophy.md` carry filler superlatives ("absolute pinnacle", "transcendent")?
121
+ 2. Does the canvas include explanatory text instead of visual-accent text?
122
+ 3. Are more than 5 distinct colors present without justification in the philosophy?
123
+ 4. Is the subtle reference announced explicitly in the visual, breaking the "those who know" principle?
124
+
125
+ ## Do NOT
126
+
127
+ * Copy a living artist's signature visual style
128
+ * Generate cartoony / amateur / template-store output
129
+ * Add paragraphs of text — visuals communicate, words accent
130
+ * Skip the philosophy file — the artifact without it is just an image
131
+ * Skip the refinement pass
132
+ * Write binary artifacts to the repo root or to source-of-truth dirs
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "canvas-design",
3
+ "description": "5 should-trigger + 5 should-not-trigger queries. Should-trigger asks for static visual art (poster / cover / marketing visual). Should-not-trigger near-misses share design vocabulary but route elsewhere (fe-design, tailwind-engineer, voice-and-tone-design, release-comms).",
4
+ "queries": [
5
+ {"q": "Need a launch poster for next week's release announcement — A3 print, minimal style", "trigger": true},
6
+ {"q": "Design us a social-media visual for the v3.0 release, 1080x1080 for IG", "trigger": true},
7
+ {"q": "Mach mir bitte ein Cover-Bild für den Talk nächste Woche, 1200x630 fürs Web", "trigger": true},
8
+ {"q": "We want a single-page PDF brand visual for the conference booth handout", "trigger": true},
9
+ {"q": "Build a minimalist poster for the team-offsite invitation, square format", "trigger": true},
10
+ {"q": "Design a new component library for our app — buttons, inputs, cards", "trigger": false},
11
+ {"q": "What color palette should we standardize on in tailwind.config.js?", "trigger": false},
12
+ {"q": "Refactor the brand voice doc — make it less corporate and more direct", "trigger": false},
13
+ {"q": "Draft the release announcement blog post for the v3.0 launch", "trigger": false},
14
+ {"q": "Help me wireframe the new onboarding flow — three screens, mobile-first", "trigger": false}
15
+ ]
16
+ }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: copilot-config
3
- description: "Use when configuring GitHub Copilot — copilot-instructions.md, PR review patterns, output optimization even when the user just says 'tune Copilot' or 'why is Copilot commenting on X'."
3
+ description: "Tune the GitHub Copilot AI `copilot-instructions.md`, PR-review patterns, suggestion behavior, output verbosity. NOT for dev-environment setup (use `devcontainer`)."
4
4
  source: package
5
5
  domain: process
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: devcontainer
3
- description: "Use when configuring DevContainers or GitHub Codespaces — devcontainer.json, custom images, secrets, VS Code features even when the user just says 'why does my Codespace not start'."
3
+ description: "Wire up DevContainers / GitHub Codespaces — `devcontainer.json`, container images, secrets, VS Code features, port forwarding. NOT for tuning Copilot itself (use `copilot-config`)."
4
4
  source: package
5
5
  domain: devops
6
6
  ---
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: doc-coauthoring
3
+ description: "Use when co-authoring a PRD, design doc, RFC, decision doc, or technical spec — 3-stage flow (context → section-by-section → reader-test) — even if the user just says 'help me write this spec'."
4
+ source: package
5
+ domain: process
6
+ ---
7
+
8
+ # doc-coauthoring
9
+
10
+ ## When to use
11
+
12
+ Use this skill when:
13
+
14
+ * User starts a substantial writing task — PRD, RFC, design doc, decision doc, technical spec, proposal
15
+ * User says "help me write this up", "draft a proposal", "we need a doc for X"
16
+ * The output is a structured prose document the user will own and ship
17
+
18
+ Do NOT use when:
19
+
20
+ * Authoring agent docs / module docs / AGENTS.md → `agent-docs-writing`
21
+ * Writing a README → `readme-writing` / `readme-writing-package`
22
+ * Writing an ADR (process is fixed, no co-authoring loop) → `adr-create`
23
+ * Code documentation, inline comments, docstrings
24
+
25
+ ## Goal
26
+
27
+ Move from a fuzzy ask to a complete document the user owns, by:
28
+
29
+ 1. Closing the context gap before drafting
30
+ 2. Building each section through brainstorm → curate → draft → refine
31
+ 3. Testing the draft with a fresh-context reader before declaring done
32
+
33
+ ## Preconditions
34
+
35
+ * User explicitly wants a document (not a quick answer)
36
+ * `save-file` and `str-replace-editor` available
37
+ * Target path and filename agreed up front
38
+
39
+ ## Procedure
40
+
41
+ ### 0. Inspect existing material
42
+
43
+ Before any drafting, **inspect** the landscape: search `agents/` and
44
+ the repo for related prior docs (`grep -ril "{topic}" agents/ docs/`),
45
+ check the user's named ticket / thread for context, and confirm no
46
+ in-flight document already covers the ask. If a near-duplicate exists,
47
+ surface it and ask whether to extend or supersede.
48
+
49
+ ### 1. Context gathering
50
+
51
+ Close the gap between what the user knows and what you know.
52
+
53
+ 1. **Meta-questions** — one numbered-options block (per `user-interaction`): doc type? primary audience? desired impact? template/format constraint? existing related docs / threads / tickets?
54
+ 2. **Info dump** — invite stream-of-consciousness context: plain text, paths to existing docs, ticket links, thread paste.
55
+ 3. **Clarifying questions** — 5–10 numbered questions to fill remaining gaps. User answers shorthand (`1: yes`, `2: see #channel`, `3: backwards-compat reason`).
56
+ 4. **Exit gate** — ask "ready to draft, or more context?" — wait for confirmation. Do not start scaffolding the file until the user confirms.
57
+
58
+ ### 2. Refinement & structure
59
+
60
+ Build the document section by section.
61
+
62
+ 1. **Agree on structure** — propose 3–5 sections based on doc type and context. Ask user to confirm or adjust.
63
+ 2. **Scaffold the file** — use `save-file` to create the doc with placeholder text per section (`[To be written]`). One commit-equivalent action; review with the user before populating.
64
+ 3. **Pick the starting section** — suggest the one with the most unknowns (usually the core decision / proposal). Never start with the summary.
65
+ 4. **Per-section loop** — repeat for each section:
66
+ - **Clarifying questions** — 5–10 numbered questions about what this section covers
67
+ - **Brainstorm** — 5–20 numbered options of what could go in. Offer "more options?" at the end.
68
+ - **Curation** — user picks: `keep 1,4,7,9` / `remove 3 (dupes 1)` / `combine 11+12`. Parse freeform feedback if the user gives `"looks good but ..."`.
69
+ - **Gap check** — "anything missing for this section?"
70
+ - **Draft** — `str-replace-editor` to replace the placeholder. Never reprint the whole doc.
71
+ - **Iterate** — user feedback in, surgical edits out. After 3 iterations with no substantial change, ask "anything to remove without losing value?"
72
+ - **Section exit gate** — "section done — move to next?"
73
+ 5. **Whole-doc review at 80% complete** — re-read the full file. Surface contradictions, redundancy, generic filler. Apply final edits.
74
+
75
+ ### 3. Reader test
76
+
77
+ Verify the doc works for someone without your context.
78
+
79
+ 1. **Predict reader questions** — generate 5–10 questions a real reader would ask after reading.
80
+ 2. **Run the test** — pick one:
81
+ - **`ai-council` available** → invoke with the doc + predicted questions; treat each council member as a fresh reader.
82
+ - **Otherwise** → instruct the user to open a fresh Claude / ChatGPT, paste the doc, ask the questions one by one. Capture answers.
83
+ 3. **Additional fresh-reader checks** (always): "what is ambiguous?" · "what context does this doc assume readers have?" · "internal contradictions?"
84
+ 4. **Report** — surface where the fresh reader got it wrong, where assumptions break.
85
+ 5. **Loop back to Stage 2** for problematic sections until the fresh reader answers cleanly and surfaces no new gaps.
86
+
87
+ ### 4. Handover
88
+
89
+ 1. Final read-through by the user (they own the doc).
90
+ 2. Verify facts, links, technical details.
91
+ 3. Confirm intended impact achieved.
92
+ 4. Surface the final file path. Done.
93
+
94
+ ## Output format
95
+
96
+ 1. Target document file at the agreed path (e.g. `agents/proposals/{slug}.md`)
97
+ 2. One concluding line stating "Doc complete at {path} — ready for owner review"
98
+
99
+ ## Gotcha
100
+
101
+ * **One question per turn** (Iron Law from `ask-when-uncertain`) — never bundle clarifying + brainstorm + curate prompts in one message.
102
+ * **Never reprint the full doc** during iteration — always use `str-replace-editor`. Reprinting wastes tokens and creates merge drift.
103
+ * **Reader test is not optional** — without it, you ship the version that makes sense to you, not to readers. Skip only on explicit user override.
104
+ * **Sub-agent absence** — `ai-council` may not be configured. Have the manual fresh-Claude fallback ready (Stage 3 step 2).
105
+ * **Image alt-text** — if the doc embeds images, add alt-text inline; without it, fresh-reader tools can't see them.
106
+ * **Language discipline** — keep the doc body in English (per `language-and-tone`). For verbatim German user phrases or interview quotes, use `DE: … · EN: …` anchor blocks.
107
+
108
+ ## Frugality Standards
109
+
110
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md).
111
+
112
+ * Per the default-terse rule, each section opens with content, not "In this section …".
113
+ * Per the cheap-question check, numbered-options blocks only when consequences differ — skip "yes / no, continue?" type prompts.
114
+ * Per the post-action summary suppression, the final output is the doc — no wrapping "Summary of what we did" block.
115
+
116
+ **Pre-save self-check:**
117
+
118
+ 1. Does any section open with a narrative preamble instead of content?
119
+ 2. Are clarifying questions bundled when one-at-a-time would surface user priorities better?
120
+ 3. Is the reader-test stage skipped or merged into a "we're done" claim?
121
+ 4. Is non-English prose present outside `DE: / EN:` anchor blocks?
122
+
123
+ ## Do NOT
124
+
125
+ * Skip Stage 1 — straight-to-drafting produces docs that miss audience and impact
126
+ * Bundle 5+ questions into one numbered block — breaks one-question-per-turn
127
+ * Reprint the whole doc on every iteration
128
+ * Declare "done" without the Stage 3 reader test
129
+ * Generate doc content from scratch when the user has existing context — gap-closing is the whole point
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "doc-coauthoring",
3
+ "description": "5 should-trigger + 5 should-not-trigger queries. Should-trigger phrasings reflect real co-authoring asks for PRDs / specs / decision docs. Should-not-trigger near-misses share doc-writing vocabulary but route elsewhere (agent-docs-writing, readme-writing, adr-create, code docs, translations).",
4
+ "queries": [
5
+ {"q": "Help me draft a PRD for the new analytics feature — I have a lot of context but no structure yet", "trigger": true},
6
+ {"q": "We need a design doc for the OAuth migration before next week's review. Can you walk me through writing it?", "trigger": true},
7
+ {"q": "I have to write up a decision doc about dropping Redis. Where do we start?", "trigger": true},
8
+ {"q": "Need an RFC for the data-export rate-limit change before tomorrow's architecture sync", "trigger": true},
9
+ {"q": "Lass uns einen Spec für das neue Webhook-Verfahren zusammenstellen — du fragst, ich antworte", "trigger": true},
10
+ {"q": "Add a section to AGENTS.md about the new env vars we just introduced", "trigger": false},
11
+ {"q": "Update the README with the new install instructions for the docker variant", "trigger": false},
12
+ {"q": "Write an ADR for the queue-broker switch from Redis to SQS", "trigger": false},
13
+ {"q": "Add docstrings to all public methods on the OrderService class", "trigger": false},
14
+ {"q": "Translate the lang/de strings to French for the new locale rollout", "trigger": false}
15
+ ]
16
+ }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: laravel
3
- description: "Writes Laravel code following framework conventions, project architecture, and modern best practices for controllers, requests, services, jobs, events, policies, and application structure."
3
+ description: "Writes Laravel PHP Eloquent, Artisan controllers, FormRequests, jobs, events, policies, providers. For Symfony / Doctrine use `symfony-workflow`. For framework-free PHP use `php-coder`."
4
4
  source: package
5
5
  domain: engineering
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: project-analysis-core
3
- description: "Use for the universal deep-analysis workflow: project discovery, version resolution, docs loading, architecture mapping, execution flow, and package research."
3
+ description: "Raw discovery primitives project discovery, version resolution, docs loading, architecture mapping, execution flow. Called by `universal-project-analysis`. Single-pass scan → `project-analyzer`."
4
4
  source: package
5
5
  domain: discovery
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: project-analyzer
3
- description: "ONLY when user explicitly requests: full project analysis, tech stack detection, or structured analysis documents for agents/analysis/. NOT for regular feature work."
3
+ description: "ONLY when user asks for single-pass tech-stack detection or `agents/analysis/` write-up. Deep multi-pass audit → `universal-project-analysis`. Raw primitives `project-analysis-core`."
4
4
  source: package
5
5
  domain: discovery
6
6
  ---