cfsa-antigravity 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfsa-antigravity",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "CFSA Pipeline — Constraint-First Specification Architecture for AI agents. Production-grade from line one.",
5
5
  "scripts": {
6
6
  "changeset": "changeset",
@@ -1,6 +1,6 @@
1
1
  # Kit Sync State
2
2
 
3
3
  upstream: https://github.com/RepairYourTech/cfsa-antigravity
4
- last_synced_commit: e639c28086bccad2baa56a2efabbfd743e1fda3c
5
- last_synced_at: 2026-03-17T04:40:28Z
6
- kit_version: 2.8.0
4
+ last_synced_commit: 9f4ba4f09f8234f0e81f568f66f6394148c0e383
5
+ last_synced_at: 2026-03-17T05:20:16Z
6
+ kit_version: 2.9.0
@@ -124,9 +124,10 @@ When processing a document, scan for these signals before creating any domain fi
124
124
 
125
125
  When hub-and-spoke is identified:
126
126
 
127
- - **The hub surface owns shared domains.** Device History, Payments, Certification — these live INSIDE the hub surface's domain tree, not in a separate `shared/` folder.
127
+ - **The hub surface owns shared API/data domains.** Device History, Payments, Certification — these live INSIDE the hub surface's domain tree, not in a separate `shared/` folder.
128
128
  - **Spoke surfaces reference hub domains via CX.** Desktop's CX files say "Feature X consumes web/domain/feature via API."
129
- - **The hub surface tends to be the largest.** This is expected and correct.
129
+ - **Spoke surfaces own their operational domains.** A domain belongs on the surface where it is **primarily experienced and operated**, not where the data lives. POS is a desktop domain even though it calls the hub's Stripe API. Inventory is a desktop domain even though it syncs to the hub's database.
130
+ - **Proportionality check**: The hub may have more domains than any single spoke, but spokes must reflect the FULL experience their users have. If a spoke user's daily workflow involves 10+ distinct capabilities, 2-3 domains is a red flag — re-examine whether concepts were incorrectly collapsed into the hub.
130
131
 
131
132
  ### Peer Mode Implications
132
133
 
@@ -159,19 +160,35 @@ Does it belong to an EXISTING domain or sub-domain?
159
160
  │ │
160
161
  │ NO ──► It's a FEATURE ──► create .md file inside existing parent
161
162
 
162
- NO ──► Is it surface-exclusive?
163
+ NO ──► (Surface Placement — two questions, not one)
163
164
 
164
- YES ──► It's a new DOMAIN ──► create domain folder in the correct surface
165
+ Q1: "Where is this PRIMARILY experienced/operated?"
166
+ │ (Which surface's user interacts with this most?)
165
167
 
166
- NO ──► Is there a hub surface that owns this kind of logic?
167
-
168
- YES ──► It lives in the HUB surface ──► create domain in hub + CX from spokes
169
-
170
- NO ──► It's a shared domain ──► create in shared/
168
+ Q2: "Which hub APIs does it consume?"
169
+ (What data/services does it call from the hub?)
170
+
171
+ ├── Primarily experienced on a SPOKE surface
172
+ ──► It's a SPOKE DOMAIN ──► create in that spoke surface
173
+ │ ──► Log hub API dependencies in CX (Q2 answer)
174
+
175
+ ├── Primarily experienced on the HUB surface
176
+ │ ──► It's a HUB DOMAIN ──► create in hub surface
177
+
178
+ ├── No primary surface (pure API/data layer, no direct user interaction)
179
+ │ ──► It's a HUB DOMAIN (infrastructure) ──► create in hub
180
+
181
+ └── Equally used across multiple surfaces (rare)
182
+ ──► It's a shared domain ──► create in shared/ (peer) or hub (hub-and-spoke)
171
183
 
172
184
  **WHEN UNCERTAIN: Ask the user.** Never assume placement.
173
185
  ```
174
186
 
187
+ > **Key principle**: A domain belongs where it is PRIMARILY USED, not where the data lives.
188
+ > POS is a desktop domain even though payments go through the hub's Stripe API.
189
+ > Inventory is a desktop domain even though stock data is in the hub's database.
190
+ > The hub API dependency is logged as a CX reference, not as a classification signal.
191
+
175
192
  ### Sub-Domain vs Feature Test
176
193
 
177
194
  The key question: **"Does this thing have its own internal features that interact with each other?"**
@@ -187,7 +204,8 @@ The key question: **"Does this thing have its own internal features that interac
187
204
 
188
205
  | ❌ Wrong | ✅ Right |
189
206
  |----------|---------|
190
- | Creating "Supplier Integration" as a new domain | Recognizing it's a feature within AI Assistant, cross-cutting to web's Supplier Accounts |
207
+ | Creating "Print Receipt" as a new domain | Recognizing it's a feature within POS/Payments |
208
+ | Classifying POS as a hub domain because it calls Stripe | Classifying POS as a desktop domain because the shop tech primarily operates it there |
191
209
  | Creating a domain for every feature mentioned | Grouping related features under their parent domain/sub-domain |
192
210
  | Pre-creating 4 levels of empty folders | Creating depth reactively as complexity is discovered |
193
211
  | Putting a shared domain in `shared/` when hub-and-spoke is active | Putting it inside the hub surface, with CX references from spokes |
@@ -196,6 +214,7 @@ The key question: **"Does this thing have its own internal features that interac
196
214
  | Collapsing a rich multi-system area into a single domain | Recognizing 2+ interacting capabilities = sub-domain or promoted domain |
197
215
  | Creating "Data Architecture" or "Tech Stack" as product domains | Noting architectural concerns for `/create-prd` — they are not product domains |
198
216
  | Creating folders before presenting the classification to the user | Always presenting the classification table and getting user confirmation first |
217
+ | Classifying everything that touches the hub API as a hub domain | Using the "primarily experienced" test — hub API usage = CX, not classification |
199
218
 
200
219
  ---
201
220
 
@@ -283,6 +302,12 @@ Before starting, classify what the user has provided and select the right mode.
283
302
  > and document structure tell you where to LOOK for concepts. They do NOT tell you what those
284
303
  > concepts ARE (domain, sub-domain, feature, cross-cut, or not-a-product-domain). The Node
285
304
  > Classification Gate determines what each concept is. NEVER mirror source headings as domains.
305
+ >
306
+ > **Document surface signals ARE classification input.** When a concept appears WITHIN a
307
+ > surface-specific section of the document (e.g., "Shop Software", "Mobile App", "Desktop"),
308
+ > that is a strong signal for surface placement. The section heading doesn't dictate the
309
+ > domain NAME, but it DOES inform which surface the concept is primarily experienced on.
310
+ > Use this as input to the "primarily experienced" question in the classification gate.
286
311
 
287
312
  **Process — Phase 1: Interview the Document** (silent — no user interaction)
288
313
 
@@ -293,22 +318,25 @@ Before starting, classify what the user has provided and select the right mode.
293
318
  - Source location (line numbers or section reference — this is the citation)
294
319
  - What the document says about it (summary of the content)
295
320
  - How many distinct interacting capabilities it contains (the sub-domain test)
296
- - Whether it is surface-exclusive, shared, or cross-cutting
321
+ - Which surface section of the document it appeared in (if any) — this is a surface placement signal
322
+ - Whether it is cross-cutting (affects multiple domains regardless of surface)
297
323
  Do NOT use source document headings as concept names unless they happen to be accurate after classification. The concept name must reflect what the thing actually IS after gate analysis.
298
324
  4. **BLOCKING GATE — Classify every concept.** Run the Node Classification Gate on EACH extracted concept individually. For each concept, answer the gate questions explicitly:
299
325
  - "Does it belong to an EXISTING domain?" → if YES, it's a sub-domain or feature of that domain
300
326
  - "Does it have 2+ distinct capabilities that interact with each other?" → if YES, it's a sub-domain (folder); if NO, it's a feature (file)
301
- - "Is it surface-exclusive?" → determines placement
327
+ - "Where is this PRIMARILY experienced/operated?" → determines surface placement
328
+ - "Which hub APIs does it consume?" → logged as CX, NOT as classification signal
302
329
  - "Is it an architectural concern, not a product domain?" → note for `/create-prd`, do NOT create a domain
303
330
  - "Is it a cross-cutting concern?" → log in CX files, do NOT create a domain
304
331
  Produce a **classification table**:
305
332
 
306
- | Concept | Source Location | Gate Result | Reasoning |
307
- |---------|----------------|-------------|----------|
308
- | Inventory System | lines 982–1017 | Sub-domain of Shop Software | 4+ interacting capabilities (purgatory model, alerts, visibility, pre-auth billing) |
309
- | In-Platform Messaging | lines 759788 | Feature of Consumer Platform | Single capability with role-based routing, no internal sub-features |
310
- | Data Architecture | lines 12611282 | NOT a product domain | Architectural concern database selection, sync strategy note for /create-prd |
311
- | Analytics & Insights | lines 730758 | Cross-cutting concern | Three tiers serving all domains, no exclusive features of its own |
333
+ | Concept | Source Location | Gate Result | Primary Surface | Also Used On | Reasoning |
334
+ |---------|----------------|-------------|----------------|-------------|----------|
335
+ | Inventory System | lines 982–1017 (§Shop Software) | Sub-domain of Shop Operations | Desktop | Web (read-only dashboard) | 4+ interacting capabilities, primarily operated by shop tech at the counter |
336
+ | POS / Payments | lines 10181050 (§Shop Software) | Domain in Desktop | Desktop | Hub (Stripe API) | Shop tech runs transactions at register; hub provides payment processing API |
337
+ | In-Platform Messaging | lines 759788 | Feature of Consumer Platform | Web | Mobile | Single capability with role-based routing, no internal sub-features |
338
+ | Data Architecture | lines 12611282 | NOT a product domain | | | Architectural concern — database selection, sync strategy note for /create-prd |
339
+ | Analytics & Insights | lines 730–758 | Cross-cutting concern | — | All surfaces | Three tiers serving all domains, no exclusive features of its own |
312
340
 
313
341
  5. **BLOCKING GATE — Build proposed domain map.** From the classification table, group concepts into a proposed domain hierarchy:
314
342
  - Only concepts classified as **domain** become domain folders
@@ -316,6 +344,21 @@ Before starting, classify what the user has provided and select the right mode.
316
344
  - Concepts classified as **feature** become leaf files inside their parent
317
345
  - Concepts classified as **cross-cut** go in the appropriate CX files
318
346
  - Concepts classified as **not-a-product-domain** are noted in `meta/constraints.md` for `/create-prd`
347
+
348
+ 5.5. **BLOCKING GATE — Surface Distribution Audit.** Before presenting to the user, verify the classification didn't starve any spoke:
349
+
350
+ For each spoke surface:
351
+ 1. List all concepts the document describes within that surface's sections
352
+ 2. Count how many were classified as spoke domains vs. hub domains
353
+ 3. For each hub-classified concept that appeared in a spoke section: **re-run the "primarily experienced" test**. If the concept is primarily operated on the spoke, reclassify it as a spoke domain with hub CX
354
+ 4. **Red flag**: If a spoke has fewer than 5 domains AND the document dedicates 100+ lines to that spoke → the classification is likely wrong. Re-examine every concept from that spoke section
355
+
356
+ 5.6. **Spoke Persona Walk-Through.** For each spoke surface, identify its primary persona(s) and mentally walk through their daily workflow:
357
+ - "If I'm a [persona] sitting at the [surface], what are ALL the things I do in a typical day?"
358
+ - Enumerate every distinct workflow: each workflow with 2+ interacting capabilities is a candidate spoke domain
359
+ - Cross-reference against the classification table: any daily workflow capability that was classified as hub is suspect
360
+ - Reclassify as needed — the walk-through is the final validation before presenting to user
361
+
319
362
  6. **Identify gaps** — interview questions the document doesn't answer. These become Phase 2 interview questions.
320
363
 
321
364
  **Process — Phase 2: Present and Interview the User**