interaqt 0.3.1 → 0.4.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/agent/.claude/agents/computation-generation-handler.md +1 -3
- package/agent/.claude/agents/requirements-analysis-handler.md +43 -3
- package/agent/agentspace/knowledge/generator/api-reference.md +538 -101
- package/agent/agentspace/knowledge/generator/computation-analysis.md +22 -20
- package/agent/agentspace/knowledge/generator/computation-implementation.md +62 -38
- package/agent/agentspace/knowledge/generator/data-analysis.md +23 -2
- package/dist/index.js +2977 -2976
- package/dist/index.js.map +1 -1
- package/dist/runtime/ComputationSourceMap.d.ts +11 -21
- package/dist/runtime/ComputationSourceMap.d.ts.map +1 -1
- package/dist/runtime/Controller.d.ts +2 -2
- package/dist/runtime/MonoSystem.d.ts.map +1 -1
- package/dist/runtime/Scheduler.d.ts +6 -6
- package/dist/runtime/Scheduler.d.ts.map +1 -1
- package/dist/runtime/System.d.ts +5 -0
- package/dist/runtime/System.d.ts.map +1 -1
- package/dist/runtime/computations/Computation.d.ts +4 -9
- package/dist/runtime/computations/Computation.d.ts.map +1 -1
- package/dist/runtime/computations/StateMachine.d.ts +4 -7
- package/dist/runtime/computations/StateMachine.d.ts.map +1 -1
- package/dist/runtime/computations/Transform.d.ts +7 -1
- package/dist/runtime/computations/Transform.d.ts.map +1 -1
- package/dist/runtime/computations/TransitionFinder.d.ts +2 -2
- package/dist/runtime/computations/TransitionFinder.d.ts.map +1 -1
- package/dist/shared/StateTransfer.d.ts +15 -5
- package/dist/shared/StateTransfer.d.ts.map +1 -1
- package/dist/shared/Transform.d.ts +17 -3
- package/dist/shared/Transform.d.ts.map +1 -1
- package/package.json +1 -1
- package/agent/.claude/agents/requirements-analysis-handler-bak.md +0 -530
|
@@ -80,9 +80,7 @@ color: blue
|
|
|
80
80
|
- **🔴 SPECIAL CASE 2: `_owner` notation**
|
|
81
81
|
- If the computation decision is `_owner`, this means:
|
|
82
82
|
- The property's value is fully controlled by its owner entity/relation's computation
|
|
83
|
-
- You should modify the OWNER entity/relation's creation or derivation logic, not add a separate property computation
|
|
84
|
-
- For `controlType: "creation-only"`: Add the property assignment logic in the entity/relation's creation Transform or StateMachine
|
|
85
|
-
- For `controlType: "derived-with-parent"`: The property is part of the parent's derivation computation
|
|
83
|
+
- You should modify the OWNER entity/relation's creation or derivation logic, not add a separate property computation. Add the property assignment logic in the entity/relation's creation Transform
|
|
86
84
|
- Example: For a `createdAt` property with `_owner`, add timestamp assignment in the entity's Transform that creates it
|
|
87
85
|
- Add computation code using assignment pattern at end of file:
|
|
88
86
|
```typescript
|
|
@@ -178,7 +178,7 @@ We focus on data-centric requirements. Human software usage delegates unsuitable
|
|
|
178
178
|
|
|
179
179
|
**DO NOT create "automatic system" requirements.** Our framework is reactive - avoid designing autonomous system behaviors.
|
|
180
180
|
|
|
181
|
-
**Transform "
|
|
181
|
+
**Transform "non-data-reactive" requirements into:**
|
|
182
182
|
|
|
183
183
|
1. **Reactive Data Requirements**:
|
|
184
184
|
- ❌ WRONG: "System automatically counts total books"
|
|
@@ -192,6 +192,10 @@ We focus on data-centric requirements. Human software usage delegates unsuitable
|
|
|
192
192
|
- ❌ WRONG: "System automatically creates uniform record when employee is created"
|
|
193
193
|
- ✅ CORRECT: "When creating employee, automatically create uniform record" (as data constraint)
|
|
194
194
|
|
|
195
|
+
4. **Data Replacement Operations**:
|
|
196
|
+
- ❌ WRONG: "Replace old data with new data"
|
|
197
|
+
- ✅ CORRECT: "Create new data + Delete old data" (as two separate operations)
|
|
198
|
+
|
|
195
199
|
**For unavoidable side-effect requirements** (e.g., "automatically send notification"):
|
|
196
200
|
- Design the requirement but explicitly mark as **"Currently Not Supported"**
|
|
197
201
|
- Document: "This requirement involves automatic side-effects which are not supported by the current reactive framework"
|
|
@@ -201,6 +205,7 @@ We focus on data-centric requirements. Human software usage delegates unsuitable
|
|
|
201
205
|
- "Auto-send reminders" → "Reminder needed status is computed based on due date" + "Send reminder interaction"
|
|
202
206
|
- "Auto-validate ISBN" → "Can only create books with valid ISBN format" (constraint)
|
|
203
207
|
- "Auto-update inventory" → "Available count is computed based on total copies minus borrowed copies"
|
|
208
|
+
- "Replace employee profile" → "Create new employee profile" + "Delete old employee profile" (two interactions)
|
|
204
209
|
|
|
205
210
|
### Step 1: Create Read Requirements from Goals
|
|
206
211
|
|
|
@@ -288,6 +293,20 @@ Create `requirements/requirements-analysis.json`:
|
|
|
288
293
|
},
|
|
289
294
|
"business_constraints": ["[Business rule 1]"],
|
|
290
295
|
"data_constraints": ["[Data constraint 1]"]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"id": "R103",
|
|
299
|
+
"type": "delete",
|
|
300
|
+
"title": "[Requirement name]",
|
|
301
|
+
"parent": "R001",
|
|
302
|
+
"role": "[Role]",
|
|
303
|
+
"data": {
|
|
304
|
+
"type": "entity|relation",
|
|
305
|
+
"description": "[Data to delete]"
|
|
306
|
+
},
|
|
307
|
+
"deletion_type": "hard",
|
|
308
|
+
"deletion_rules": ["[Rule 1: e.g., Cannot delete if has active references]", "[Rule 2]"],
|
|
309
|
+
"business_constraints": ["[Business rule 1]"]
|
|
291
310
|
}
|
|
292
311
|
],
|
|
293
312
|
"from_R101": [
|
|
@@ -367,6 +386,11 @@ For each entity property:
|
|
|
367
386
|
- **Computation Method**: For aggregated or computed values
|
|
368
387
|
- **Data Dependencies**: For computed values, list dependencies
|
|
369
388
|
|
|
389
|
+
**Hard Deletion Property**:
|
|
390
|
+
- If delete requirements in Task 1.2 specify `"deletion_type": "hard"`
|
|
391
|
+
- Add **HardDeletionProperty** to the entity/relation
|
|
392
|
+
- Document deletion rules from requirements as property metadata
|
|
393
|
+
|
|
370
394
|
### Step 3: Relation Identification and Analysis
|
|
371
395
|
|
|
372
396
|
**Relations are the ONLY way to connect entities** - they replace traditional foreign key patterns.
|
|
@@ -459,9 +483,17 @@ Create `requirements/data-concepts.json`:
|
|
|
459
483
|
"description": "Total copies minus borrowed copies",
|
|
460
484
|
"dependencies": ["BookCopy", "BorrowRecord"]
|
|
461
485
|
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "_hardDeletion",
|
|
489
|
+
"type": "HardDeletionProperty",
|
|
490
|
+
"required": false,
|
|
491
|
+
"computed": false,
|
|
492
|
+
"deletion_rules": ["Cannot delete if has active borrow records", "Only administrators can delete"],
|
|
493
|
+
"source_requirement": "R103"
|
|
462
494
|
}
|
|
463
495
|
],
|
|
464
|
-
"referenced_in": ["R001", "R101", "R201"],
|
|
496
|
+
"referenced_in": ["R001", "R101", "R103", "R201"],
|
|
465
497
|
"note": "No authorId or publisherId - use BookAuthorRelation and BookPublisherRelation instead"
|
|
466
498
|
},
|
|
467
499
|
{
|
|
@@ -514,9 +546,17 @@ Create `requirements/data-concepts.json`:
|
|
|
514
546
|
"name": "dueDate",
|
|
515
547
|
"type": "date",
|
|
516
548
|
"required": true
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"name": "_hardDeletion",
|
|
552
|
+
"type": "HardDeletionProperty",
|
|
553
|
+
"required": false,
|
|
554
|
+
"computed": false,
|
|
555
|
+
"deletion_rules": ["Auto-delete when book is returned"],
|
|
556
|
+
"source_requirement": "R103"
|
|
517
557
|
}
|
|
518
558
|
],
|
|
519
|
-
"lifecycle": "Created on borrow, updated on return",
|
|
559
|
+
"lifecycle": "Created on borrow, updated on return, deleted on return or book deletion",
|
|
520
560
|
"referenced_in": ["R102", "R103"]
|
|
521
561
|
},
|
|
522
562
|
{
|