cfsa-antigravity 2.8.0 → 2.9.1

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.1",
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: 8be86da6ed6b0a4b6c0f2eb66caa663593f52fe8
5
+ last_synced_at: 2026-03-17T05:39:24Z
6
+ kit_version: 2.9.1
@@ -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,49 @@ 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 — three questions)
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
+ Q1a: "Does this concept have a DIFFERENT primary surface
169
+ for initial setup vs. day-to-day operation?"
170
+ │ (e.g., discovered on web, used daily on mobile)
171
+
172
+ │ YES ──► SPLIT: setup surface owns data/API domain,
173
+ │ │ daily-operation surface gets its own operational domain
174
+ │ │ Both are real domains — connect via CX
175
+ │ NO ──► proceed with single primary surface from Q1
176
+
177
+ Q2: "Which hub APIs does it consume?"
178
+ │ (What data/services does it call from the hub?)
179
+
180
+ ├── Primarily experienced on a SPOKE surface
181
+ │ ──► It's a SPOKE DOMAIN ──► create in that spoke surface
182
+ │ ──► Log hub API dependencies in CX (Q2 answer)
183
+
184
+ ├── Primarily experienced on the HUB surface
185
+ │ ──► It's a HUB DOMAIN ──► create in hub surface
186
+
187
+ ├── No primary surface (pure API/data layer, no direct user interaction)
188
+ │ ──► It's a HUB DOMAIN (infrastructure) ──► create in hub
189
+
190
+ ├── Setup and daily-operation on DIFFERENT surfaces
191
+ │ ──► BOTH surfaces get domains ──► connect via CX
192
+ │ (e.g., Consumer Accounts: web owns signup/config,
193
+ │ mobile owns daily device management/messaging)
194
+
195
+ └── Equally used across multiple surfaces (rare)
196
+ ──► It's a shared domain ──► create in shared/ (peer) or hub (hub-and-spoke)
171
197
 
172
198
  **WHEN UNCERTAIN: Ask the user.** Never assume placement.
173
199
  ```
174
200
 
201
+ > **Key principle**: A domain belongs where it is PRIMARILY USED, not where the data lives.
202
+ > POS is a desktop domain even though payments go through the hub's Stripe API.
203
+ > Inventory is a desktop domain even though stock data is in the hub's database.
204
+ > The hub API dependency is logged as a CX reference, not as a classification signal.
205
+
175
206
  ### Sub-Domain vs Feature Test
176
207
 
177
208
  The key question: **"Does this thing have its own internal features that interact with each other?"**
@@ -187,7 +218,8 @@ The key question: **"Does this thing have its own internal features that interac
187
218
 
188
219
  | ❌ Wrong | ✅ Right |
189
220
  |----------|---------|
190
- | Creating "Supplier Integration" as a new domain | Recognizing it's a feature within AI Assistant, cross-cutting to web's Supplier Accounts |
221
+ | Creating "Print Receipt" as a new domain | Recognizing it's a feature within POS/Payments |
222
+ | 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
223
  | Creating a domain for every feature mentioned | Grouping related features under their parent domain/sub-domain |
192
224
  | Pre-creating 4 levels of empty folders | Creating depth reactively as complexity is discovered |
193
225
  | 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 +228,7 @@ The key question: **"Does this thing have its own internal features that interac
196
228
  | Collapsing a rich multi-system area into a single domain | Recognizing 2+ interacting capabilities = sub-domain or promoted domain |
197
229
  | Creating "Data Architecture" or "Tech Stack" as product domains | Noting architectural concerns for `/create-prd` — they are not product domains |
198
230
  | Creating folders before presenting the classification to the user | Always presenting the classification table and getting user confirmation first |
231
+ | Classifying everything that touches the hub API as a hub domain | Using the "primarily experienced" test — hub API usage = CX, not classification |
199
232
 
200
233
  ---
201
234
 
@@ -283,6 +316,12 @@ Before starting, classify what the user has provided and select the right mode.
283
316
  > and document structure tell you where to LOOK for concepts. They do NOT tell you what those
284
317
  > concepts ARE (domain, sub-domain, feature, cross-cut, or not-a-product-domain). The Node
285
318
  > Classification Gate determines what each concept is. NEVER mirror source headings as domains.
319
+ >
320
+ > **Document surface signals ARE classification input.** When a concept appears WITHIN a
321
+ > surface-specific section of the document (e.g., "Shop Software", "Mobile App", "Desktop"),
322
+ > that is a strong signal for surface placement. The section heading doesn't dictate the
323
+ > domain NAME, but it DOES inform which surface the concept is primarily experienced on.
324
+ > Use this as input to the "primarily experienced" question in the classification gate.
286
325
 
287
326
  **Process — Phase 1: Interview the Document** (silent — no user interaction)
288
327
 
@@ -293,22 +332,25 @@ Before starting, classify what the user has provided and select the right mode.
293
332
  - Source location (line numbers or section reference — this is the citation)
294
333
  - What the document says about it (summary of the content)
295
334
  - How many distinct interacting capabilities it contains (the sub-domain test)
296
- - Whether it is surface-exclusive, shared, or cross-cutting
335
+ - Which surface section of the document it appeared in (if any) — this is a surface placement signal
336
+ - Whether it is cross-cutting (affects multiple domains regardless of surface)
297
337
  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
338
  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
339
  - "Does it belong to an EXISTING domain?" → if YES, it's a sub-domain or feature of that domain
300
340
  - "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
341
+ - "Where is this PRIMARILY experienced/operated?" → determines surface placement
342
+ - "Which hub APIs does it consume?" → logged as CX, NOT as classification signal
302
343
  - "Is it an architectural concern, not a product domain?" → note for `/create-prd`, do NOT create a domain
303
344
  - "Is it a cross-cutting concern?" → log in CX files, do NOT create a domain
304
345
  Produce a **classification table**:
305
346
 
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 |
347
+ | Concept | Source Location | Gate Result | Primary Surface | Also Used On | Reasoning |
348
+ |---------|----------------|-------------|----------------|-------------|----------|
349
+ | 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 |
350
+ | POS / Payments | lines 10181050 (§Shop Software) | Domain in Desktop | Desktop | Hub (Stripe API) | Shop tech runs transactions at register; hub provides payment processing API |
351
+ | In-Platform Messaging | lines 759788 | Feature of Consumer Platform | Web | Mobile | Single capability with role-based routing, no internal sub-features |
352
+ | Data Architecture | lines 12611282 | NOT a product domain | | | Architectural concern — database selection, sync strategy note for /create-prd |
353
+ | Analytics & Insights | lines 730–758 | Cross-cutting concern | — | All surfaces | Three tiers serving all domains, no exclusive features of its own |
312
354
 
313
355
  5. **BLOCKING GATE — Build proposed domain map.** From the classification table, group concepts into a proposed domain hierarchy:
314
356
  - Only concepts classified as **domain** become domain folders
@@ -316,6 +358,21 @@ Before starting, classify what the user has provided and select the right mode.
316
358
  - Concepts classified as **feature** become leaf files inside their parent
317
359
  - Concepts classified as **cross-cut** go in the appropriate CX files
318
360
  - Concepts classified as **not-a-product-domain** are noted in `meta/constraints.md` for `/create-prd`
361
+
362
+ 5.5. **BLOCKING GATE — Surface Distribution Audit.** Before presenting to the user, verify the classification didn't starve any spoke:
363
+
364
+ For each spoke surface:
365
+ 1. List all concepts the document describes within that surface's sections
366
+ 2. Count how many were classified as spoke domains vs. hub domains
367
+ 3. For each hub-classified concept that appeared in a spoke section: **re-run the "primarily experienced" test** including Q1a (setup vs daily-operation). If the concept is primarily operated on the spoke — or daily-operated on the spoke even if set up elsewhere — reclassify it as a spoke domain with hub CX
368
+ 4. **HARD GATE — not advisory**: If a spoke has fewer than 5 domains AND the document dedicates 100+ lines to that spoke → **STOP. The classification IS wrong.** You MUST re-run the daily-operation test (Q1 + Q1a) on EVERY hub-classified concept from that spoke's sections before proceeding. You may NOT write "PROPORTIONAL ✅" and continue — the gate condition is met, re-examination is mandatory. Only after re-examination may you proceed, and you must document which concepts were re-examined and why each retained or changed its classification
369
+
370
+ 5.6. **Spoke Persona Walk-Through.** For each spoke surface, identify its primary persona(s) and mentally walk through their daily workflow:
371
+ - "If I'm a [persona] sitting at the [surface], what are ALL the things I do in a typical day?"
372
+ - Enumerate every distinct workflow: each workflow with 2+ interacting capabilities is a candidate spoke domain
373
+ - Cross-reference against the classification table: any daily workflow capability that was classified as hub is suspect
374
+ - Reclassify as needed — the walk-through is the final validation before presenting to user
375
+
319
376
  6. **Identify gaps** — interview questions the document doesn't answer. These become Phase 2 interview questions.
320
377
 
321
378
  **Process — Phase 2: Present and Interview the User**