cfsa-antigravity 2.19.0 → 2.19.2

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 (200) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/kit-sync.md +3 -3
  3. package/template/.claude/commands/audit-ambiguity-execute.md +6 -0
  4. package/template/.claude/commands/audit-ambiguity-rubrics.md +6 -0
  5. package/template/.claude/commands/audit-ambiguity.md +6 -0
  6. package/template/.claude/commands/bootstrap-agents-fill.md +6 -0
  7. package/template/.claude/commands/bootstrap-agents-provision.md +6 -0
  8. package/template/.claude/commands/bootstrap-agents.md +6 -0
  9. package/template/.claude/commands/create-prd-architecture.md +6 -0
  10. package/template/.claude/commands/create-prd-compile.md +6 -0
  11. package/template/.claude/commands/create-prd-design-system.md +6 -0
  12. package/template/.claude/commands/create-prd-security.md +6 -0
  13. package/template/.claude/commands/create-prd-stack.md +6 -0
  14. package/template/.claude/commands/decompose-architecture-structure.md +6 -0
  15. package/template/.claude/commands/decompose-architecture-validate.md +6 -0
  16. package/template/.claude/commands/evolve-contract.md +6 -0
  17. package/template/.claude/commands/evolve-feature-cascade.md +6 -0
  18. package/template/.claude/commands/evolve-feature-classify.md +6 -0
  19. package/template/.claude/commands/evolve-feature.md +6 -0
  20. package/template/.claude/commands/ideate-discover.md +6 -0
  21. package/template/.claude/commands/ideate-extract.md +6 -0
  22. package/template/.claude/commands/ideate-validate.md +6 -0
  23. package/template/.claude/commands/implement-slice-setup.md +6 -0
  24. package/template/.claude/commands/implement-slice-tdd.md +6 -0
  25. package/template/.claude/commands/plan-phase-preflight.md +6 -0
  26. package/template/.claude/commands/plan-phase-write.md +6 -0
  27. package/template/.claude/commands/propagate-decision-apply.md +6 -0
  28. package/template/.claude/commands/propagate-decision-scan.md +6 -0
  29. package/template/.claude/commands/propagate-decision.md +6 -0
  30. package/template/.claude/commands/remediate-pipeline-assess.md +6 -0
  31. package/template/.claude/commands/remediate-pipeline-execute.md +6 -0
  32. package/template/.claude/commands/remediate-pipeline.md +6 -0
  33. package/template/.claude/commands/remediate-shard-split.md +6 -0
  34. package/template/.claude/commands/resolve-ambiguity.md +6 -0
  35. package/template/.claude/commands/setup-workspace-cicd.md +6 -0
  36. package/template/.claude/commands/setup-workspace-data.md +6 -0
  37. package/template/.claude/commands/setup-workspace-hosting.md +6 -0
  38. package/template/.claude/commands/setup-workspace-scaffold.md +6 -0
  39. package/template/.claude/commands/sync-kit.md +6 -0
  40. package/template/.claude/commands/update-architecture-map.md +6 -0
  41. package/template/.claude/commands/validate-phase-quality.md +6 -0
  42. package/template/.claude/commands/validate-phase-readiness.md +6 -0
  43. package/template/.claude/commands/verify-infrastructure.md +6 -0
  44. package/template/.claude/commands/write-architecture-spec-deepen.md +6 -0
  45. package/template/.claude/commands/write-architecture-spec-design.md +6 -0
  46. package/template/.claude/commands/write-be-spec-classify.md +6 -0
  47. package/template/.claude/commands/write-be-spec-write.md +6 -0
  48. package/template/.claude/commands/write-fe-spec-classify.md +6 -0
  49. package/template/.claude/commands/write-fe-spec-write.md +6 -0
  50. package/template/.claude/skills/accessibility/SKILL.md +522 -0
  51. package/template/.claude/skills/accessibility/references/WCAG.md +162 -0
  52. package/template/.claude/skills/accessibility/references/ia-spec-checklist.md +35 -0
  53. package/template/.claude/skills/adversarial-review/SKILL.md +90 -0
  54. package/template/.claude/skills/antigravity-workflows/SKILL.md +81 -0
  55. package/template/.claude/skills/antigravity-workflows/resources/implementation-playbook.md +36 -0
  56. package/template/.claude/skills/api-design-principles/SKILL.md +169 -0
  57. package/template/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
  58. package/template/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
  59. package/template/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
  60. package/template/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
  61. package/template/.claude/skills/api-design-principles/resources/implementation-playbook.md +513 -0
  62. package/template/.claude/skills/api-versioning/SKILL.md +166 -0
  63. package/template/.claude/skills/api-versioning/references/typescript.md +157 -0
  64. package/template/.claude/skills/architecture-mapping/SKILL.md +219 -0
  65. package/template/.claude/skills/bootstrap-agents/SKILL.md +258 -0
  66. package/template/.claude/skills/brainstorming/SKILL.md +177 -0
  67. package/template/.claude/skills/brand-guidelines/SKILL.md +44 -0
  68. package/template/.claude/skills/clean-code/SKILL.md +196 -0
  69. package/template/.claude/skills/clean-code/references/typescript.md +126 -0
  70. package/template/.claude/skills/code-review-pro/SKILL.md +152 -0
  71. package/template/.claude/skills/concise-planning/SKILL.md +107 -0
  72. package/template/.claude/skills/cross-layer-consistency/SKILL.md +117 -0
  73. package/template/.claude/skills/database-schema-design/SKILL.md +205 -0
  74. package/template/.claude/skills/database-schema-design/references/relational.md +228 -0
  75. package/template/.claude/skills/deployment-procedures/SKILL.md +241 -0
  76. package/template/.claude/skills/design-anti-cliche/SKILL.md +159 -0
  77. package/template/.claude/skills/design-direction/SKILL.md +45 -0
  78. package/template/.claude/skills/error-handling-patterns/SKILL.md +226 -0
  79. package/template/.claude/skills/error-handling-patterns/references/go.md +162 -0
  80. package/template/.claude/skills/error-handling-patterns/references/python.md +262 -0
  81. package/template/.claude/skills/error-handling-patterns/references/rust.md +112 -0
  82. package/template/.claude/skills/error-handling-patterns/references/typescript.md +178 -0
  83. package/template/.claude/skills/find-skills/SKILL.md +145 -0
  84. package/template/.claude/skills/git-advanced/SKILL.md +972 -0
  85. package/template/.claude/skills/git-workflow/SKILL.md +420 -0
  86. package/template/.claude/skills/idea-extraction/SKILL.md +644 -0
  87. package/template/.claude/skills/logging-best-practices/SKILL.md +192 -0
  88. package/template/.claude/skills/logging-best-practices/references/go.md +49 -0
  89. package/template/.claude/skills/logging-best-practices/references/python.md +52 -0
  90. package/template/.claude/skills/logging-best-practices/references/typescript.md +215 -0
  91. package/template/.claude/skills/migration-management/SKILL.md +200 -0
  92. package/template/.claude/skills/migration-management/references/relational.md +214 -0
  93. package/template/.claude/skills/minimalist-surgical-development/SKILL.md +135 -0
  94. package/template/.claude/skills/parallel-agents/SKILL.md +165 -0
  95. package/template/.claude/skills/parallel-debugging/SKILL.md +135 -0
  96. package/template/.claude/skills/parallel-feature-development/SKILL.md +157 -0
  97. package/template/.claude/skills/performance-budgeting/SKILL.md +144 -0
  98. package/template/.claude/skills/pipeline-rubrics/SKILL.md +51 -0
  99. package/template/.claude/skills/pipeline-rubrics/references/architecture-rubric.md +19 -0
  100. package/template/.claude/skills/pipeline-rubrics/references/be-rubric.md +21 -0
  101. package/template/.claude/skills/pipeline-rubrics/references/fe-rubric.md +20 -0
  102. package/template/.claude/skills/pipeline-rubrics/references/ia-rubric.md +19 -0
  103. package/template/.claude/skills/pipeline-rubrics/references/scoring.md +32 -0
  104. package/template/.claude/skills/pipeline-rubrics/references/vision-rubric.md +12 -0
  105. package/template/.claude/skills/prd-templates/SKILL.md +107 -0
  106. package/template/.claude/skills/prd-templates/references/architecture-completeness-checklist.md +28 -0
  107. package/template/.claude/skills/prd-templates/references/architecture-design-template.md +88 -0
  108. package/template/.claude/skills/prd-templates/references/be-spec-classification.md +41 -0
  109. package/template/.claude/skills/prd-templates/references/be-spec-template.md +107 -0
  110. package/template/.claude/skills/prd-templates/references/bootstrap-verification-protocol.md +50 -0
  111. package/template/.claude/skills/prd-templates/references/constraint-exploration.md +41 -0
  112. package/template/.claude/skills/prd-templates/references/data-placement-template.md +74 -0
  113. package/template/.claude/skills/prd-templates/references/decision-confirmation-protocol.md +68 -0
  114. package/template/.claude/skills/prd-templates/references/decision-propagation.md +121 -0
  115. package/template/.claude/skills/prd-templates/references/decomposition-templates.md +226 -0
  116. package/template/.claude/skills/prd-templates/references/deep-ideation-loading-protocol.md +114 -0
  117. package/template/.claude/skills/prd-templates/references/design-system-decisions.md +198 -0
  118. package/template/.claude/skills/prd-templates/references/design-system-prerequisite-check.md +18 -0
  119. package/template/.claude/skills/prd-templates/references/domain-exhaustion-criteria.md +37 -0
  120. package/template/.claude/skills/prd-templates/references/engagement-tier-protocol.md +58 -0
  121. package/template/.claude/skills/prd-templates/references/engineering-standards-template.md +126 -0
  122. package/template/.claude/skills/prd-templates/references/evolution-layer-guidance.md +91 -0
  123. package/template/.claude/skills/prd-templates/references/expansion-modes.md +27 -0
  124. package/template/.claude/skills/prd-templates/references/fe-classification-procedures.md +47 -0
  125. package/template/.claude/skills/prd-templates/references/fe-spec-template.md +90 -0
  126. package/template/.claude/skills/prd-templates/references/feature-ledger-protocol.md +149 -0
  127. package/template/.claude/skills/prd-templates/references/folder-seeding-protocol.md +77 -0
  128. package/template/.claude/skills/prd-templates/references/fractal-cx-template.md +58 -0
  129. package/template/.claude/skills/prd-templates/references/fractal-feature-template.md +93 -0
  130. package/template/.claude/skills/prd-templates/references/fractal-node-index-template.md +55 -0
  131. package/template/.claude/skills/prd-templates/references/gate-applicability.md +92 -0
  132. package/template/.claude/skills/prd-templates/references/ideation-crosscut-template.md +36 -0
  133. package/template/.claude/skills/prd-templates/references/ideation-index-template.md +111 -0
  134. package/template/.claude/skills/prd-templates/references/ideation-meta-template.md +126 -0
  135. package/template/.claude/skills/prd-templates/references/infrastructure-report-template.md +71 -0
  136. package/template/.claude/skills/prd-templates/references/input-classification.md +23 -0
  137. package/template/.claude/skills/prd-templates/references/map-guard-protocol.md +65 -0
  138. package/template/.claude/skills/prd-templates/references/operational-templates.md +116 -0
  139. package/template/.claude/skills/prd-templates/references/persona-completeness-gate.md +20 -0
  140. package/template/.claude/skills/prd-templates/references/placeholder-guard-template.md +21 -0
  141. package/template/.claude/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -0
  142. package/template/.claude/skills/prd-templates/references/shard-boundary-analysis.md +103 -0
  143. package/template/.claude/skills/prd-templates/references/shard-split-remediation.md +157 -0
  144. package/template/.claude/skills/prd-templates/references/skill-loading-protocol.md +36 -0
  145. package/template/.claude/skills/prd-templates/references/slice-completion-gates.md +29 -0
  146. package/template/.claude/skills/prd-templates/references/spec-coverage-sweep.md +44 -0
  147. package/template/.claude/skills/prd-templates/references/surface-model.md +61 -0
  148. package/template/.claude/skills/prd-templates/references/tdd-testing-policy.md +39 -0
  149. package/template/.claude/skills/prd-templates/references/vision-template.md +57 -0
  150. package/template/.claude/skills/prd-templates/references/workflow-checkpoint-protocol.md +112 -0
  151. package/template/.claude/skills/prd-templates/references/write-verification-protocol.md +57 -0
  152. package/template/.claude/skills/prompt-engineer/SKILL.md +203 -0
  153. package/template/.claude/skills/regex-patterns/SKILL.md +333 -0
  154. package/template/.claude/skills/regex-patterns/references/go.md +44 -0
  155. package/template/.claude/skills/regex-patterns/references/javascript.md +63 -0
  156. package/template/.claude/skills/regex-patterns/references/python.md +77 -0
  157. package/template/.claude/skills/regex-patterns/references/rust.md +43 -0
  158. package/template/.claude/skills/resolve-ambiguity/SKILL.md +278 -0
  159. package/template/.claude/skills/security-scanning-security-hardening/SKILL.md +231 -0
  160. package/template/.claude/skills/session-continuity/SKILL.md +732 -0
  161. package/template/.claude/skills/session-continuity/protocols/01-session-resumption.md +38 -0
  162. package/template/.claude/skills/session-continuity/protocols/02-progress-generation.md +85 -0
  163. package/template/.claude/skills/session-continuity/protocols/03-progress-update.md +70 -0
  164. package/template/.claude/skills/session-continuity/protocols/04-pattern-extraction.md +60 -0
  165. package/template/.claude/skills/session-continuity/protocols/05-session-close.md +37 -0
  166. package/template/.claude/skills/session-continuity/protocols/06-decision-analysis.md +84 -0
  167. package/template/.claude/skills/session-continuity/protocols/07-spec-pipeline-generation.md +48 -0
  168. package/template/.claude/skills/session-continuity/protocols/08-spec-pipeline-update.md +55 -0
  169. package/template/.claude/skills/session-continuity/protocols/09-parallel-claim.md +122 -0
  170. package/template/.claude/skills/session-continuity/protocols/10-placeholder-verification-gate.md +83 -0
  171. package/template/.claude/skills/session-continuity/protocols/11-parallel-synthesis.md +21 -0
  172. package/template/.claude/skills/session-continuity/protocols/ambiguity-gates.md +48 -0
  173. package/template/.claude/skills/skill-creator/SKILL.md +203 -0
  174. package/template/.claude/skills/skill-creator/references/.gitkeep +0 -0
  175. package/template/.claude/skills/skill-creator/scripts/.gitkeep +0 -0
  176. package/template/.claude/skills/spec-writing/SKILL.md +110 -0
  177. package/template/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  178. package/template/.claude/skills/systematic-debugging/SKILL.md +297 -0
  179. package/template/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  180. package/template/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  181. package/template/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  182. package/template/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  183. package/template/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  184. package/template/.claude/skills/systematic-debugging/test-academic.md +14 -0
  185. package/template/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  186. package/template/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  187. package/template/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  188. package/template/.claude/skills/tdd-workflow/SKILL.md +186 -0
  189. package/template/.claude/skills/tdd-workflow/references/typescript.md +231 -0
  190. package/template/.claude/skills/tech-stack-catalog/SKILL.md +49 -0
  191. package/template/.claude/skills/tech-stack-catalog/references/constraint-questions.md +237 -0
  192. package/template/.claude/skills/tech-stack-catalog/references/dev-tooling-decisions.md +37 -0
  193. package/template/.claude/skills/tech-stack-catalog/references/surface-decision-tables.md +69 -0
  194. package/template/.claude/skills/technical-writer/SKILL.md +242 -0
  195. package/template/.claude/skills/testing-strategist/SKILL.md +319 -0
  196. package/template/.claude/skills/testing-strategist/references/typescript.md +328 -0
  197. package/template/.claude/skills/verification-before-completion/SKILL.md +97 -0
  198. package/template/.claude/skills/workflow-automation/SKILL.md +166 -0
  199. package/template/.claude/skills/workflow-automation/references/inngest.md +88 -0
  200. package/template/.claude/skills/workflow-automation/references/temporal.md +64 -0
@@ -0,0 +1,83 @@
1
+ # Protocol 10: Surface Stack Map Verification Gate
2
+
3
+ ## Purpose
4
+
5
+ Specification and implementation workflows must verify the surface stack map is populated **before** any skill reads. This prevents spec authoring from running with empty map cells, which would produce patterns incompatible with the chosen tech stack.
6
+
7
+ > **Note**: As of v3, workflows no longer use `{{PLACEHOLDER}}` values for skill paths. Instead, they read skill names from the surface stack map in `.agent/instructions/tech-stack.md`. This gate verifies map completeness.
8
+
9
+ ## How to Apply
10
+
11
+ Add a **Step 0 — Map guard** to any specification or implementation workflow that reads skills from the surface stack map. The guard runs before all other steps, including re-run checks and prerequisite validations.
12
+
13
+ ## Guard Logic
14
+
15
+ ### 1. Read the surface stack map
16
+
17
+ Read `.agent/instructions/tech-stack.md` and parse both tables:
18
+ - **Per-Surface Skills** — One row per surface
19
+ - **Cross-Cutting Skills** — Project-wide categories
20
+
21
+ ### 2. Determine required cells
22
+
23
+ Based on the workflow type, identify which columns/categories must have filled values:
24
+
25
+ | Workflow Type | Required Per-Surface Columns | Required Cross-Cutting Categories |
26
+ |---|---|---|
27
+ | **IA spec** (`write-architecture-spec-*`) | Databases | Security, Surfaces |
28
+ | **BE spec** (`write-be-spec-*`) | Languages, Databases, BE Frameworks, ORMs, Unit Tests | Auth |
29
+ | **FE spec** (`write-fe-spec-*`) | Languages, FE Frameworks, FE Design, State Mgmt | Accessibility |
30
+ | **Implementation** (`implement-slice-*`) | Languages, Unit Tests, E2E Tests + surface-specific | All |
31
+ | **Validation** (`validate-phase`) | All | All |
32
+ | **Architecture** (`create-prd-architecture`) | Databases, ORMs | Hosting |
33
+ | **Security** (`create-prd-security`) | — | Security, Auth |
34
+ | **Compile** (`create-prd-compile`) | Unit Tests, E2E Tests | CI/CD |
35
+
36
+ ### 3. Check for empty cells
37
+
38
+ For each required cell, verify it contains at least one skill name (not `—`, not empty, not a `{{` literal).
39
+
40
+ ### 4. Hard stop on empty cells
41
+
42
+ When ANY required cell is empty, emit this message for **each** empty cell:
43
+
44
+ > **Empty map cell:** `{column}` for surface `{surface}`
45
+ > **Filled by:** `/create-prd-stack` when the {component} is confirmed
46
+ > **Recovery:** Run `/create-prd-stack` first to make tech stack decisions, then `/bootstrap-agents` to populate the map.
47
+ > **Impact:** Without this skill, {downstream impact description}.
48
+
49
+ Then emit:
50
+
51
+ > ⛔ **HARD STOP** — {N} map cell(s) are empty. This workflow cannot proceed without populated stack data. See recovery steps above.
52
+
53
+ ### 5. Timing fallback (create-prd context)
54
+
55
+ During `/create-prd`, the map is being built incrementally. If a cell is empty but the value was just confirmed in the current conversation (from `/create-prd-stack`), the workflow may proceed using the conversation-confirmed value. Bootstrap will fill the map after `/create-prd` completes.
56
+
57
+ This fallback **only** applies to workflows invoked within the `/create-prd` orchestrator. Standalone invocations must have the map populated.
58
+
59
+ ## Recovery Table
60
+
61
+ | Empty Cell (Per-Surface) | Recovery Command |
62
+ |---|---|
63
+ | Languages | `/create-prd-stack` → confirm language |
64
+ | Databases | `/create-prd-stack` → confirm database(s) |
65
+ | BE Frameworks | `/create-prd-stack` → confirm backend framework |
66
+ | FE Frameworks | `/create-prd-stack` → confirm frontend framework |
67
+ | ORMs | `/create-prd-stack` → confirm ORM |
68
+ | Unit Tests | `/create-prd-stack` → confirm unit testing framework |
69
+ | E2E Tests | `/create-prd-stack` → confirm E2E testing framework |
70
+ | FE Design | `/create-prd-stack` → confirm frontend design approach |
71
+ | State Mgmt | `/create-prd-stack` → confirm state management library |
72
+
73
+ | Empty Cell (Cross-Cutting) | Recovery Command |
74
+ |---|---|
75
+ | Auth | `/create-prd-stack` → confirm auth provider |
76
+ | Security | `/create-prd-stack` → confirm security framework |
77
+ | CI/CD | `/create-prd-stack` → confirm CI/CD platform |
78
+ | Hosting | `/create-prd-stack` → confirm hosting provider |
79
+ | Accessibility | `/create-prd-stack` → confirm accessibility tooling |
80
+
81
+ ## Commands verification
82
+
83
+ Additionally verify that `.agent/instructions/commands.md` has non-template values. If the commands section still contains `{{COMMAND_SECTIONS}}`, run `/bootstrap-agents` to fill it.
@@ -0,0 +1,21 @@
1
+ # Protocol 11: Parallel Synthesis
2
+
3
+ Run after all parallel agents have completed and QA-GREEN has passed.
4
+
5
+ ## Pre-Synthesis Plan
6
+
7
+ Before beginning any synthesis work, write a `## Synthesis Plan` section to the slice file (`.agent/progress/slices/phase-NN-slice-NN.md`) listing:
8
+ - All `// BOUNDARY:` stubs found across agent outputs (file path + stub description)
9
+ - All cross-surface integrations to wire (e.g., "BE auth middleware → FE token refresh handler")
10
+
11
+ This gives you a checklist to resume from if the session is interrupted during synthesis.
12
+
13
+ ## Synthesis Steps
14
+
15
+ 1. **Verify no file conflicts** — confirm no file was modified by multiple agents
16
+ 2. **Resolve `// BOUNDARY:` stubs** — agents may have created boundary stubs for frozen files (contracts, config). Resolve these now:
17
+ - Update shared contracts if needed
18
+ - Install any new dependencies
19
+ - Wire cross-surface integrations
20
+ 3. **Run full validation** — run the Validation Cmd from `.agent/instructions/commands.md` after synthesis
21
+ 4. **Create synthesis report** per the `parallel-agents` skill (Synthesize step)
@@ -0,0 +1,48 @@
1
+ > **Framework context required**: This is a protocol excerpt. Before following these steps, read `.agent/skills/session-continuity/SKILL.md` for the complete framework — including the Adaptive Granularity Rule, Level Hierarchy Reference, Frozen Files concept, and Parallel Claim protocol. Protocol files are reference documents for specific steps, not standalone instructions.
2
+
3
+ # Ambiguity Gates (Micro + Macro)
4
+
5
+ > Part of [Session Continuity](../SKILL.md) — read the index for overview, directory structure, and integration points.
6
+
7
+ **Invoked by**: Every `write-*-spec` workflow, before "Request review"
8
+
9
+ **Purpose**: Ensure no guesses pass downstream. Two levels:
10
+
11
+ ## Micro Ambiguity Check
12
+
13
+ Walk **each individual element** in the spec and ask:
14
+ > "Would an implementer need to guess about this?"
15
+
16
+ | Workflow | What to check |
17
+ |----------|---------------|
18
+ | `/write-architecture-spec` | Each feature, interaction, data model field, access rule, edge case |
19
+ | `/write-be-spec` | Each endpoint, request/response field, error code, schema constraint, middleware rule |
20
+ | `/write-fe-spec` | Each component, prop, interaction, state transition, responsive breakpoint, a11y rule |
21
+
22
+ For every element where the answer is "yes" → **fix it now**. Add the missing
23
+ detail, type, behavior, or constraint. Don't flag it — resolve it.
24
+
25
+ For every element where the answer is "no" — apply the **two-implementer test**: *"Would two different developers, reading only this spec with no other context, make the same implementation decision for this element?"* If the answer is "probably not" or "maybe not" — fix it now. The bar is not "text exists" — it is "unambiguous to any implementer reading cold."
26
+
27
+ ## Macro Ambiguity Check
28
+
29
+ Step back and ask about the **entire spec**:
30
+ > "Does the next downstream phase have everything it needs?"
31
+
32
+ | Workflow | Downstream question |
33
+ |----------|---------------------|
34
+ | `/write-architecture-spec` | Would the BE spec writer need to guess anything from this IA shard? |
35
+ | `/write-be-spec` | Would the FE spec writer need to guess anything from this BE spec? |
36
+ | `/write-fe-spec` | Would an implementer running `/implement-slice` need to guess anything? |
37
+
38
+ If the answer is "yes" → **fix it now**. The spec is not complete until the
39
+ downstream phase can work from it without assumptions.
40
+
41
+ ## Relationship to `/audit-ambiguity`
42
+
43
+ The ambiguity gates are **inline, lightweight, fix-it-now** checks. The
44
+ `/audit-ambiguity` workflow is a **standalone, scored, report-generating**
45
+ audit you run across multiple documents at once. They complement each other:
46
+
47
+ - Gates: prevent ambiguity from entering (at write time)
48
+ - Audit: detect ambiguity that slipped through (after the fact)
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: skill-creator
3
+ description: "Create new CFSA Antigravity skills following the kit's skill format. Handles brainstorming, SKILL.md generation, references, and MANIFEST.md registration."
4
+ version: 2.0.0
5
+ source: self
6
+ date_added: "2026-02-27"
7
+ date_rewritten: "2026-03-14"
8
+ ---
9
+
10
+ # Skill Creator
11
+
12
+ Create new skills for the CFSA Antigravity kit that follow the established format and quality standards.
13
+
14
+ ## When to Use
15
+
16
+ - User wants to create a new skill for the kit
17
+ - User wants to package domain knowledge into a reusable skill
18
+ - User asks "create a skill for X" or "make a skill that does Y"
19
+ - Extending the `.agent/skills/` or `.agent/skill-library/` directories
20
+
21
+ ## When NOT to Use
22
+
23
+ - User wants to use an existing skill (just load the SKILL.md)
24
+ - User wants to find a skill (use `find-skills` skill instead)
25
+
26
+ ---
27
+
28
+ ## Skill Anatomy
29
+
30
+ Every skill lives in a directory under `.agent/skills/` (installed, always available) or `.agent/skill-library/` (catalog, provisioned per-project):
31
+
32
+ ```
33
+ skill-name/
34
+ ├── SKILL.md # Required — the skill definition
35
+ ├── references/ # Optional — supporting docs, templates, data
36
+ │ ├── patterns.md
37
+ │ └── examples.md
38
+ └── scripts/ # Optional — executable utilities
39
+ └── validate.sh
40
+ ```
41
+
42
+ ### SKILL.md Structure
43
+
44
+ ```markdown
45
+ ---
46
+ name: skill-name
47
+ description: "One-line description of what the skill does and when to use it"
48
+ version: 1.0.0
49
+ source: self
50
+ date_added: "YYYY-MM-DD"
51
+ ---
52
+
53
+ # Skill Title
54
+
55
+ [1-2 sentence overview of the skill's purpose and philosophy]
56
+
57
+ ## When to Use
58
+ [Specific triggers — what user requests or situations activate this skill]
59
+
60
+ ## When NOT to Use
61
+ [Explicit boundaries — prevents misapplication]
62
+
63
+ ## [Core Content Sections]
64
+ [The actual skill knowledge, patterns, rules, examples]
65
+
66
+ ## Anti-Patterns
67
+ [Common mistakes to avoid]
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Creation Workflow
73
+
74
+ ### 1. Define the Skill
75
+
76
+ Ask these questions (most can be inferred — only ask if genuinely ambiguous):
77
+
78
+ | Question | Why |
79
+ |----------|-----|
80
+ | What domain does this cover? | Determines skill-library placement (stack/surface/meta) |
81
+ | What triggers it? | Defines the "When to Use" section |
82
+ | What should it NOT do? | Defines boundaries — prevents scope creep |
83
+ | Is this installed or library? | `.agent/skills/` (always active) vs `.agent/skill-library/` (provisioned) |
84
+
85
+ **Decision rules:**
86
+ - Cross-cutting concerns (planning, debugging, testing) → `.agent/skills/`
87
+ - Tech-specific (React, PostgreSQL, Docker) → `.agent/skill-library/stack/`
88
+ - Surface-specific (web perf, mobile UX, API design) → `.agent/skill-library/surface/`
89
+ - Meta/tooling (git, MCP builders, tmux) → `.agent/skill-library/meta/`
90
+
91
+ ### 2. Research the Domain
92
+
93
+ Before writing, gather authoritative reference material:
94
+
95
+ 1. **Context7** — pull latest docs for relevant libraries/frameworks
96
+ 2. **Official documentation** — language specs, framework guides
97
+ 3. **Established patterns** — well-known architectural patterns, design principles
98
+ 4. **Anti-patterns** — common mistakes documented in the community
99
+
100
+ Do NOT copy content. Synthesize what you learn into original guidance.
101
+
102
+ ### 3. Write the SKILL.md
103
+
104
+ **Quality standards:**
105
+
106
+ | Criterion | Requirement |
107
+ |-----------|-------------|
108
+ | Length | 100-500 lines (ideal: 200-300) |
109
+ | Code examples | Real, runnable, with context |
110
+ | Anti-patterns table | Show "Don't" / "Do" side by side |
111
+ | Specificity | Named functions, typed examples, concrete values |
112
+ | Self-contained | Skill works without reading external docs |
113
+ | Frontmatter | All required fields filled, `source: self` |
114
+
115
+ **Writing rules:**
116
+ - Imperative voice ("Use X", "Avoid Y") — not passive ("X should be used")
117
+ - Concrete over abstract ("P95 < 200ms" not "fast responses")
118
+ - Show code, not just describe it
119
+ - Anti-patterns are as important as patterns — include both
120
+ - One concept per section — if a section needs sub-sections, it's too big
121
+
122
+ ### 4. Add References (If Needed)
123
+
124
+ Create `references/` files when the skill needs:
125
+ - Large lookup tables (error codes, status codes, patterns)
126
+ - Template files that the skill references
127
+ - Extended examples that would bloat the SKILL.md
128
+ - Data files (JSON schemas, regex collections)
129
+
130
+ Keep `references/` files focused — one topic per file, not a catchall.
131
+
132
+ ### 5. Register in MANIFEST
133
+
134
+ If the skill goes in `.agent/skill-library/`, add it to `MANIFEST.md`:
135
+
136
+ ```markdown
137
+ | Category | Skill | Description | When to Provision |
138
+ |----------|-------|-------------|-------------------|
139
+ | stack/databases | postgresql | PostgreSQL patterns... | When project uses PostgreSQL |
140
+ ```
141
+
142
+ If the skill goes in `.agent/skills/`, no registration needed — it's always active.
143
+
144
+ ### 6. Validate
145
+
146
+ Before committing, verify:
147
+
148
+ - [ ] SKILL.md has valid YAML frontmatter with all required fields
149
+ - [ ] `source: self` is set (we own this content)
150
+ - [ ] `version: 1.0.0` is set
151
+ - [ ] "When to Use" and "When NOT to Use" sections exist
152
+ - [ ] Code examples are syntactically correct
153
+ - [ ] No `TODO`, `FIXME`, or placeholder content
154
+ - [ ] File is under 500 lines (move overflow to `references/`)
155
+ - [ ] Skill name matches directory name (kebab-case)
156
+
157
+ ---
158
+
159
+ ## Skill Placement Guide
160
+
161
+ ### `.agent/skills/` (Installed Skills)
162
+
163
+ These load automatically for every project. Reserved for:
164
+ - Pipeline workflow skills (ideation, spec-writing, planning)
165
+ - Cross-cutting engineering skills (TDD, debugging, clean code)
166
+ - Agent behavior skills (verification, planning, brainstorming)
167
+ - Meta skills (skill-creator, find-skills, session-continuity)
168
+
169
+ ### `.agent/skill-library/` (Library Skills)
170
+
171
+ Provisioned per-project based on tech stack. Organized by:
172
+
173
+ ```
174
+ skill-library/
175
+ ├── meta/ # Agent tooling (git, tmux, MCP builders)
176
+ ├── stack/ # Tech-specific
177
+ │ ├── ai/ # AI/ML tools (langchain, openai)
178
+ │ ├── auth/ # Auth providers (clerk, authjs)
179
+ │ ├── databases/ # Databases (postgresql, redis, mongodb)
180
+ │ ├── frameworks/ # Frameworks (nextjs, sveltekit, fastapi)
181
+ │ ├── languages/ # Languages (typescript, python, rust)
182
+ │ └── ...
183
+ └── surface/ # Surface-specific
184
+ ├── api/ # API design, versioning, caching
185
+ ├── web/ # Web performance, SEO, accessibility
186
+ ├── mobile/ # Mobile patterns, push notifications
187
+ └── ...
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Skill Quality Anti-Patterns
193
+
194
+ | Don't | Do |
195
+ |-------|-----|
196
+ | Generic advice ("write clean code") | Specific rules with examples |
197
+ | Wall of text with no structure | Tables, code blocks, clear sections |
198
+ | Copy-paste from external docs | Synthesize into original guidance |
199
+ | 1000-line SKILL.md | 200-300 line SKILL.md + references/ |
200
+ | "See [external link] for details" | Include the essential info inline |
201
+ | Describe patterns without showing code | Every pattern gets a code example |
202
+ | Skip anti-patterns | Anti-patterns are 50% of the value |
203
+ | Leave source as "community" or "unknown" | Always set `source: self` for original work |
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: spec-writing
3
+ description: Methodology for writing complete, unambiguous IA, BE, and FE specification documents in the CFSA pipeline. Covers completeness testing, progressive section writing, cross-reference checking, and ambiguity gate application.
4
+ ---
5
+
6
+ # Spec Writing
7
+
8
+ This skill encodes the shared writing methodology for IA, BE, and FE spec documents in the CFSA pipeline, and is invoked by all `write-*-spec-write.md` and `decompose-architecture-validate.md` workflows.
9
+
10
+ ## When to Use
11
+
12
+ - Writing any IA shard, BE spec, or FE spec
13
+ - Any time the agent writes a section that will be consumed by a downstream pipeline stage
14
+ - Whenever performing a completeness self-check before proposing review
15
+
16
+ ## Instructions
17
+
18
+ ### 1. Progressive Section-by-Section Writing Pattern
19
+
20
+ Write one section at a time in document order. Before writing section N+1, re-read section N and verify it against the upstream source document:
21
+
22
+ - For BE specs, the upstream source is the IA shard
23
+ - For FE specs, the upstream source is the BE spec
24
+ - For IA shards, the upstream sources are `ideation-index.md` (+ the relevant domain folder's `*-index.md`, `*-cx.md`, and feature files) and `architecture-design.md`
25
+
26
+ **Hard rules:**
27
+
28
+ - Never leave a section as a stub, a placeholder, or a "TBD" — a section boundary is a hard stop, not a TODO marker.
29
+ - If a section cannot be completed from available upstream context, trigger the ambiguity gate (Step 4) before proceeding.
30
+ - Do not advance to section N+1 until section N passes the two-implementer completeness test (Step 2).
31
+
32
+ ### 2. Two-Implementer Completeness Test
33
+
34
+ After writing each section, apply this test:
35
+
36
+ > *"Would two independent, competent developers reading only this section produce the same implementation?"*
37
+
38
+ If the answer is "probably not," the section is incomplete regardless of how much text it contains.
39
+
40
+ Apply the test to each element type in turn:
41
+
42
+ - **Fields** — every field must have a type and default
43
+ - **Endpoints** — every endpoint must have success response shape and all error codes
44
+ - **State transitions** — every state transition must have a named trigger and a named outcome
45
+ - **Permissions** — every permission must identify a subject (role), an object (resource), and the allowed operation
46
+
47
+ A section passes when no element requires a developer to make an undocumented choice.
48
+
49
+ ### 3. Cross-Reference Checking
50
+
51
+ After completing the full draft, perform two cross-reference passes:
52
+
53
+ #### IA → BE Pass
54
+
55
+ For every data model entity and every state transition in the IA shard, verify a corresponding BE spec section exists. For every field in an IA data model, verify it appears in a BE endpoint request or response schema or a storage schema.
56
+
57
+ Document each gap as:
58
+
59
+ ```
60
+ COVERAGE GAP: IA shard [name] § [section] → no corresponding BE spec section found.
61
+ ```
62
+
63
+ #### BE → FE Pass
64
+
65
+ For every BE endpoint, verify every response field is referenced in the FE spec (in a component prop, display element, or form field). Verify every error code the endpoint can return has an explicit FE handling entry (error boundary, toast, inline error state).
66
+
67
+ Document each gap as:
68
+
69
+ ```
70
+ MAPPING GAP: BE endpoint [name] field [field] → not referenced in FE spec.
71
+ ```
72
+
73
+ ### 4. Ambiguity Gate Trigger Conditions
74
+
75
+ Hard-stop spec writing and raise to the user if any of the following are true:
76
+
77
+ **(a)** A requirement cannot be resolved from `docs/plans/ideation/ideation-index.md`, `docs/plans/architecture-design.md`, or the upstream spec document for the current layer — it is not a judgment the spec writer can make.
78
+
79
+ **(b)** Two valid, meaningfully different implementations exist for a requirement and neither is obviously more correct given the upstream context.
80
+
81
+ **(c)** A security or access control decision requires explicit product confirmation — never silently default a permission, role binding, or data exposure boundary.
82
+
83
+ When triggered, write:
84
+
85
+ ```
86
+ AMBIGUITY GATE: [layer] § [section] — [requirement] — [two options if applicable] — awaiting user decision.
87
+ ```
88
+
89
+ ### 5. Spec Quality Rubric
90
+
91
+ A spec section is complete when all four element classes are fully specified:
92
+
93
+ **(a) Fields** — every field has name, type, nullable/optional flag, default value or "no default", and validation constraints.
94
+
95
+ **(b) Endpoints** — every endpoint has method, path, auth requirement, request schema, success response with HTTP code and body shape, and all error codes with their conditions.
96
+
97
+ **(c) State transitions** — every transition has a named trigger event, a pre-condition, a post-condition, and any side-effects (emails sent, events emitted, records written).
98
+
99
+ **(d) Permissions** — every access control rule specifies subject role, target resource, allowed operation(s), and the condition under which access is denied.
100
+
101
+ ## Anti-Patterns
102
+
103
+ - **Placeholder sections** — Writing placeholder sections ("details TBD") rather than stopping at the ambiguity gate. If you cannot complete a section, trigger Step 4 — do not leave a stub.
104
+ - **End-only completeness testing** — Applying the two-implementer test only at the end rather than section-by-section. The test must be applied after every section, not as a final pass.
105
+ - **Skipping cross-reference checking** — Skipping cross-reference checking because "the layers are being written by the same session." Cross-reference checking is mandatory regardless of authorship.
106
+
107
+ ## Related Skills
108
+
109
+ - **`pipeline-rubrics`** — Use when you need the formal scoring rubrics for evaluating spec quality across all five pipeline layers. The rubric in Step 5 of this skill defines *what* completeness means; `pipeline-rubrics` provides the *scoring framework* for quantifying it during audits.
110
+ - **`technical-writer`** — Use when the spec content is complete but needs clarity, structure, or formatting improvements. This skill governs *what to write*; `technical-writer` governs *how to present it* for maximum readability and consumability.
@@ -0,0 +1,119 @@
1
+ # Creation Log: Systematic Debugging Skill
2
+
3
+ Reference example of extracting, structuring, and bulletproofing a critical skill.
4
+
5
+ ## Source Material
6
+
7
+ Extracted debugging framework from `/Users/jesse/.claude/CLAUDE.md`:
8
+ - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
+ - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
+ - Rules designed to resist time pressure and rationalization
11
+
12
+ ## Extraction Decisions
13
+
14
+ **What to include:**
15
+ - Complete 4-phase framework with all rules
16
+ - Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
17
+ - Pressure-resistant language ("even if faster", "even if I seem in a hurry")
18
+ - Concrete steps for each phase
19
+
20
+ **What to leave out:**
21
+ - Project-specific context
22
+ - Repetitive variations of same rule
23
+ - Narrative explanations (condensed to principles)
24
+
25
+ ## Structure Following skill-creation/SKILL.md
26
+
27
+ 1. **Rich when_to_use** - Included symptoms and anti-patterns
28
+ 2. **Type: technique** - Concrete process with steps
29
+ 3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
30
+ 4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
31
+ 5. **Phase-by-phase breakdown** - Scannable checklist format
32
+ 6. **Anti-patterns section** - What NOT to do (critical for this skill)
33
+
34
+ ## Bulletproofing Elements
35
+
36
+ Framework designed to resist rationalization under pressure:
37
+
38
+ ### Language Choices
39
+ - "ALWAYS" / "NEVER" (not "should" / "try to")
40
+ - "even if faster" / "even if I seem in a hurry"
41
+ - "STOP and re-analyze" (explicit pause)
42
+ - "Don't skip past" (catches the actual behavior)
43
+
44
+ ### Structural Defenses
45
+ - **Phase 1 required** - Can't skip to implementation
46
+ - **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
47
+ - **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
48
+ - **Anti-patterns section** - Shows exactly what shortcuts look like
49
+
50
+ ### Redundancy
51
+ - Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
52
+ - "NEVER fix symptom" appears 4 times in different contexts
53
+ - Each phase has explicit "don't skip" guidance
54
+
55
+ ## Testing Approach
56
+
57
+ Created 4 validation tests following skills/meta/testing-skills-with-subagents:
58
+
59
+ ### Test 1: Academic Context (No Pressure)
60
+ - Simple bug, no time pressure
61
+ - **Result:** Perfect compliance, complete investigation
62
+
63
+ ### Test 2: Time Pressure + Obvious Quick Fix
64
+ - User "in a hurry", symptom fix looks easy
65
+ - **Result:** Resisted shortcut, followed full process, found real root cause
66
+
67
+ ### Test 3: Complex System + Uncertainty
68
+ - Multi-layer failure, unclear if can find root cause
69
+ - **Result:** Systematic investigation, traced through all layers, found source
70
+
71
+ ### Test 4: Failed First Fix
72
+ - Hypothesis doesn't work, temptation to add more fixes
73
+ - **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
74
+
75
+ **All tests passed.** No rationalizations found.
76
+
77
+ ## Iterations
78
+
79
+ ### Initial Version
80
+ - Complete 4-phase framework
81
+ - Anti-patterns section
82
+ - Flowchart for "fix failed" decision
83
+
84
+ ### Enhancement 1: TDD Reference
85
+ - Added link to skills/testing/test-driven-development
86
+ - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
+ - Prevents confusion between methodologies
88
+
89
+ ## Final Outcome
90
+
91
+ Bulletproof skill that:
92
+ - ✅ Clearly mandates root cause investigation
93
+ - ✅ Resists time pressure rationalization
94
+ - ✅ Provides concrete steps for each phase
95
+ - ✅ Shows anti-patterns explicitly
96
+ - ✅ Tested under multiple pressure scenarios
97
+ - ✅ Clarifies relationship to TDD
98
+ - ✅ Ready for use
99
+
100
+ ## Key Insight
101
+
102
+ **Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
103
+
104
+ ## Usage Example
105
+
106
+ When encountering a bug:
107
+ 1. Load skill: skills/debugging/systematic-debugging
108
+ 2. Read overview (10 sec) - reminded of mandate
109
+ 3. Follow Phase 1 checklist - forced investigation
110
+ 4. If tempted to skip - see anti-pattern, stop
111
+ 5. Complete all phases - root cause found
112
+
113
+ **Time investment:** 5-10 minutes
114
+ **Time saved:** Hours of symptom-whack-a-mole
115
+
116
+ ---
117
+
118
+ *Created: 2025-10-03*
119
+ *Purpose: Reference example for skill extraction and bulletproofing*