@kinqs/brainrouter-mcp-server 0.3.4
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.
- package/.env.example +144 -0
- package/README.md +56 -0
- package/agents/README.md +120 -0
- package/agents/code-reviewer.md +97 -0
- package/agents/security-auditor.md +101 -0
- package/agents/test-engineer.md +95 -0
- package/dist/__tests__/agent_mode.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.js +170 -0
- package/dist/__tests__/crypto.test.d.ts +1 -0
- package/dist/__tests__/crypto.test.js +28 -0
- package/dist/__tests__/host-integrations.test.d.ts +1 -0
- package/dist/__tests__/host-integrations.test.js +82 -0
- package/dist/__tests__/integration.test.d.ts +1 -0
- package/dist/__tests__/integration.test.js +50 -0
- package/dist/__tests__/loader.test.d.ts +1 -0
- package/dist/__tests__/loader.test.js +89 -0
- package/dist/__tests__/neural-spark.test.d.ts +1 -0
- package/dist/__tests__/neural-spark.test.js +112 -0
- package/dist/__tests__/pagination.test.d.ts +1 -0
- package/dist/__tests__/pagination.test.js +23 -0
- package/dist/__tests__/redaction.test.d.ts +1 -0
- package/dist/__tests__/redaction.test.js +17 -0
- package/dist/__tests__/registry.test.d.ts +1 -0
- package/dist/__tests__/registry.test.js +56 -0
- package/dist/__tests__/retry.test.d.ts +1 -0
- package/dist/__tests__/retry.test.js +30 -0
- package/dist/__tests__/skill-activation.test.d.ts +1 -0
- package/dist/__tests__/skill-activation.test.js +112 -0
- package/dist/__tests__/working-memory.test.d.ts +1 -0
- package/dist/__tests__/working-memory.test.js +200 -0
- package/dist/__tests__/workspace-paths.test.d.ts +1 -0
- package/dist/__tests__/workspace-paths.test.js +56 -0
- package/dist/__tests__/writer.test.d.ts +1 -0
- package/dist/__tests__/writer.test.js +94 -0
- package/dist/api/auth/crypto.d.ts +4 -0
- package/dist/api/auth/crypto.js +54 -0
- package/dist/api/middleware/auth.d.ts +12 -0
- package/dist/api/middleware/auth.js +90 -0
- package/dist/api/pagination.d.ts +18 -0
- package/dist/api/pagination.js +32 -0
- package/dist/api/routes/auth.d.ts +1 -0
- package/dist/api/routes/auth.js +130 -0
- package/dist/api/routes/chat-completions.d.ts +7 -0
- package/dist/api/routes/chat-completions.js +474 -0
- package/dist/api/routes/contradictions.d.ts +1 -0
- package/dist/api/routes/contradictions.js +28 -0
- package/dist/api/routes/evidence.d.ts +1 -0
- package/dist/api/routes/evidence.js +59 -0
- package/dist/api/routes/governance.d.ts +1 -0
- package/dist/api/routes/governance.js +95 -0
- package/dist/api/routes/graph.d.ts +1 -0
- package/dist/api/routes/graph.js +25 -0
- package/dist/api/routes/hooks.d.ts +1 -0
- package/dist/api/routes/hooks.js +88 -0
- package/dist/api/routes/memories.d.ts +1 -0
- package/dist/api/routes/memories.js +92 -0
- package/dist/api/routes/persona.d.ts +1 -0
- package/dist/api/routes/persona.js +9 -0
- package/dist/api/routes/scenes.d.ts +1 -0
- package/dist/api/routes/scenes.js +35 -0
- package/dist/api/routes/skills.d.ts +1 -0
- package/dist/api/routes/skills.js +14 -0
- package/dist/api/routes/stats.d.ts +1 -0
- package/dist/api/routes/stats.js +8 -0
- package/dist/api/routes/users.d.ts +1 -0
- package/dist/api/routes/users.js +82 -0
- package/dist/api/routes/working.d.ts +1 -0
- package/dist/api/routes/working.js +88 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +492 -0
- package/dist/integrations/claude-code.d.ts +12 -0
- package/dist/integrations/claude-code.js +35 -0
- package/dist/integrations/codex.d.ts +12 -0
- package/dist/integrations/codex.js +34 -0
- package/dist/integrations/generic-mcp.d.ts +52 -0
- package/dist/integrations/generic-mcp.js +118 -0
- package/dist/loader.d.ts +29 -0
- package/dist/loader.js +200 -0
- package/dist/memory/capture.d.ts +35 -0
- package/dist/memory/capture.js +230 -0
- package/dist/memory/config.d.ts +2 -0
- package/dist/memory/config.js +3 -0
- package/dist/memory/engine.d.ts +203 -0
- package/dist/memory/engine.js +626 -0
- package/dist/memory/llm-semaphore.d.ts +41 -0
- package/dist/memory/llm-semaphore.js +81 -0
- package/dist/memory/memory-type-config.d.ts +11 -0
- package/dist/memory/memory-type-config.js +65 -0
- package/dist/memory/pipeline/cognitive-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/cognitive-contradiction.js +59 -0
- package/dist/memory/pipeline/cognitive-dedup.d.ts +23 -0
- package/dist/memory/pipeline/cognitive-dedup.js +38 -0
- package/dist/memory/pipeline/cognitive-extractor.d.ts +21 -0
- package/dist/memory/pipeline/cognitive-extractor.js +183 -0
- package/dist/memory/pipeline/contextual-focus-builder.d.ts +13 -0
- package/dist/memory/pipeline/contextual-focus-builder.js +135 -0
- package/dist/memory/pipeline/focus-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/focus-direction-shift.js +27 -0
- package/dist/memory/pipeline/graph-builder.d.ts +11 -0
- package/dist/memory/pipeline/graph-builder.js +88 -0
- package/dist/memory/pipeline/graph-recall.d.ts +13 -0
- package/dist/memory/pipeline/graph-recall.js +55 -0
- package/dist/memory/pipeline/identity-distiller.d.ts +15 -0
- package/dist/memory/pipeline/identity-distiller.js +40 -0
- package/dist/memory/pipeline/l1-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/l1-contradiction.js +66 -0
- package/dist/memory/pipeline/l1-dedup.d.ts +23 -0
- package/dist/memory/pipeline/l1-dedup.js +39 -0
- package/dist/memory/pipeline/l1-extractor.d.ts +21 -0
- package/dist/memory/pipeline/l1-extractor.js +180 -0
- package/dist/memory/pipeline/l2-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/l2-direction-shift.js +27 -0
- package/dist/memory/pipeline/l2-scene.d.ts +15 -0
- package/dist/memory/pipeline/l2-scene.js +140 -0
- package/dist/memory/pipeline/l3-distiller.d.ts +15 -0
- package/dist/memory/pipeline/l3-distiller.js +40 -0
- package/dist/memory/pipeline/neural-spark.d.ts +27 -0
- package/dist/memory/pipeline/neural-spark.js +78 -0
- package/dist/memory/pipeline/skill-prewarm.d.ts +63 -0
- package/dist/memory/pipeline/skill-prewarm.js +127 -0
- package/dist/memory/pipeline/task-queue.d.ts +54 -0
- package/dist/memory/pipeline/task-queue.js +117 -0
- package/dist/memory/prompts/cognitive-contradiction.d.ts +1 -0
- package/dist/memory/prompts/cognitive-contradiction.js +25 -0
- package/dist/memory/prompts/cognitive-extraction.d.ts +10 -0
- package/dist/memory/prompts/cognitive-extraction.js +114 -0
- package/dist/memory/prompts/core-identity.d.ts +6 -0
- package/dist/memory/prompts/core-identity.js +60 -0
- package/dist/memory/prompts/focus-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/focus-direction-shift.js +32 -0
- package/dist/memory/prompts/focus-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/focus-scene-cluster.js +33 -0
- package/dist/memory/prompts/focus-scene.d.ts +7 -0
- package/dist/memory/prompts/focus-scene.js +40 -0
- package/dist/memory/prompts/graph-extraction-batch.d.ts +14 -0
- package/dist/memory/prompts/graph-extraction-batch.js +54 -0
- package/dist/memory/prompts/graph-extraction.d.ts +2 -0
- package/dist/memory/prompts/graph-extraction.js +53 -0
- package/dist/memory/prompts/l1-contradiction-batch.d.ts +16 -0
- package/dist/memory/prompts/l1-contradiction-batch.js +47 -0
- package/dist/memory/prompts/l1-contradiction.d.ts +1 -0
- package/dist/memory/prompts/l1-contradiction.js +25 -0
- package/dist/memory/prompts/l1-extraction.d.ts +10 -0
- package/dist/memory/prompts/l1-extraction.js +114 -0
- package/dist/memory/prompts/l2-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/l2-direction-shift.js +32 -0
- package/dist/memory/prompts/l2-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/l2-scene-cluster.js +33 -0
- package/dist/memory/prompts/l2-scene.d.ts +7 -0
- package/dist/memory/prompts/l2-scene.js +40 -0
- package/dist/memory/prompts/l3-persona.d.ts +6 -0
- package/dist/memory/prompts/l3-persona.js +60 -0
- package/dist/memory/recall.d.ts +47 -0
- package/dist/memory/recall.js +427 -0
- package/dist/memory/redaction.d.ts +1 -0
- package/dist/memory/redaction.js +24 -0
- package/dist/memory/retry.d.ts +13 -0
- package/dist/memory/retry.js +53 -0
- package/dist/memory/scheduler.d.ts +9 -0
- package/dist/memory/scheduler.js +16 -0
- package/dist/memory/skill-hints-loader.d.ts +30 -0
- package/dist/memory/skill-hints-loader.js +100 -0
- package/dist/memory/store/embedding.d.ts +16 -0
- package/dist/memory/store/embedding.js +68 -0
- package/dist/memory/store/reranker.d.ts +24 -0
- package/dist/memory/store/reranker.js +83 -0
- package/dist/memory/store/sqlite.d.ts +167 -0
- package/dist/memory/store/sqlite.js +1816 -0
- package/dist/memory/store/types.d.ts +101 -0
- package/dist/memory/store/types.js +1 -0
- package/dist/memory/types.d.ts +207 -0
- package/dist/memory/types.js +7 -0
- package/dist/memory/validation.d.ts +441 -0
- package/dist/memory/validation.js +129 -0
- package/dist/memory/working/canvas.d.ts +5 -0
- package/dist/memory/working/canvas.js +43 -0
- package/dist/memory/working/offload.d.ts +71 -0
- package/dist/memory/working/offload.js +211 -0
- package/dist/memory/working/step-log.d.ts +16 -0
- package/dist/memory/working/step-log.js +35 -0
- package/dist/registry.d.ts +34 -0
- package/dist/registry.js +305 -0
- package/dist/resolver.d.ts +17 -0
- package/dist/resolver.js +126 -0
- package/dist/scripts/validate-foreign-workspace-path.d.ts +1 -0
- package/dist/scripts/validate-foreign-workspace-path.js +39 -0
- package/dist/tools/agent_memory_tools.d.ts +485 -0
- package/dist/tools/agent_memory_tools.js +793 -0
- package/dist/tools/create_skill.d.ts +46 -0
- package/dist/tools/create_skill.js +46 -0
- package/dist/tools/get_doc.d.ts +21 -0
- package/dist/tools/get_doc.js +24 -0
- package/dist/tools/get_persona.d.ts +15 -0
- package/dist/tools/get_persona.js +20 -0
- package/dist/tools/get_reference.d.ts +15 -0
- package/dist/tools/get_reference.js +20 -0
- package/dist/tools/get_skill.d.ts +34 -0
- package/dist/tools/get_skill.js +65 -0
- package/dist/tools/get_template_doc.d.ts +21 -0
- package/dist/tools/get_template_doc.js +24 -0
- package/dist/tools/list_docs.d.ts +15 -0
- package/dist/tools/list_docs.js +16 -0
- package/dist/tools/list_skills.d.ts +18 -0
- package/dist/tools/list_skills.js +17 -0
- package/dist/tools/list_template_docs.d.ts +15 -0
- package/dist/tools/list_template_docs.js +16 -0
- package/dist/tools/memory-engineering.d.ts +225 -0
- package/dist/tools/memory-engineering.js +284 -0
- package/dist/tools/memory-explain.d.ts +34 -0
- package/dist/tools/memory-explain.js +109 -0
- package/dist/tools/memory-governance.d.ts +171 -0
- package/dist/tools/memory-governance.js +224 -0
- package/dist/tools/memory-hooks.d.ts +67 -0
- package/dist/tools/memory-hooks.js +102 -0
- package/dist/tools/memory-working.d.ts +98 -0
- package/dist/tools/memory-working.js +101 -0
- package/dist/tools/memory_capture_turn.d.ts +66 -0
- package/dist/tools/memory_capture_turn.js +85 -0
- package/dist/tools/memory_consolidate.d.ts +55 -0
- package/dist/tools/memory_consolidate.js +176 -0
- package/dist/tools/memory_contradictions.d.ts +53 -0
- package/dist/tools/memory_contradictions.js +52 -0
- package/dist/tools/memory_graph_query.d.ts +51 -0
- package/dist/tools/memory_graph_query.js +35 -0
- package/dist/tools/memory_mark_cited.d.ts +43 -0
- package/dist/tools/memory_mark_cited.js +63 -0
- package/dist/tools/memory_recall.d.ts +77 -0
- package/dist/tools/memory_recall.js +81 -0
- package/dist/tools/memory_register_skill_hints.d.ts +49 -0
- package/dist/tools/memory_register_skill_hints.js +55 -0
- package/dist/tools/memory_resolve_session.d.ts +24 -0
- package/dist/tools/memory_resolve_session.js +133 -0
- package/dist/tools/memory_search.d.ts +146 -0
- package/dist/tools/memory_search.js +84 -0
- package/dist/tools/search_skills.d.ts +18 -0
- package/dist/tools/search_skills.js +17 -0
- package/dist/tools/update_doc.d.ts +24 -0
- package/dist/tools/update_doc.js +35 -0
- package/dist/tools/update_skill.d.ts +30 -0
- package/dist/tools/update_skill.js +80 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.js +4 -0
- package/dist/writer.d.ts +30 -0
- package/dist/writer.js +220 -0
- package/docs/TEMPLATE ONLY +1 -0
- package/docs/api/API.md +64 -0
- package/docs/api/security/SECURITY.md +58 -0
- package/docs/deployment/DockerDeployment.md +30 -0
- package/docs/design/Design.md +59 -0
- package/docs/design/themes/apple.md +101 -0
- package/docs/design/themes/dieter-grid.md +100 -0
- package/docs/design/themes/gallery-white.md +100 -0
- package/docs/design/themes/pinterest.md +101 -0
- package/docs/design/themes/realty-open-house.md +101 -0
- package/docs/design/themes/vodafone.md +101 -0
- package/docs/hooks/Hooks.md +30 -0
- package/docs/schema/Schema.md +35 -0
- package/docs/strategy/ScalingStrategy.md +19 -0
- package/package.json +88 -0
- package/references/accessibility-checklist.md +160 -0
- package/references/orchestration-patterns.md +370 -0
- package/references/performance-checklist.md +153 -0
- package/references/security-checklist.md +134 -0
- package/references/testing-patterns.md +236 -0
- package/skills/agent/adr-skill/SKILL.md +299 -0
- package/skills/agent/agentic-engineering-workflow/SKILL.md +95 -0
- package/skills/agent/bootstrap-skill/SKILL.md +103 -0
- package/skills/agent/context-engineering/SKILL.md +307 -0
- package/skills/agent/debugging-and-error-recovery/SKILL.md +308 -0
- package/skills/agent/developer-growth-analysis/SKILL.md +328 -0
- package/skills/agent/doubt-driven-skill/SKILL.md +249 -0
- package/skills/agent/handover-skill/SKILL.md +112 -0
- package/skills/agent/idea-refine-skill/SKILL.md +185 -0
- package/skills/agent/idea-refine-skill/examples.md +238 -0
- package/skills/agent/idea-refine-skill/frameworks.md +99 -0
- package/skills/agent/idea-refine-skill/refinement-criteria.md +113 -0
- package/skills/agent/interview-skill/SKILL.md +226 -0
- package/skills/agent/planning-skill/SKILL.md +270 -0
- package/skills/agent/skill-authoring/SKILL.md +189 -0
- package/skills/agent/source-driven-skill/SKILL.md +197 -0
- package/skills/agent/spec-driven-skill/SKILL.md +221 -0
- package/skills/agent/sync-skill/SKILL.md +92 -0
- package/skills/agent/using-agent-skills/SKILL.md +189 -0
- package/skills/api/a11y-skill/SKILL.md +88 -0
- package/skills/api/api-skill/SKILL.md +123 -0
- package/skills/api/auth-skill/SKILL.md +80 -0
- package/skills/api/debug-skill/SKILL.md +535 -0
- package/skills/api/performance-skill/SKILL.md +100 -0
- package/skills/api/testing-skill/SKILL.md +100 -0
- package/skills/codebase/code-review-and-quality/SKILL.md +228 -0
- package/skills/codebase/code-simplification/SKILL.md +352 -0
- package/skills/codebase/code-structure-cleanup/SKILL.md +142 -0
- package/skills/codebase/concerns-skill/SKILL.md +89 -0
- package/skills/codebase/conventions-skill/SKILL.md +95 -0
- package/skills/codebase/doc-management-skill/SKILL.md +47 -0
- package/skills/codebase/git-workflow-skill/SKILL.md +312 -0
- package/skills/communication/1-3-1-rule/SKILL.md +120 -0
- package/skills/design/brutalist-skill/SKILL.md +131 -0
- package/skills/design/concept-diagrams/SKILL.md +387 -0
- package/skills/design/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/skills/design/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/skills/design/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/skills/design/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/skills/design/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/skills/design/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/skills/design/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/skills/design/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/skills/design/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/skills/design/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/skills/design/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/skills/design/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/skills/design/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/skills/design/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/skills/design/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/skills/design/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/skills/design/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/skills/design/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/skills/design/concept-diagrams/templates/template.html +174 -0
- package/skills/design/gpt-tasteskill/SKILL.md +114 -0
- package/skills/design/minimalist-skill/SKILL.md +116 -0
- package/skills/design/output-skill/SKILL.md +87 -0
- package/skills/design/redesign-skill/SKILL.md +213 -0
- package/skills/design/soft-skill/SKILL.md +132 -0
- package/skills/design/stitch-skill/EXAMPLE.md +121 -0
- package/skills/design/stitch-skill/SKILL.md +222 -0
- package/skills/design/taste-skill/SKILL.md +269 -0
- package/skills/devops/ci-cd-skill/SKILL.md +402 -0
- package/skills/devops/docker-skill/SKILL.md +297 -0
- package/skills/devops/domain-skill/SKILL.md +234 -0
- package/skills/lifecycle/changelog-generator/SKILL.md +135 -0
- package/skills/lifecycle/incremental-skill/SKILL.md +257 -0
- package/skills/lifecycle/migration-skill/SKILL.md +218 -0
- package/skills/lifecycle/shipping-skill/SKILL.md +321 -0
- package/skills/memory/agent-memory/SKILL.md +122 -0
- package/skills/qa/browser-testing-skill/SKILL.md +314 -0
- package/skills/ux/adversarial-ux-skill/SKILL.md +168 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: doubt-driven-skill
|
|
3
|
+
description: Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production, security-sensitive logic, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.
|
|
4
|
+
hints: |
|
|
5
|
+
- Use this skill to challenge assumptions and logic boundaries in non-trivial changes.
|
|
6
|
+
- Separate the review unit into a distinct ARTIFACT and CONTRACT before testing.
|
|
7
|
+
- Formulate adversarial reviewer prompts focused on disproving correctness, not validating it.
|
|
8
|
+
- Limit the doubt review loop to a maximum of 3 cycles to avoid unproductive recursion.
|
|
9
|
+
- In interactive mode, explicitly offer a cross-model second opinion to the user.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Doubt-Driven Development
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
A confident answer is not a correct one. Long sessions accumulate context that quietly turns assumptions into "facts" without anyone noticing. Doubt-driven development is the discipline of materializing a fresh-context reviewer — biased to **disprove**, not approve — before any non-trivial output stands.
|
|
17
|
+
|
|
18
|
+
This is not `/review`. `/review` is a verdict on a finished artifact. This is an in-flight posture: non-trivial decisions get cross-examined while course-correction is still cheap.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
A decision is **non-trivial** when at least one of these is true:
|
|
23
|
+
|
|
24
|
+
- It introduces or modifies branching logic
|
|
25
|
+
- It crosses a module or service boundary
|
|
26
|
+
- It asserts a property the type system or compiler cannot verify (thread safety, idempotence, ordering, invariants)
|
|
27
|
+
- Its correctness depends on context the future reader cannot see
|
|
28
|
+
- Its blast radius is irreversible (production deploy, data migration, public API change)
|
|
29
|
+
|
|
30
|
+
Apply the skill when:
|
|
31
|
+
|
|
32
|
+
- About to make an architectural decision under uncertainty
|
|
33
|
+
- About to commit non-trivial code
|
|
34
|
+
- About to claim a non-obvious fact ("this is safe", "this scales", "this matches the spec")
|
|
35
|
+
- Working in code you don't fully understand
|
|
36
|
+
|
|
37
|
+
**When NOT to use:**
|
|
38
|
+
|
|
39
|
+
- Mechanical operations (renaming, formatting, file moves)
|
|
40
|
+
- Following a clear, unambiguous user instruction
|
|
41
|
+
- Reading or summarizing existing code
|
|
42
|
+
- One-line changes with obvious correctness
|
|
43
|
+
- Pure tooling operations (running tests, listing files)
|
|
44
|
+
- The user has explicitly asked for speed over verification
|
|
45
|
+
|
|
46
|
+
If you doubt every keystroke, you ship nothing. The skill applies only to non-trivial decisions as defined above.
|
|
47
|
+
|
|
48
|
+
## Loading Constraints
|
|
49
|
+
|
|
50
|
+
This skill is designed for the **main-session orchestrator**, where Step 3 (DOUBT, detailed below) can spawn a fresh-context reviewer.
|
|
51
|
+
|
|
52
|
+
- **Do NOT add this skill to a persona's `skills:` frontmatter.** A persona that follows Step 3 would spawn another persona — the orchestration anti-pattern explicitly forbidden by `references/orchestration-patterns.md` ("personas do not invoke other personas").
|
|
53
|
+
- **If you find yourself applying this skill from inside a subagent context** (where Claude Code prevents nested subagent spawn): the preferred path is to surface to the user that doubt-driven cannot run nested and let the main session handle it. As a last resort only, a degraded self-questioning fallback exists — rewrite ARTIFACT + CONTRACT as a fresh self-prompt with a hard mental separator from your prior reasoning, and walk Steps 1–5. This is **not fresh-context review** (you carry your own context with you), so flag the result as degraded and prefer escalation whenever the user is reachable.
|
|
54
|
+
|
|
55
|
+
## The Process
|
|
56
|
+
|
|
57
|
+
Copy this checklist when applying the skill:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Doubt cycle:
|
|
61
|
+
- [ ] Step 1: CLAIM — wrote the claim + why-it-matters
|
|
62
|
+
- [ ] Step 2: EXTRACT — isolated artifact + contract, stripped reasoning
|
|
63
|
+
- [ ] Step 3: DOUBT — invoked fresh-context reviewer with adversarial prompt
|
|
64
|
+
- [ ] Step 4: RECONCILE — classified every finding against the artifact text
|
|
65
|
+
- [ ] Step 5: STOP — met stop condition (trivial findings, 3 cycles, or user override)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 1: CLAIM — Surface what stands
|
|
69
|
+
|
|
70
|
+
Name the decision in two or three lines:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
CLAIM: "The new caching layer is thread-safe under the
|
|
74
|
+
read-heavy workload described in the spec."
|
|
75
|
+
WHY THIS MATTERS: a race here corrupts user data and is
|
|
76
|
+
hard to detect in QA.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If you can't write the claim that compactly, you have a vibe, not a decision. Surface it before scrutinizing it.
|
|
80
|
+
|
|
81
|
+
### Step 2: EXTRACT — Smallest reviewable unit
|
|
82
|
+
|
|
83
|
+
A fresh-context reviewer needs the **artifact** and the **contract**, not the journey.
|
|
84
|
+
|
|
85
|
+
- Code: the diff or the function — not the whole file
|
|
86
|
+
- Decision: the proposal in 3–5 sentences plus the constraints it has to satisfy
|
|
87
|
+
- Assertion: the claim plus the evidence that supposedly supports it (kept distinct from the Step 1 CLAIM block, which is the orchestrator's hypothesis under scrutiny)
|
|
88
|
+
|
|
89
|
+
Strip your reasoning. If you hand over conclusions, you'll get back validation of your conclusions. The unit must be small enough that a reviewer can hold it in mind in one read — if it's a 500-line PR, decompose first.
|
|
90
|
+
|
|
91
|
+
### Step 3: DOUBT — Invoke the fresh-context reviewer
|
|
92
|
+
|
|
93
|
+
The reviewer's prompt **must be adversarial**. Framing decides the answer.
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Adversarial review. Find what is wrong with this artifact.
|
|
97
|
+
Assume the author is overconfident. Look for:
|
|
98
|
+
- Unstated assumptions
|
|
99
|
+
- Edge cases not handled
|
|
100
|
+
- Hidden coupling or shared state
|
|
101
|
+
- Ways the contract could be violated
|
|
102
|
+
- Existing conventions this might break
|
|
103
|
+
- Failure modes under unexpected input
|
|
104
|
+
|
|
105
|
+
Do NOT validate. Do NOT summarize. Find issues, or state
|
|
106
|
+
explicitly that you cannot find any after thorough examination.
|
|
107
|
+
|
|
108
|
+
ARTIFACT: <paste artifact>
|
|
109
|
+
CONTRACT: <paste contract>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Pass ARTIFACT + CONTRACT only. Do NOT pass the CLAIM.** Handing the reviewer your conclusion biases it toward agreement. The reviewer must independently determine whether the artifact satisfies the contract.
|
|
113
|
+
|
|
114
|
+
In Claude Code, the role-based reviewers in `agents/` start with isolated context by design and are usable here — see `agents/` for the roster and per-domain match.
|
|
115
|
+
|
|
116
|
+
**The adversarial prompt above takes precedence over the persona's default response shape.** Personas like `code-reviewer` are written to produce balanced verdicts with both strengths and weaknesses; doubt-driven needs issues-only output. Paste the adversarial prompt verbatim into the invocation so it overrides the persona's default. If a persona's response shape can't be overridden cleanly, fall back to a generic subagent with the adversarial prompt.
|
|
117
|
+
|
|
118
|
+
#### Cross-model escalation
|
|
119
|
+
|
|
120
|
+
A single-model reviewer shares blind spots with the original author — a colder, different-architecture model catches them. Doubt-driven is already opt-in for non-trivial decisions, so within that scope offering cross-model is part of the skill's value, not optional friction.
|
|
121
|
+
|
|
122
|
+
**Interactive sessions: always offer. Never silently skip.**
|
|
123
|
+
|
|
124
|
+
**Step 1: Ask the user**
|
|
125
|
+
|
|
126
|
+
After the single-model review in Step 3 above, but before RECONCILE, pause and ask:
|
|
127
|
+
|
|
128
|
+
> *"Single-model review complete. Want a cross-model second opinion? Options: Gemini CLI, Codex CLI, manual external review (you paste it elsewhere), or skip."*
|
|
129
|
+
|
|
130
|
+
This question is mandatory in every interactive doubt cycle — even on artifacts that feel low-stakes. The user — not the agent — decides whether the cost is worth it. The agent's job is to surface the choice.
|
|
131
|
+
|
|
132
|
+
**Step 2: If the user picks a CLI — verify, then invoke**
|
|
133
|
+
|
|
134
|
+
1. Check the tool is in PATH (`which gemini`, `which codex`).
|
|
135
|
+
2. Test it works (`gemini --version` or equivalent) before passing the full prompt — a stale or broken binary may pass `which` but fail on real input.
|
|
136
|
+
3. Confirm the exact invocation with the user, including required flags, auth, and env vars (e.g., API keys). Implementations vary; never assume.
|
|
137
|
+
4. Pass ARTIFACT + CONTRACT + the adversarial prompt **only**. No session context, no CLAIM.
|
|
138
|
+
5. Mind shell escaping. If the artifact contains quotes, `$(...)`, or backticks, prefer stdin (`echo … | gemini`) or a heredoc over inline `-p "…"`. When in doubt, ask the user to confirm the invocation before running it.
|
|
139
|
+
6. Take the output into Step 4 (RECONCILE).
|
|
140
|
+
|
|
141
|
+
**Never interpolate the artifact into a shell-quoted argument.** Code, markdown, and review prompts routinely contain backticks, `$(...)`, and quote characters that will either truncate the prompt or execute embedded shell. Write the full prompt to a file and pipe it through stdin.
|
|
142
|
+
|
|
143
|
+
Example shapes (verify flags against your installed tool — syntax differs across implementations and versions):
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Write the adversarial prompt + ARTIFACT + CONTRACT to a temp file first.
|
|
147
|
+
# Then pipe via stdin so shell metacharacters in the artifact stay inert.
|
|
148
|
+
|
|
149
|
+
# Codex (read-only sandbox keeps the CLI from writing to your workspace):
|
|
150
|
+
codex exec --sandbox read-only -C <repo-path> - < /tmp/doubt-prompt.md
|
|
151
|
+
|
|
152
|
+
# Gemini ('--approval-mode plan' is read-only; '-p ""' triggers non-interactive
|
|
153
|
+
# mode and the prompt is read from stdin):
|
|
154
|
+
gemini --approval-mode plan -p "" < /tmp/doubt-prompt.md
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
A read-only sandbox is the load-bearing detail: a doubt artifact may itself contain instructions (intentional or accidental prompt injection) that the cross-model CLI would otherwise execute against your workspace.
|
|
158
|
+
|
|
159
|
+
**Step 3: If the CLI is unavailable or fails**
|
|
160
|
+
|
|
161
|
+
Surface the failure explicitly. Offer: run it manually, try a different tool, or skip. Do not silently fall back to single-model — the user should know cross-model didn't happen.
|
|
162
|
+
|
|
163
|
+
**Step 4: If the user skips**
|
|
164
|
+
|
|
165
|
+
Acknowledge the skip in the output (*"Proceeding with single-model findings only"*) and continue to RECONCILE. Skipping is fine; silent skipping is not.
|
|
166
|
+
|
|
167
|
+
**Non-interactive contexts** (CI, `/loop`, autonomous-loop, scheduled runs):
|
|
168
|
+
|
|
169
|
+
- Cross-model is **skipped**, and the skip must be **announced** in the output: *"Cross-model skipped: non-interactive context."*
|
|
170
|
+
- **Never invoke an external CLI without explicit user authorization** — this is a load-bearing safety property.
|
|
171
|
+
|
|
172
|
+
Cross-model adds cost, latency, and tool fragility. The agent surfaces the choice every cycle; the user decides whether this artifact warrants it.
|
|
173
|
+
|
|
174
|
+
### Step 4: RECONCILE — Fold findings back
|
|
175
|
+
|
|
176
|
+
The reviewer's output is data, not verdict. **You are still the orchestrator.** Re-read the artifact text against each finding before classifying — rubber-stamping the reviewer is the same failure mode as ignoring it.
|
|
177
|
+
|
|
178
|
+
For each finding, classify in this **precedence order** (first matching class wins):
|
|
179
|
+
|
|
180
|
+
1. **Contract misread** — reviewer flagged something specifically because the CONTRACT you provided was unclear or incomplete. Fix the contract first, re-classify on the next cycle.
|
|
181
|
+
2. **Valid + actionable** — real issue requiring a change to the artifact. Change it, re-loop.
|
|
182
|
+
3. **Valid trade-off** — issue is real but cost of fixing exceeds cost of accepting. Document the trade-off explicitly so the user sees it.
|
|
183
|
+
4. **Noise** — reviewer flagged something that's actually correct under context the reviewer didn't have. Note it, move on, and ask: would adding that context to the contract have prevented the false flag?
|
|
184
|
+
|
|
185
|
+
A fresh reviewer can be wrong because it lacks context. Don't defer just because it's "fresh."
|
|
186
|
+
|
|
187
|
+
### Step 5: STOP — Bounded loop, not recursion
|
|
188
|
+
|
|
189
|
+
Stop when:
|
|
190
|
+
|
|
191
|
+
- Next iteration returns only trivial or already-considered findings, **or**
|
|
192
|
+
- 3 cycles completed (escalate to user, don't grind a fourth alone), **or**
|
|
193
|
+
- User explicitly says "ship it"
|
|
194
|
+
|
|
195
|
+
If after 3 cycles the reviewer still surfaces substantive issues, the artifact may not be ready. Surface this to the user — three unresolved cycles is information about the artifact, not a reason to keep looping.
|
|
196
|
+
|
|
197
|
+
If 3 cycles is "obviously insufficient" because the artifact is large: the artifact is too big — return to Step 2 and decompose. Do not lift the bound.
|
|
198
|
+
|
|
199
|
+
## Common Rationalizations
|
|
200
|
+
|
|
201
|
+
| Rationalization | Reality |
|
|
202
|
+
|---|---|
|
|
203
|
+
| "I'm confident, skip the doubt step" | Confidence correlates poorly with correctness on novel problems. Moments of certainty are exactly when blind spots hide. |
|
|
204
|
+
| "Spawning a reviewer is expensive" | Debugging a wrong commit in production is more expensive. The check is bounded; the bug isn't. |
|
|
205
|
+
| "The reviewer will just nitpick" | Only if unscoped. Constrain the prompt to "issues that would make this fail under the contract." |
|
|
206
|
+
| "I'll do doubt at the end with `/review`" | `/review` is a final gate. Doubt-driven catches wrong directions early when course-correction is cheap. By PR time it's too late. |
|
|
207
|
+
| "If I doubt every step I'll never ship" | The skill applies to non-trivial decisions, not every keystroke. Re-read "When NOT to Use." |
|
|
208
|
+
| "Two opinions are always better than one" | Not when the second has less context and produces noise. Reconcile, don't defer. |
|
|
209
|
+
| "The reviewer disagreed so I was wrong" | The reviewer lacks your context — disagreement is information, not verdict. Re-read the artifact, classify, then decide. |
|
|
210
|
+
| "Cross-model is always better" | Cross-model catches blind spots a single model shares with itself, but it adds cost and tool fragility. Offer it every interactive doubt cycle — the user decides whether the artifact warrants it. The agent's job is to surface the choice, not to gate it. |
|
|
211
|
+
| "User said yes once, so I can keep invoking the CLI" | Each invocation is its own authorization. The artifact, the prompt, and the flags change between calls — re-confirm the exact command with the user before every run. |
|
|
212
|
+
|
|
213
|
+
## Red Flags
|
|
214
|
+
|
|
215
|
+
- Spawning a fresh-context reviewer for a one-line rename or formatting change
|
|
216
|
+
- Treating reviewer output as authoritative without re-reading the artifact text
|
|
217
|
+
- Looping >3 cycles without escalating to the user
|
|
218
|
+
- Prompting the reviewer with "is this good?" instead of "find issues"
|
|
219
|
+
- Skipping doubt under time pressure on a high-stakes decision
|
|
220
|
+
- Re-spawning fresh-context on an unchanged artifact (you'll get the same findings; you're stalling)
|
|
221
|
+
- **Doubt theater (checkable signal)**: across 2 or more cycles where the reviewer surfaced substantive findings, zero findings were classified as actionable. You are validating, not doubting. Stop and escalate.
|
|
222
|
+
- Doubting only after committing — that's `/review`, not doubt-driven development
|
|
223
|
+
- Hardcoding an external CLI invocation without confirming with the user that the tool exists, is configured, and accepts that exact syntax
|
|
224
|
+
- **Silently skipping cross-model in an interactive doubt cycle.** Even when not recommending it, the offer must be visible. Skipping is fine; silent skipping is not.
|
|
225
|
+
- Falling back silently when an external CLI errors or is missing — surface the failure and let the user redirect
|
|
226
|
+
- Stripping the contract from the reviewer's input
|
|
227
|
+
- Passing the CLAIM to the reviewer (biases toward agreement)
|
|
228
|
+
|
|
229
|
+
## Interaction with Other Skills
|
|
230
|
+
|
|
231
|
+
- **`code-review-and-quality` / `/review`**: complementary. `/review` is post-hoc PR verdict; doubt-driven is in-flight per-decision. Use both.
|
|
232
|
+
- **`source-driven-development`**: SDD verifies *facts about frameworks* against official docs. Doubt-driven verifies *your reasoning about the artifact*. SDD checks the API exists; doubt-driven checks you used it correctly under the contract.
|
|
233
|
+
- **`test-driven-development`**: TDD's RED step is doubt made concrete — a failing test is a disproof attempt. When TDD applies, that failing test *is* the doubt step for behavioral claims.
|
|
234
|
+
- **`debugging-and-error-recovery`**: when the reviewer surfaces a real failure mode, drop into the debugging skill to localize and fix.
|
|
235
|
+
- **Repo orchestration rules** (`references/orchestration-patterns.md`): this skill orchestrates from the main session. A persona calling another persona is anti-pattern B — see Loading Constraints above.
|
|
236
|
+
|
|
237
|
+
## Verification
|
|
238
|
+
|
|
239
|
+
After applying doubt-driven development, confirm:
|
|
240
|
+
|
|
241
|
+
- [ ] Every non-trivial decision (per the definition above) was named explicitly as a CLAIM before standing
|
|
242
|
+
- [ ] At least one fresh-context review per non-trivial artifact (a failing test produced by TDD's RED step satisfies this for behavioral claims, per Interaction with Other Skills)
|
|
243
|
+
- [ ] The reviewer received ARTIFACT + CONTRACT — NOT the CLAIM, NOT your reasoning
|
|
244
|
+
- [ ] The reviewer's prompt was adversarial ("find issues"), not validating ("is it good")
|
|
245
|
+
- [ ] Findings were classified against the artifact text (not rubber-stamped) using the precedence: contract misread / actionable / trade-off / noise
|
|
246
|
+
- [ ] A stop condition was met (trivial findings, 3 cycles, or user override)
|
|
247
|
+
- [ ] In interactive mode, cross-model was **explicitly offered** to the user (regardless of artifact stakes) and the response was acknowledged in the output
|
|
248
|
+
- [ ] In non-interactive mode, cross-model was skipped and the skip was announced
|
|
249
|
+
- [ ] Any external CLI invocation was preceded by a PATH check, a working-binary test, syntax confirmation with the user, and explicit authorization to run
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handover-skill
|
|
3
|
+
description: Summarizes completed work and provides a walkthrough. Use when a project, feature, or task is finished and needs to be reviewed or handed over to a human or another agent.
|
|
4
|
+
hints: |
|
|
5
|
+
- Always verify that all tests pass and lint checks are green before initiating a handover.
|
|
6
|
+
- Create or update the walkthrough.md artifact to detail structural changes and decisions.
|
|
7
|
+
- Ensure every key change is explained in terms of product behavior, not just raw file diffs.
|
|
8
|
+
- Document all verification results with exact commands run and observable outcomes.
|
|
9
|
+
- Clearly flag any remaining technical debt or future enhancement work.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Project Handover and Walkthrough
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
A good handover ensures that the work you've done is understandable, verifiable, and maintainable. The walkthrough is the final "sales pitch" and "instruction manual" for your changes. It should explain what was done, why it was done that way, and how the human can verify the results.
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- You have completed all tasks in the implementation plan.
|
|
21
|
+
- You are finishing a session and want to leave a clear state for the next one.
|
|
22
|
+
- You need a human to review and sign off on a significant change.
|
|
23
|
+
- You want to document the technical decisions made during implementation.
|
|
24
|
+
|
|
25
|
+
## The Handover Process
|
|
26
|
+
|
|
27
|
+
### Step 1: Final Verification
|
|
28
|
+
|
|
29
|
+
Before writing the walkthrough, confirm that everything works as expected:
|
|
30
|
+
- Run the full test suite.
|
|
31
|
+
- Perform manual verification of the main user flows.
|
|
32
|
+
- Ensure the code follows project conventions and linting rules.
|
|
33
|
+
- Check that all tasks in `task.md` are marked as completed.
|
|
34
|
+
|
|
35
|
+
### Step 2: Create the Walkthrough File
|
|
36
|
+
|
|
37
|
+
Create a `walkthrough.md` file in the project root. This is your primary artifact for the handover.
|
|
38
|
+
|
|
39
|
+
### Step 3: Summarize Key Changes
|
|
40
|
+
|
|
41
|
+
Don't just list files. Explain the *logic* of the changes.
|
|
42
|
+
- What were the main architectural decisions?
|
|
43
|
+
- What new components or modules were added?
|
|
44
|
+
- Were there any significant refactors?
|
|
45
|
+
|
|
46
|
+
### Step 4: Evidence of Success
|
|
47
|
+
|
|
48
|
+
Provide proof that the work is correct.
|
|
49
|
+
- Include test results (e.g., "15 tests passed, 0 failed").
|
|
50
|
+
- If applicable, include screenshots or recordings (if the tool supports it).
|
|
51
|
+
- Link to relevant documentation or updated files.
|
|
52
|
+
|
|
53
|
+
## Walkthrough Template
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
# Walkthrough: [Feature/Project Name]
|
|
57
|
+
|
|
58
|
+
## Overview
|
|
59
|
+
[A brief summary of what was accomplished and why.]
|
|
60
|
+
|
|
61
|
+
## Key Changes
|
|
62
|
+
[Bullet points of the most important changes, grouped logically.]
|
|
63
|
+
|
|
64
|
+
- **Core Logic**: Description of changes to business logic.
|
|
65
|
+
- **UI/UX**: Description of changes to the interface.
|
|
66
|
+
- **Infrastructure**: Changes to databases, APIs, or configuration.
|
|
67
|
+
|
|
68
|
+
## Technical Decisions
|
|
69
|
+
[Explain any non-obvious choices made during implementation.]
|
|
70
|
+
|
|
71
|
+
- **Decision 1**: Rationale and trade-offs.
|
|
72
|
+
- **Decision 2**: Rationale and trade-offs.
|
|
73
|
+
|
|
74
|
+
## Verification Results
|
|
75
|
+
|
|
76
|
+
### Automated Tests
|
|
77
|
+
- [ ] Unit tests pass: `npm test`
|
|
78
|
+
- [ ] Integration tests pass: `npm run test:integration`
|
|
79
|
+
- [ ] Coverage: 95% line coverage on new modules.
|
|
80
|
+
|
|
81
|
+
### Manual Verification
|
|
82
|
+
1. [Step 1 of manual check]
|
|
83
|
+
2. [Step 2 of manual check]
|
|
84
|
+
- [ ] Results: [Description of observed behavior]
|
|
85
|
+
|
|
86
|
+
## Future Work / Remaining Debt
|
|
87
|
+
- [ ] [Unsolved edge case]
|
|
88
|
+
- [ ] [Performance optimization for later]
|
|
89
|
+
- [ ] [Feature extension ideas]
|
|
90
|
+
|
|
91
|
+
## Sign-off
|
|
92
|
+
- [ ] Ready for production
|
|
93
|
+
- [ ] Human review required for [specific area]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Red Flags
|
|
97
|
+
|
|
98
|
+
- Creating a walkthrough before finishing all tasks.
|
|
99
|
+
- Listing file changes without explaining the "why."
|
|
100
|
+
- No verification results included.
|
|
101
|
+
- Leaving `task.md` with uncompleted items.
|
|
102
|
+
- Vague summaries like "Implemented the feature."
|
|
103
|
+
|
|
104
|
+
## Verification
|
|
105
|
+
|
|
106
|
+
Before finalizing the handover, confirm:
|
|
107
|
+
- [ ] `walkthrough.md` is saved in the repository artifacts directory or project root.
|
|
108
|
+
- [ ] All verification steps have been run, tested, and documented.
|
|
109
|
+
- [ ] Non-obvious technical decisions and architectural changes are clearly explained.
|
|
110
|
+
- [ ] `task.md` has been updated to reflect the final state.
|
|
111
|
+
- [ ] Any "Future Work," "Remaining Debt," or "Known Issues" are noted.
|
|
112
|
+
- [ ] All temporary scratch files, debug logs, and unfinished code blocks have been cleaned up.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: idea-refine-skill
|
|
3
|
+
description: Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one.
|
|
4
|
+
hints: |
|
|
5
|
+
- Anchor the ideation around a crisp "How Might We" problem statement.
|
|
6
|
+
- Ask 3-5 high-leverage sharpening questions to define the target user and success metrics.
|
|
7
|
+
- Generate 5-8 distinct idea variations using inversion, constraint removal, or 10x scale lenses.
|
|
8
|
+
- Explicitly stress-test directions against user value, feasibility, and differentiation.
|
|
9
|
+
- Produce a structured one-pager specifying MVP scope and a strict "Not Doing" list.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Idea Refine
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Refines raw ideas into sharp, actionable concepts worth building through structured divergent and convergent thinking.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. **Understand & Expand (Divergent):** Restate the idea, ask sharpening questions, and generate variations.
|
|
21
|
+
2. **Evaluate & Converge:** Cluster ideas, stress-test them, and surface hidden assumptions.
|
|
22
|
+
3. **Sharpen & Ship:** Produce a concrete markdown one-pager moving work forward.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
This skill is primarily an interactive dialogue. Invoke it with an idea, and the agent will guide you through the process.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Optional: Initialize the ideas directory
|
|
30
|
+
mkdir -p ideas
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Trigger Phrases:**
|
|
34
|
+
- "Help me refine this idea"
|
|
35
|
+
- "Ideate on [concept]"
|
|
36
|
+
- "Stress-test my plan"
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
The final output is a markdown one-pager saved to `ideas/[idea-name].md` (after user confirmation), containing:
|
|
41
|
+
- Problem Statement
|
|
42
|
+
- Recommended Direction
|
|
43
|
+
- Key Assumptions
|
|
44
|
+
- MVP Scope
|
|
45
|
+
- Not Doing list
|
|
46
|
+
|
|
47
|
+
## Detailed Instructions
|
|
48
|
+
|
|
49
|
+
You are an ideation partner. Your job is to help refine raw ideas into sharp, actionable concepts worth building.
|
|
50
|
+
|
|
51
|
+
### Philosophy
|
|
52
|
+
|
|
53
|
+
- Simplicity is the ultimate sophistication. Push toward the simplest version that still solves the real problem.
|
|
54
|
+
- Start with the user experience, work backwards to technology.
|
|
55
|
+
- Say no to 1,000 things. Focus beats breadth.
|
|
56
|
+
- Challenge every assumption. "How it's usually done" is not a reason.
|
|
57
|
+
- Show people the future — don't just give them better horses.
|
|
58
|
+
- The parts you can't see should be as beautiful as the parts you can.
|
|
59
|
+
|
|
60
|
+
### Process
|
|
61
|
+
|
|
62
|
+
When the user invokes this skill with an idea (`$ARGUMENTS`), guide them through three phases. Adapt your approach based on what they say — this is a conversation, not a template.
|
|
63
|
+
|
|
64
|
+
#### Phase 1: Understand & Expand (Divergent)
|
|
65
|
+
|
|
66
|
+
**Goal:** Take the raw idea and open it up.
|
|
67
|
+
|
|
68
|
+
1. **Restate the idea** as a crisp "How Might We" problem statement. This forces clarity on what's actually being solved.
|
|
69
|
+
|
|
70
|
+
2. **Ask 3-5 sharpening questions** — no more. Focus on:
|
|
71
|
+
- Who is this for, specifically?
|
|
72
|
+
- What does success look like?
|
|
73
|
+
- What are the real constraints (time, tech, resources)?
|
|
74
|
+
- What's been tried before?
|
|
75
|
+
- Why now?
|
|
76
|
+
|
|
77
|
+
Use the `AskUserQuestion` tool to gather this input. Do NOT proceed until you understand who this is for and what success looks like.
|
|
78
|
+
|
|
79
|
+
3. **Generate 5-8 idea variations** using these lenses:
|
|
80
|
+
- **Inversion:** "What if we did the opposite?"
|
|
81
|
+
- **Constraint removal:** "What if budget/time/tech weren't factors?"
|
|
82
|
+
- **Audience shift:** "What if this were for [different user]?"
|
|
83
|
+
- **Combination:** "What if we merged this with [adjacent idea]?"
|
|
84
|
+
- **Simplification:** "What's the version that's 10x simpler?"
|
|
85
|
+
- **10x version:** "What would this look like at massive scale?"
|
|
86
|
+
- **Expert lens:** "What would [domain] experts find obvious that outsiders wouldn't?"
|
|
87
|
+
|
|
88
|
+
Push beyond what the user initially asked for. Create products people don't know they need yet.
|
|
89
|
+
|
|
90
|
+
**If running inside a codebase:** Use `Glob`, `Grep`, and `Read` to scan for relevant context — existing architecture, patterns, constraints, prior art. Ground your variations in what actually exists. Reference specific files and patterns when relevant.
|
|
91
|
+
|
|
92
|
+
Read `frameworks.md` in this skill directory for additional ideation frameworks you can draw from. Use them selectively — pick the lens that fits the idea, don't run every framework mechanically.
|
|
93
|
+
|
|
94
|
+
#### Phase 2: Evaluate & Converge
|
|
95
|
+
|
|
96
|
+
After the user reacts to Phase 1 (indicates which ideas resonate, pushes back, adds context), shift to convergent mode:
|
|
97
|
+
|
|
98
|
+
1. **Cluster** the ideas that resonated into 2-3 distinct directions. Each direction should feel meaningfully different, not just variations on a theme.
|
|
99
|
+
|
|
100
|
+
2. **Stress-test** each direction against three criteria:
|
|
101
|
+
- **User value:** Who benefits and how much? Is this a painkiller or a vitamin?
|
|
102
|
+
- **Feasibility:** What's the technical and resource cost? What's the hardest part?
|
|
103
|
+
- **Differentiation:** What makes this genuinely different? Would someone switch from their current solution?
|
|
104
|
+
|
|
105
|
+
Read `refinement-criteria.md` in this skill directory for the full evaluation rubric.
|
|
106
|
+
|
|
107
|
+
3. **Surface hidden assumptions.** For each direction, explicitly name:
|
|
108
|
+
- What you're betting is true (but haven't validated)
|
|
109
|
+
- What could kill this idea
|
|
110
|
+
- What you're choosing to ignore (and why that's okay for now)
|
|
111
|
+
|
|
112
|
+
This is where most ideation fails. Don't skip it.
|
|
113
|
+
|
|
114
|
+
**Be honest, not supportive.** If an idea is weak, say so with kindness. A good ideation partner is not a yes-machine. Push back on complexity, question real value, and point out when the emperor has no clothes.
|
|
115
|
+
|
|
116
|
+
#### Phase 3: Sharpen & Ship
|
|
117
|
+
|
|
118
|
+
Produce a concrete artifact — a markdown one-pager that moves work forward:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
# [Idea Name]
|
|
122
|
+
|
|
123
|
+
## Problem Statement
|
|
124
|
+
[One-sentence "How Might We" framing]
|
|
125
|
+
|
|
126
|
+
## Recommended Direction
|
|
127
|
+
[The chosen direction and why — 2-3 paragraphs max]
|
|
128
|
+
|
|
129
|
+
## Key Assumptions to Validate
|
|
130
|
+
- [ ] [Assumption 1 — how to test it]
|
|
131
|
+
- [ ] [Assumption 2 — how to test it]
|
|
132
|
+
- [ ] [Assumption 3 — how to test it]
|
|
133
|
+
|
|
134
|
+
## MVP Scope
|
|
135
|
+
[The minimum version that tests the core assumption. What's in, what's out.]
|
|
136
|
+
|
|
137
|
+
## Not Doing (and Why)
|
|
138
|
+
- [Thing 1] — [reason]
|
|
139
|
+
- [Thing 2] — [reason]
|
|
140
|
+
- [Thing 3] — [reason]
|
|
141
|
+
|
|
142
|
+
## Open Questions
|
|
143
|
+
- [Question that needs answering before building]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**The "Not Doing" list is arguably the most valuable part.** Focus is about saying no to good ideas. Make the trade-offs explicit.
|
|
147
|
+
|
|
148
|
+
Ask the user if they'd like to save this to `ideas/[idea-name].md` (or a location of their choosing). Only save if they confirm.
|
|
149
|
+
|
|
150
|
+
### Anti-patterns to Avoid
|
|
151
|
+
|
|
152
|
+
- **Don't generate 20+ ideas.** Quality over quantity. 5-8 well-considered variations beat 20 shallow ones.
|
|
153
|
+
- **Don't be a yes-machine.** Push back on weak ideas with specificity and kindness.
|
|
154
|
+
- **Don't skip "who is this for."** Every good idea starts with a person and their problem.
|
|
155
|
+
- **Don't produce a plan without surfacing assumptions.** Untested assumptions are the #1 killer of good ideas.
|
|
156
|
+
- **Don't over-engineer the process.** Three phases, each doing one thing well. Resist adding steps.
|
|
157
|
+
- **Don't just list ideas — tell a story.** Each variation should have a reason it exists, not just be a bullet point.
|
|
158
|
+
- **Don't ignore the codebase.** If you're in a project, the existing architecture is a constraint and an opportunity. Use it.
|
|
159
|
+
|
|
160
|
+
### Tone
|
|
161
|
+
|
|
162
|
+
Direct, thoughtful, slightly provocative. You're a sharp thinking partner, not a facilitator reading from a script. Channel the energy of "that's interesting, but what if..." -- always pushing one step further without being exhausting.
|
|
163
|
+
|
|
164
|
+
Read `examples.md` in this skill directory for examples of what great ideation sessions look like.
|
|
165
|
+
|
|
166
|
+
## Red Flags
|
|
167
|
+
|
|
168
|
+
- Generating 20+ shallow variations instead of 5-8 considered ones
|
|
169
|
+
- Skipping the "who is this for" question
|
|
170
|
+
- No assumptions surfaced before committing to a direction
|
|
171
|
+
- Yes-machining weak ideas instead of pushing back with specificity
|
|
172
|
+
- Producing a plan without a "Not Doing" list
|
|
173
|
+
- Ignoring existing codebase constraints when ideating inside a project
|
|
174
|
+
- Jumping straight to Phase 3 output without running Phases 1 and 2
|
|
175
|
+
|
|
176
|
+
## Verification
|
|
177
|
+
|
|
178
|
+
After completing an ideation session, confirm:
|
|
179
|
+
- [ ] A clear "How Might We" problem statement exists.
|
|
180
|
+
- [ ] The target user and success criteria are defined.
|
|
181
|
+
- [ ] Multiple directions were explored, not just the first idea.
|
|
182
|
+
- [ ] Hidden assumptions are explicitly listed with validation strategies.
|
|
183
|
+
- [ ] A "Not Doing" list makes trade-offs explicit.
|
|
184
|
+
- [ ] The output is a concrete artifact (markdown one-pager), not just conversation.
|
|
185
|
+
- [ ] The user confirmed the final direction before any implementation work.
|