claude-code-kit 0.7.0__py3-none-any.whl

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 (209) hide show
  1. claude_code_kit-0.7.0.dist-info/METADATA +384 -0
  2. claude_code_kit-0.7.0.dist-info/RECORD +209 -0
  3. claude_code_kit-0.7.0.dist-info/WHEEL +4 -0
  4. claude_code_kit-0.7.0.dist-info/entry_points.txt +4 -0
  5. claude_code_kit-0.7.0.dist-info/licenses/LICENSE +21 -0
  6. claude_kit/__init__.py +10 -0
  7. claude_kit/__main__.py +8 -0
  8. claude_kit/_payload/agents/acceptance-reviewer.md +60 -0
  9. claude_kit/_payload/agents/auditor.md +76 -0
  10. claude_kit/_payload/agents/dependency-scanner.md +84 -0
  11. claude_kit/_payload/agents/developer.md +187 -0
  12. claude_kit/_payload/agents/devils-advocate.md +62 -0
  13. claude_kit/_payload/agents/devops-engineer.md +134 -0
  14. claude_kit/_payload/agents/e2e-tester.md +152 -0
  15. claude_kit/_payload/agents/em-reviewer.md +105 -0
  16. claude_kit/_payload/agents/incident-responder.md +64 -0
  17. claude_kit/_payload/agents/merge-reviewer.md +194 -0
  18. claude_kit/_payload/agents/observability-engineer.md +94 -0
  19. claude_kit/_payload/agents/orchestrator.md +551 -0
  20. claude_kit/_payload/agents/owasp-reviewer.md +76 -0
  21. claude_kit/_payload/agents/policy-validator.md +63 -0
  22. claude_kit/_payload/agents/pr-raiser.md +138 -0
  23. claude_kit/_payload/agents/risk-classifier.md +50 -0
  24. claude_kit/_payload/agents/sdlc-code-reviewer.md +196 -0
  25. claude_kit/_payload/agents/secret-scanner.md +70 -0
  26. claude_kit/_payload/agents/security-reviewer.md +80 -0
  27. claude_kit/_payload/agents/senior-backend-dev.md +199 -0
  28. claude_kit/_payload/agents/senior-frontend-dev.md +181 -0
  29. claude_kit/_payload/agents/senior-tester.md +206 -0
  30. claude_kit/_payload/agents/spec-doc-writer.md +331 -0
  31. claude_kit/_payload/agents/story-planner.md +56 -0
  32. claude_kit/_payload/agents/technical-architect.md +139 -0
  33. claude_kit/_payload/agents/tester.md +193 -0
  34. claude_kit/_payload/agents/ui-designer.md +73 -0
  35. claude_kit/_payload/agents/unit-tester.md +119 -0
  36. claude_kit/_payload/catalog/mcp.yaml +54 -0
  37. claude_kit/_payload/catalog/org.yaml +145 -0
  38. claude_kit/_payload/catalog/profiles.yaml +96 -0
  39. claude_kit/_payload/catalog/stacks.yaml +96 -0
  40. claude_kit/_payload/commands/init.md +36 -0
  41. claude_kit/_payload/commands/sdlc.md +18 -0
  42. claude_kit/_payload/commands/status.md +20 -0
  43. claude_kit/_payload/hooks/hooks.json +58 -0
  44. claude_kit/_payload/hooks/scripts/audit-log.sh +18 -0
  45. claude_kit/_payload/hooks/scripts/guard-secrets.sh +26 -0
  46. claude_kit/_payload/hooks/scripts/lint-fix.sh +38 -0
  47. claude_kit/_payload/hooks/scripts/load-continuity.sh +32 -0
  48. claude_kit/_payload/hooks/scripts/load-learnings.sh +40 -0
  49. claude_kit/_payload/hooks/scripts/type-check.sh +23 -0
  50. claude_kit/_payload/hooks/scripts/validate-frontmatter.sh +34 -0
  51. claude_kit/_payload/hooks/scripts/validate-settings.sh +21 -0
  52. claude_kit/_payload/hooks/scripts/warn-large-edits.sh +24 -0
  53. claude_kit/_payload/hooks/scripts/warn-missing-tests.sh +24 -0
  54. claude_kit/_payload/hooks/scripts/warn-sensitive-files.sh +30 -0
  55. claude_kit/_payload/hooks/scripts/warn-shared-modules.sh +33 -0
  56. claude_kit/_payload/rules/agent-guardrails.md +83 -0
  57. claude_kit/_payload/rules/agent-memory.md +106 -0
  58. claude_kit/_payload/rules/agent-resilience.md +61 -0
  59. claude_kit/_payload/rules/autonomy-levels.md +30 -0
  60. claude_kit/_payload/rules/code-organization.md +312 -0
  61. claude_kit/_payload/rules/continuity.md +84 -0
  62. claude_kit/_payload/rules/design-patterns.md +422 -0
  63. claude_kit/_payload/rules/devops-observability.md +57 -0
  64. claude_kit/_payload/rules/documentation.md +326 -0
  65. claude_kit/_payload/rules/evals.md +62 -0
  66. claude_kit/_payload/rules/frontend-best-practices.md +157 -0
  67. claude_kit/_payload/rules/goal-setting-and-monitoring.md +72 -0
  68. claude_kit/_payload/rules/human-in-the-loop.md +64 -0
  69. claude_kit/_payload/rules/linting-and-formatting.md +220 -0
  70. claude_kit/_payload/rules/mandatory-workflow.md +309 -0
  71. claude_kit/_payload/rules/model-tiers.md +34 -0
  72. claude_kit/_payload/rules/quality-gates.md +107 -0
  73. claude_kit/_payload/rules/rarv-cycle.md +31 -0
  74. claude_kit/_payload/rules/reasoning-techniques.md +62 -0
  75. claude_kit/_payload/rules/responsive-and-accessibility.md +353 -0
  76. claude_kit/_payload/rules/risk-classification.md +36 -0
  77. claude_kit/_payload/rules/testing.md +417 -0
  78. claude_kit/_payload/rules/tool-design.md +66 -0
  79. claude_kit/_payload/skills/_references/accessibility-checklist.md +160 -0
  80. claude_kit/_payload/skills/_references/orchestration-patterns.md +405 -0
  81. claude_kit/_payload/skills/_references/performance-checklist.md +153 -0
  82. claude_kit/_payload/skills/_references/security-checklist.md +134 -0
  83. claude_kit/_payload/skills/_references/testing-patterns.md +236 -0
  84. claude_kit/_payload/skills/accessibility-review/SKILL.md +56 -0
  85. claude_kit/_payload/skills/api-and-interface-design/SKILL.md +294 -0
  86. claude_kit/_payload/skills/api-integration/SKILL.md +348 -0
  87. claude_kit/_payload/skills/archive-sprint/SKILL.md +31 -0
  88. claude_kit/_payload/skills/backlog/SKILL.md +41 -0
  89. claude_kit/_payload/skills/backlog/item-template.md +20 -0
  90. claude_kit/_payload/skills/browser-testing-with-devtools/SKILL.md +302 -0
  91. claude_kit/_payload/skills/ci-cd-and-automation/SKILL.md +402 -0
  92. claude_kit/_payload/skills/code-review-and-quality/SKILL.md +347 -0
  93. claude_kit/_payload/skills/code-simplification/SKILL.md +331 -0
  94. claude_kit/_payload/skills/component-design/SKILL.md +171 -0
  95. claude_kit/_payload/skills/consolidate-learnings/SKILL.md +55 -0
  96. claude_kit/_payload/skills/context-engineering/SKILL.md +321 -0
  97. claude_kit/_payload/skills/debugging-and-error-recovery/SKILL.md +300 -0
  98. claude_kit/_payload/skills/decision/SKILL.md +46 -0
  99. claude_kit/_payload/skills/decision/adr-template.md +36 -0
  100. claude_kit/_payload/skills/deprecation-and-migration/SKILL.md +207 -0
  101. claude_kit/_payload/skills/documentation-and-adrs/SKILL.md +299 -0
  102. claude_kit/_payload/skills/doubt-driven-development/SKILL.md +243 -0
  103. claude_kit/_payload/skills/execute/SKILL.md +27 -0
  104. claude_kit/_payload/skills/frontend-ui-engineering/SKILL.md +328 -0
  105. claude_kit/_payload/skills/git-workflow-and-versioning/SKILL.md +300 -0
  106. claude_kit/_payload/skills/idea-refine/SKILL.md +178 -0
  107. claude_kit/_payload/skills/idea-refine/examples.md +238 -0
  108. claude_kit/_payload/skills/idea-refine/frameworks.md +99 -0
  109. claude_kit/_payload/skills/idea-refine/refinement-criteria.md +113 -0
  110. claude_kit/_payload/skills/idea-refine/scripts/idea-refine.sh +15 -0
  111. claude_kit/_payload/skills/incident-postmortem/SKILL.md +74 -0
  112. claude_kit/_payload/skills/incremental-implementation/SKILL.md +245 -0
  113. claude_kit/_payload/skills/interview-me/SKILL.md +221 -0
  114. claude_kit/_payload/skills/load-testing/SKILL.md +83 -0
  115. claude_kit/_payload/skills/manual-test/SKILL.md +516 -0
  116. claude_kit/_payload/skills/performance-optimization/SKILL.md +277 -0
  117. claude_kit/_payload/skills/planning-and-task-breakdown/SKILL.md +223 -0
  118. claude_kit/_payload/skills/playwright-verification/SKILL.md +205 -0
  119. claude_kit/_payload/skills/refresh-docs/SKILL.md +63 -0
  120. claude_kit/_payload/skills/remember/SKILL.md +96 -0
  121. claude_kit/_payload/skills/scope/SKILL.md +52 -0
  122. claude_kit/_payload/skills/scope/scope-template.md +82 -0
  123. claude_kit/_payload/skills/sdlc/SKILL.md +83 -0
  124. claude_kit/_payload/skills/security-and-hardening/SKILL.md +368 -0
  125. claude_kit/_payload/skills/security-verification/SKILL.md +209 -0
  126. claude_kit/_payload/skills/shipping-and-launch/SKILL.md +309 -0
  127. claude_kit/_payload/skills/smoke-test/SKILL.md +78 -0
  128. claude_kit/_payload/skills/source-driven-development/SKILL.md +195 -0
  129. claude_kit/_payload/skills/spec-driven-development/SKILL.md +200 -0
  130. claude_kit/_payload/skills/sprint/SKILL.md +67 -0
  131. claude_kit/_payload/skills/sprint/sprint-template.md +90 -0
  132. claude_kit/_payload/skills/test-driven-development/SKILL.md +383 -0
  133. claude_kit/_payload/skills/threat-model/SKILL.md +60 -0
  134. claude_kit/_payload/skills/triage/SKILL.md +87 -0
  135. claude_kit/_payload/skills/ui-ux-design/SKILL.md +71 -0
  136. claude_kit/_payload/skills/unit-test/SKILL.md +237 -0
  137. claude_kit/_payload/skills/using-agent-skills/SKILL.md +180 -0
  138. claude_kit/_payload/templates/CLAUDE.md +238 -0
  139. claude_kit/_payload/templates/CLAUDE.stack.md.tmpl +53 -0
  140. claude_kit/_payload/templates/CONTINUITY.template.md +35 -0
  141. claude_kit/_payload/templates/README.claude-sdlc.md.tmpl +219 -0
  142. claude_kit/_payload/templates/agent-memory/MEMORY.md +30 -0
  143. claude_kit/_payload/templates/agent-memory/api/.gitkeep +0 -0
  144. claude_kit/_payload/templates/agent-memory/architecture/.gitkeep +0 -0
  145. claude_kit/_payload/templates/agent-memory/debugging/.gitkeep +0 -0
  146. claude_kit/_payload/templates/agent-memory/gotchas/.gitkeep +0 -0
  147. claude_kit/_payload/templates/agent-memory/patterns/.gitkeep +0 -0
  148. claude_kit/_payload/templates/agent-memory/performance/.gitkeep +0 -0
  149. claude_kit/_payload/templates/artifacts/adr.md +18 -0
  150. claude_kit/_payload/templates/artifacts/feature-spec.md +29 -0
  151. claude_kit/_payload/templates/artifacts/release-plan.md +23 -0
  152. claude_kit/_payload/templates/artifacts/runbook.md +24 -0
  153. claude_kit/_payload/templates/artifacts/security-review.md +23 -0
  154. claude_kit/_payload/templates/artifacts/test-plan.md +22 -0
  155. claude_kit/_payload/templates/org/README.md +53 -0
  156. claude_kit/_payload/templates/org/agents/data-workflow-agent.md +59 -0
  157. claude_kit/_payload/templates/org/agents/founder-prototype-agent.md +61 -0
  158. claude_kit/_payload/templates/org/agents/internal-tools-builder.md +63 -0
  159. claude_kit/_payload/templates/org/agents/pm-copilot.md +60 -0
  160. claude_kit/_payload/templates/org/agents/support-ticket-engineer.md +63 -0
  161. claude_kit/_payload/templates/org/packs/devops-and-release/README.md +46 -0
  162. claude_kit/_payload/templates/org/packs/devops-and-release/pack.yaml +32 -0
  163. claude_kit/_payload/templates/org/packs/engineering-core/README.md +46 -0
  164. claude_kit/_payload/templates/org/packs/engineering-core/pack.yaml +44 -0
  165. claude_kit/_payload/templates/org/packs/non-engineer-builder/README.md +53 -0
  166. claude_kit/_payload/templates/org/packs/non-engineer-builder/pack.yaml +39 -0
  167. claude_kit/_payload/templates/org/packs/onboarding-and-docs/README.md +49 -0
  168. claude_kit/_payload/templates/org/packs/onboarding-and-docs/pack.yaml +26 -0
  169. claude_kit/_payload/templates/org/packs/product-to-code/README.md +50 -0
  170. claude_kit/_payload/templates/org/packs/product-to-code/pack.yaml +34 -0
  171. claude_kit/_payload/templates/org/packs/quality-and-review/README.md +53 -0
  172. claude_kit/_payload/templates/org/packs/quality-and-review/pack.yaml +40 -0
  173. claude_kit/_payload/templates/org/packs/security-and-compliance/README.md +50 -0
  174. claude_kit/_payload/templates/org/packs/security-and-compliance/pack.yaml +36 -0
  175. claude_kit/_payload/templates/org/rules/ai-working-agreement.md +45 -0
  176. claude_kit/_payload/templates/org/rules/ambiguity-resolution.md +36 -0
  177. claude_kit/_payload/templates/org/rules/branch-and-pr-policy.md +41 -0
  178. claude_kit/_payload/templates/org/rules/compliance-policy.md +50 -0
  179. claude_kit/_payload/templates/org/rules/non-engineer-safe-coding.md +37 -0
  180. claude_kit/_payload/templates/org/rules/pii-policy.md +46 -0
  181. claude_kit/_payload/templates/org/rules/production-data-policy.md +35 -0
  182. claude_kit/_payload/templates/org/rules/prompt-to-task-conversion.md +30 -0
  183. claude_kit/_payload/templates/org/rules/prototype-boundaries.md +40 -0
  184. claude_kit/_payload/templates/org/rules/secrets-policy.md +34 -0
  185. claude_kit/_payload/templates/org/skills/customer-issue-to-fix/SKILL.md +61 -0
  186. claude_kit/_payload/templates/org/skills/feature-from-idea/SKILL.md +56 -0
  187. claude_kit/_payload/templates/org/skills/prompt-to-safe-task/SKILL.md +59 -0
  188. claude_kit/_payload/templates/org/skills/prototype-to-production/SKILL.md +61 -0
  189. claude_kit/_payload/templates/org/skills/repo-onboarding/SKILL.md +60 -0
  190. claude_kit/_payload/templates/settings.json +53 -0
  191. claude_kit/_payload/templates/stacks/backend/python/fastapi/rules/fastapi-patterns.md +64 -0
  192. claude_kit/_payload/templates/stacks/db/mongodb/agents/migration-specialist.md +61 -0
  193. claude_kit/_payload/templates/stacks/db/mongodb/agents/mongodb-specialist.md +59 -0
  194. claude_kit/_payload/templates/stacks/db/mongodb/rules/mongodb-patterns.md +39 -0
  195. claude_kit/_payload/templates/stacks/db/postgres/agents/db-performance-reviewer.md +66 -0
  196. claude_kit/_payload/templates/stacks/db/postgres/agents/migration-specialist.md +56 -0
  197. claude_kit/_payload/templates/stacks/db/postgres/agents/postgres-specialist.md +58 -0
  198. claude_kit/_payload/templates/stacks/db/postgres/rules/database-performance.md +64 -0
  199. claude_kit/_payload/templates/stacks/db/postgres/rules/postgres-patterns.md +43 -0
  200. claude_kit/_payload/templates/stacks/frontend/react/rules/react-patterns.md +63 -0
  201. claude_kit/catalog.py +476 -0
  202. claude_kit/cli.py +327 -0
  203. claude_kit/hooks.py +246 -0
  204. claude_kit/models.py +205 -0
  205. claude_kit/prompts.py +209 -0
  206. claude_kit/render.py +146 -0
  207. claude_kit/scaffold.py +492 -0
  208. claude_kit/upgrader.py +294 -0
  209. claude_kit/validator.py +197 -0
@@ -0,0 +1,299 @@
1
+ ---
2
+ name: documentation-and-adrs
3
+ description: Records decisions and documentation. Use when making architectural decisions, changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.
4
+ ---
5
+
6
+ # Documentation and ADRs
7
+
8
+ ## Overview
9
+
10
+ Document decisions, not just code. The most valuable documentation captures the *why* — the context, constraints, and trade-offs that led to a decision. Code shows *what* was built; documentation explains *why it was built this way* and *what alternatives were considered*. This context is essential for future humans and agents working in the codebase.
11
+
12
+ ## When to Use
13
+
14
+ - Making a significant architectural decision
15
+ - Choosing between competing approaches
16
+ - Adding or changing a public API
17
+ - Shipping a feature that changes user-facing behavior
18
+ - Onboarding new team members (or agents) to the project
19
+ - When you find yourself explaining the same thing repeatedly
20
+
21
+ **When NOT to use:** Don't document obvious code. Don't add comments that restate what the code already says. Don't write docs for throwaway prototypes.
22
+
23
+ ## Architecture Decision Records (ADRs)
24
+
25
+ ADRs capture the reasoning behind significant technical decisions. They're the highest-value documentation you can write.
26
+
27
+ ### When to Write an ADR
28
+
29
+ - Choosing a framework, library, or major dependency
30
+ - Designing a data model or database schema
31
+ - Selecting an authentication strategy
32
+ - Deciding on an API architecture (REST vs. GraphQL vs. tRPC)
33
+ - Choosing between build tools, hosting platforms, or infrastructure
34
+ - Any decision that would be expensive to reverse
35
+
36
+ ### ADR Template
37
+
38
+ Store ADRs in `docs/decisions/` with sequential numbering:
39
+
40
+ ```markdown
41
+ # ADR-001: Use PostgreSQL for primary database
42
+
43
+ ## Status
44
+ Accepted | Superseded by ADR-XXX | Deprecated
45
+
46
+ ## Date
47
+ 2025-01-15
48
+
49
+ ## Context
50
+ We need a primary database for the task management application. Key requirements:
51
+ - Relational data model (users, tasks, teams with relationships)
52
+ - ACID transactions for task state changes
53
+ - Support for full-text search on task content
54
+ - Managed hosting available (for small team, limited ops capacity)
55
+
56
+ ## Decision
57
+ Use PostgreSQL with Prisma ORM.
58
+
59
+ ## Alternatives Considered
60
+
61
+ ### MongoDB
62
+ - Pros: Flexible schema, easy to start with
63
+ - Cons: Our data is inherently relational; would need to manage relationships manually
64
+ - Rejected: Relational data in a document store leads to complex joins or data duplication
65
+
66
+ ### SQLite
67
+ - Pros: Zero configuration, embedded, fast for reads
68
+ - Cons: Limited concurrent write support, no managed hosting for production
69
+ - Rejected: Not suitable for multi-user web application in production
70
+
71
+ ### MySQL
72
+ - Pros: Mature, widely supported
73
+ - Cons: PostgreSQL has better JSON support, full-text search, and ecosystem tooling
74
+ - Rejected: PostgreSQL is the better fit for our feature requirements
75
+
76
+ ## Consequences
77
+ - Prisma provides type-safe database access and migration management
78
+ - We can use PostgreSQL's full-text search instead of adding Elasticsearch
79
+ - Team needs PostgreSQL knowledge (standard skill, low risk)
80
+ - Hosting on managed service (Supabase, Neon, or RDS)
81
+ ```
82
+
83
+ ### ADR Lifecycle
84
+
85
+ ```
86
+ PROPOSED → ACCEPTED → (SUPERSEDED or DEPRECATED)
87
+ ```
88
+
89
+ - **Don't delete old ADRs.** They capture historical context.
90
+ - When a decision changes, write a new ADR that references and supersedes the old one.
91
+
92
+ ## Inline Documentation
93
+
94
+ ### When to Comment
95
+
96
+ Comment the *why*, not the *what*:
97
+
98
+ ```typescript
99
+ // BAD: Restates the code
100
+ // Increment counter by 1
101
+ counter += 1;
102
+
103
+ // GOOD: Explains non-obvious intent
104
+ // Rate limit uses a sliding window — reset counter at window boundary,
105
+ // not on a fixed schedule, to prevent burst attacks at window edges
106
+ if (now - windowStart > WINDOW_SIZE_MS) {
107
+ counter = 0;
108
+ windowStart = now;
109
+ }
110
+ ```
111
+
112
+ ### When NOT to Comment
113
+
114
+ ```typescript
115
+ // Don't comment self-explanatory code
116
+ function calculateTotal(items: CartItem[]): number {
117
+ return items.reduce((sum, item) => sum + item.price * item.quantity, 0);
118
+ }
119
+
120
+ // Don't leave TODO comments for things you should just do now
121
+ // TODO: add error handling ← Just add it
122
+
123
+ // Don't leave commented-out code
124
+ // const oldImplementation = () => { ... } ← Delete it, git has history
125
+ ```
126
+
127
+ ### Document Known Gotchas
128
+
129
+ ```typescript
130
+ /**
131
+ * IMPORTANT: This function must be called before the first render.
132
+ * If called after hydration, it causes a flash of unstyled content
133
+ * because the theme context isn't available during SSR.
134
+ *
135
+ * See ADR-003 for the full design rationale.
136
+ */
137
+ export function initializeTheme(theme: Theme): void {
138
+ // ...
139
+ }
140
+ ```
141
+
142
+ ## API Documentation
143
+
144
+ For public APIs (REST, GraphQL, library interfaces):
145
+
146
+ ### Inline with Types (Example)
147
+
148
+ ```typescript
149
+ /**
150
+ * Creates a new task.
151
+ *
152
+ * @param input - Task creation data (title required, description optional)
153
+ * @returns The created task with server-generated ID and timestamps
154
+ * @throws {ValidationError} If title is empty or exceeds 200 characters
155
+ * @throws {AuthenticationError} If the user is not authenticated
156
+ *
157
+ * @example
158
+ * const task = await createTask({ title: 'Buy groceries' });
159
+ * console.log(task.id); // "task_abc123"
160
+ */
161
+ export async function createTask(input: CreateTaskInput): Promise<Task> {
162
+ // ...
163
+ }
164
+ ```
165
+
166
+ ```python
167
+ def create_task(input: CreateTaskInput) -> Task:
168
+ """Create a new task.
169
+
170
+ Args:
171
+ input: Task creation data (title required, description optional).
172
+
173
+ Returns:
174
+ The created task with server-generated ID and timestamps.
175
+
176
+ Raises:
177
+ ValidationError: If title is empty or exceeds 200 characters.
178
+ AuthenticationError: If the user is not authenticated.
179
+
180
+ Example:
181
+ >>> task = create_task(CreateTaskInput(title="Buy groceries"))
182
+ >>> print(task.id) # "task_abc123"
183
+ """
184
+ # ...
185
+ ```
186
+
187
+ ### OpenAPI / Swagger for REST APIs
188
+
189
+ ```yaml
190
+ paths:
191
+ /api/tasks:
192
+ post:
193
+ summary: Create a task
194
+ requestBody:
195
+ required: true
196
+ content:
197
+ application/json:
198
+ schema:
199
+ $ref: '#/components/schemas/CreateTaskInput'
200
+ responses:
201
+ '201':
202
+ description: Task created
203
+ content:
204
+ application/json:
205
+ schema:
206
+ $ref: '#/components/schemas/Task'
207
+ '422':
208
+ description: Validation error
209
+ ```
210
+
211
+ ## README Structure
212
+
213
+ Every project should have a README that covers:
214
+
215
+ ```markdown
216
+ # Project Name
217
+
218
+ One-paragraph description of what this project does.
219
+
220
+ ## Quick Start
221
+ 1. Clone the repo
222
+ 2. Install dependencies: `<package manager install command>`
223
+ 3. Set up environment: `cp .env.example .env`
224
+ 4. Run the dev server: `<dev server command>`
225
+
226
+ ## Commands
227
+ | Command | Description |
228
+ |---------|-------------|
229
+ | `<dev command>` | Start development server |
230
+ | `<test command>` | Run tests |
231
+ | `<build command>` | Production build |
232
+ | `<lint command>` | Run linter |
233
+
234
+ ## Architecture
235
+ Brief overview of the project structure and key design decisions.
236
+ Link to ADRs for details.
237
+
238
+ ## Contributing
239
+ How to contribute, coding standards, PR process.
240
+ ```
241
+
242
+ ## Changelog Maintenance
243
+
244
+ For shipped features:
245
+
246
+ ```markdown
247
+ # Changelog
248
+
249
+ ## [1.2.0] - 2025-01-20
250
+ ### Added
251
+ - Task sharing: users can share tasks with team members (#123)
252
+ - Email notifications for task assignments (#124)
253
+
254
+ ### Fixed
255
+ - Duplicate tasks appearing when rapidly clicking create button (#125)
256
+
257
+ ### Changed
258
+ - Task list now loads 50 items per page (was 20) for better UX (#126)
259
+ ```
260
+
261
+ ## Documentation for Agents
262
+
263
+ Special consideration for AI agent context:
264
+
265
+ - **CLAUDE.md / rules files** — Document project conventions so agents follow them
266
+ - **Spec files** — Keep specs updated so agents build the right thing
267
+ - **ADRs** — Help agents understand why past decisions were made (prevents re-deciding)
268
+ - **Inline gotchas** — Prevent agents from falling into known traps
269
+
270
+ ## Common Rationalizations
271
+
272
+ | Rationalization | Reality |
273
+ |---|---|
274
+ | "The code is self-documenting" | Code shows what. It doesn't show why, what alternatives were rejected, or what constraints apply. |
275
+ | "We'll write docs when the API stabilizes" | APIs stabilize faster when you document them. The doc is the first test of the design. |
276
+ | "Nobody reads docs" | Agents do. Future engineers do. Your 3-months-later self does. |
277
+ | "ADRs are overhead" | A 10-minute ADR prevents a 2-hour debate about the same decision six months later. |
278
+ | "Comments get outdated" | Comments on *why* are stable. Comments on *what* get outdated — that's why you only write the former. |
279
+
280
+ ## Red Flags
281
+
282
+ - Architectural decisions with no written rationale
283
+ - Public APIs with no documentation or types
284
+ - README that doesn't explain how to run the project
285
+ - Commented-out code instead of deletion
286
+ - TODO comments that have been there for weeks
287
+ - No ADRs in a project with significant architectural choices
288
+ - Documentation that restates the code instead of explaining intent
289
+
290
+ ## Verification
291
+
292
+ After documenting:
293
+
294
+ - [ ] ADRs exist for all significant architectural decisions
295
+ - [ ] README covers quick start, commands, and architecture overview
296
+ - [ ] API functions have parameter and return type documentation
297
+ - [ ] Known gotchas are documented inline where they matter
298
+ - [ ] No commented-out code remains
299
+ - [ ] Rules files (CLAUDE.md etc.) are current and accurate
@@ -0,0 +1,243 @@
1
+ ---
2
+ name: doubt-driven-development
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
+ ---
5
+
6
+ # Doubt-Driven Development
7
+
8
+ ## Overview
9
+
10
+ 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.
11
+
12
+ 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.
13
+
14
+ ## When to Use
15
+
16
+ A decision is **non-trivial** when at least one of these is true:
17
+
18
+ - It introduces or modifies branching logic
19
+ - It crosses a module or service boundary
20
+ - It asserts a property the type system or compiler cannot verify (thread safety, idempotence, ordering, invariants)
21
+ - Its correctness depends on context the future reader cannot see
22
+ - Its blast radius is irreversible (production deploy, data migration, public API change)
23
+
24
+ Apply the skill when:
25
+
26
+ - About to make an architectural decision under uncertainty
27
+ - About to commit non-trivial code
28
+ - About to claim a non-obvious fact ("this is safe", "this scales", "this matches the spec")
29
+ - Working in code you don't fully understand
30
+
31
+ **When NOT to use:**
32
+
33
+ - Mechanical operations (renaming, formatting, file moves)
34
+ - Following a clear, unambiguous user instruction
35
+ - Reading or summarizing existing code
36
+ - One-line changes with obvious correctness
37
+ - Pure tooling operations (running tests, listing files)
38
+ - The user has explicitly asked for speed over verification
39
+
40
+ If you doubt every keystroke, you ship nothing. The skill applies only to non-trivial decisions as defined above.
41
+
42
+ ## Loading Constraints
43
+
44
+ This skill is designed for the **main-session orchestrator**, where Step 3 (DOUBT, detailed below) can spawn a fresh-context reviewer.
45
+
46
+ - **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 `.claude/skills/_references/orchestration-patterns.md` ("personas do not invoke other personas").
47
+ - **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.
48
+
49
+ ## The Process
50
+
51
+ Copy this checklist when applying the skill:
52
+
53
+ ```
54
+ Doubt cycle:
55
+ - [ ] Step 1: CLAIM — wrote the claim + why-it-matters
56
+ - [ ] Step 2: EXTRACT — isolated artifact + contract, stripped reasoning
57
+ - [ ] Step 3: DOUBT — invoked fresh-context reviewer with adversarial prompt
58
+ - [ ] Step 4: RECONCILE — classified every finding against the artifact text
59
+ - [ ] Step 5: STOP — met stop condition (trivial findings, 3 cycles, or user override)
60
+ ```
61
+
62
+ ### Step 1: CLAIM — Surface what stands
63
+
64
+ Name the decision in two or three lines:
65
+
66
+ ```
67
+ CLAIM: "The new caching layer is thread-safe under the
68
+ read-heavy workload described in the spec."
69
+ WHY THIS MATTERS: a race here corrupts user data and is
70
+ hard to detect in QA.
71
+ ```
72
+
73
+ If you can't write the claim that compactly, you have a vibe, not a decision. Surface it before scrutinizing it.
74
+
75
+ ### Step 2: EXTRACT — Smallest reviewable unit
76
+
77
+ A fresh-context reviewer needs the **artifact** and the **contract**, not the journey.
78
+
79
+ - Code: the diff or the function — not the whole file
80
+ - Decision: the proposal in 3–5 sentences plus the constraints it has to satisfy
81
+ - 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)
82
+
83
+ 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.
84
+
85
+ ### Step 3: DOUBT — Invoke the fresh-context reviewer
86
+
87
+ The reviewer's prompt **must be adversarial**. Framing decides the answer.
88
+
89
+ ```
90
+ Adversarial review. Find what is wrong with this artifact.
91
+ Assume the author is overconfident. Look for:
92
+ - Unstated assumptions
93
+ - Edge cases not handled
94
+ - Hidden coupling or shared state
95
+ - Ways the contract could be violated
96
+ - Existing conventions this might break
97
+ - Failure modes under unexpected input
98
+
99
+ Do NOT validate. Do NOT summarize. Find issues, or state
100
+ explicitly that you cannot find any after thorough examination.
101
+
102
+ ARTIFACT: <paste artifact>
103
+ CONTRACT: <paste contract>
104
+ ```
105
+
106
+ **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.
107
+
108
+ 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.
109
+
110
+ **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.
111
+
112
+ #### Cross-model escalation
113
+
114
+ 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.
115
+
116
+ **Interactive sessions: always offer. Never silently skip.**
117
+
118
+ **Step 1: Ask the user**
119
+
120
+ After the single-model review in Step 3 above, but before RECONCILE, pause and ask:
121
+
122
+ > *"Single-model review complete. Want a cross-model second opinion? Options: Gemini CLI, Codex CLI, manual external review (you paste it elsewhere), or skip."*
123
+
124
+ 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.
125
+
126
+ **Step 2: If the user picks a CLI — verify, then invoke**
127
+
128
+ 1. Check the tool is in PATH (`which gemini`, `which codex`).
129
+ 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.
130
+ 3. Confirm the exact invocation with the user, including required flags, auth, and env vars (e.g., API keys). Implementations vary; never assume.
131
+ 4. Pass ARTIFACT + CONTRACT + the adversarial prompt **only**. No session context, no CLAIM.
132
+ 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.
133
+ 6. Take the output into Step 4 (RECONCILE).
134
+
135
+ **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.
136
+
137
+ Example shapes (verify flags against your installed tool — syntax differs across implementations and versions):
138
+
139
+ ```bash
140
+ # Write the adversarial prompt + ARTIFACT + CONTRACT to a temp file first.
141
+ # Then pipe via stdin so shell metacharacters in the artifact stay inert.
142
+
143
+ # Codex (read-only sandbox keeps the CLI from writing to your workspace):
144
+ codex exec --sandbox read-only -C <repo-path> - < /tmp/doubt-prompt.md
145
+
146
+ # Gemini ('--approval-mode plan' is read-only; '-p ""' triggers non-interactive
147
+ # mode and the prompt is read from stdin):
148
+ gemini --approval-mode plan -p "" < /tmp/doubt-prompt.md
149
+ ```
150
+
151
+ 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.
152
+
153
+ **Step 3: If the CLI is unavailable or fails**
154
+
155
+ 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.
156
+
157
+ **Step 4: If the user skips**
158
+
159
+ Acknowledge the skip in the output (*"Proceeding with single-model findings only"*) and continue to RECONCILE. Skipping is fine; silent skipping is not.
160
+
161
+ **Non-interactive contexts** (CI, `/loop`, autonomous-loop, scheduled runs):
162
+
163
+ - Cross-model is **skipped**, and the skip must be **announced** in the output: *"Cross-model skipped: non-interactive context."*
164
+ - **Never invoke an external CLI without explicit user authorization** — this is a load-bearing safety property.
165
+
166
+ Cross-model adds cost, latency, and tool fragility. The agent surfaces the choice every cycle; the user decides whether this artifact warrants it.
167
+
168
+ ### Step 4: RECONCILE — Fold findings back
169
+
170
+ 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.
171
+
172
+ For each finding, classify in this **precedence order** (first matching class wins):
173
+
174
+ 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.
175
+ 2. **Valid + actionable** — real issue requiring a change to the artifact. Change it, re-loop.
176
+ 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.
177
+ 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?
178
+
179
+ A fresh reviewer can be wrong because it lacks context. Don't defer just because it's "fresh."
180
+
181
+ ### Step 5: STOP — Bounded loop, not recursion
182
+
183
+ Stop when:
184
+
185
+ - Next iteration returns only trivial or already-considered findings, **or**
186
+ - 3 cycles completed (escalate to user, don't grind a fourth alone), **or**
187
+ - User explicitly says "ship it"
188
+
189
+ 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.
190
+
191
+ 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.
192
+
193
+ ## Common Rationalizations
194
+
195
+ | Rationalization | Reality |
196
+ |---|---|
197
+ | "I'm confident, skip the doubt step" | Confidence correlates poorly with correctness on novel problems. Moments of certainty are exactly when blind spots hide. |
198
+ | "Spawning a reviewer is expensive" | Debugging a wrong commit in production is more expensive. The check is bounded; the bug isn't. |
199
+ | "The reviewer will just nitpick" | Only if unscoped. Constrain the prompt to "issues that would make this fail under the contract." |
200
+ | "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. |
201
+ | "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." |
202
+ | "Two opinions are always better than one" | Not when the second has less context and produces noise. Reconcile, don't defer. |
203
+ | "The reviewer disagreed so I was wrong" | The reviewer lacks your context — disagreement is information, not verdict. Re-read the artifact, classify, then decide. |
204
+ | "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. |
205
+ | "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. |
206
+
207
+ ## Red Flags
208
+
209
+ - Spawning a fresh-context reviewer for a one-line rename or formatting change
210
+ - Treating reviewer output as authoritative without re-reading the artifact text
211
+ - Looping >3 cycles without escalating to the user
212
+ - Prompting the reviewer with "is this good?" instead of "find issues"
213
+ - Skipping doubt under time pressure on a high-stakes decision
214
+ - Re-spawning fresh-context on an unchanged artifact (you'll get the same findings; you're stalling)
215
+ - **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.
216
+ - Doubting only after committing — that's `/review`, not doubt-driven development
217
+ - Hardcoding an external CLI invocation without confirming with the user that the tool exists, is configured, and accepts that exact syntax
218
+ - **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.
219
+ - Falling back silently when an external CLI errors or is missing — surface the failure and let the user redirect
220
+ - Stripping the contract from the reviewer's input
221
+ - Passing the CLAIM to the reviewer (biases toward agreement)
222
+
223
+ ## Interaction with Other Skills
224
+
225
+ - **`code-review-and-quality` / `/review`**: complementary. `/review` is post-hoc PR verdict; doubt-driven is in-flight per-decision. Use both.
226
+ - **`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.
227
+ - **`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.
228
+ - **`debugging-and-error-recovery`**: when the reviewer surfaces a real failure mode, drop into the debugging skill to localize and fix.
229
+ - **Repo orchestration rules** (`.claude/skills/_references/orchestration-patterns.md`): this skill orchestrates from the main session. A persona calling another persona is anti-pattern B — see Loading Constraints above.
230
+
231
+ ## Verification
232
+
233
+ After applying doubt-driven development:
234
+
235
+ - [ ] Every non-trivial decision (per the definition above) was named explicitly as a CLAIM before standing
236
+ - [ ] 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)
237
+ - [ ] The reviewer received ARTIFACT + CONTRACT — NOT the CLAIM, NOT your reasoning
238
+ - [ ] The reviewer's prompt was adversarial ("find issues"), not validating ("is it good")
239
+ - [ ] Findings were classified against the artifact text (not rubber-stamped) using the precedence: contract misread / actionable / trade-off / noise
240
+ - [ ] A stop condition was met (trivial findings, 3 cycles, or user override)
241
+ - [ ] In interactive mode, cross-model was **explicitly offered** to the user (regardless of artifact stakes) and the response was acknowledged in the output
242
+ - [ ] In non-interactive mode, cross-model was skipped and the skip was announced
243
+ - [ ] 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,27 @@
1
+ ---
2
+ name: execute
3
+ description: Takes raw text/requirement, optimizes it into a precise prompt, then executes it immediately. Use when you have a rough idea and want Claude to refine and act on it in one step.
4
+ argument-hint: <your raw requirement text>
5
+ ---
6
+
7
+ You received raw text from the user: $ARGUMENTS
8
+
9
+ ## Step 1: Optimize into a precise prompt
10
+
11
+ Analyze the raw text and transform it into a well-structured prompt by:
12
+
13
+ 1. **Clarify intent** — What exactly does the user want done? Extract the core action.
14
+ 2. **Add specificity** — Fill in implicit details (file paths, technologies, scope) based on the current project context.
15
+ 3. **Structure it** — Break vague requests into concrete steps.
16
+ 4. **Add constraints** — Include quality bars, edge cases, and acceptance criteria the user likely expects but didn't state.
17
+ 5. **Remove ambiguity** — Replace vague words ("fix it", "make it better", "clean up") with specific actions.
18
+
19
+ Output the optimized prompt in a blockquote so the user can see what you're about to execute:
20
+
21
+ > **Optimized prompt:** [the refined prompt]
22
+
23
+ ## Step 2: Execute immediately
24
+
25
+ Now execute the optimized prompt as if the user had typed it directly. Follow all project rules (CLAUDE.md, mandatory workflow, etc.) and complete the task end-to-end.
26
+
27
+ Do NOT stop after showing the prompt. Do NOT ask for confirmation. Optimize and execute in one shot.