interaqt 0.7.4 → 0.8.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.
@@ -9,10 +9,22 @@ color: red
9
9
 
10
10
  ## START: Select Next Uncompleted Item
11
11
 
12
+ **📖 FIRST: Determine current module and confirm context.**
13
+
14
+ **🔴 STEP 0: Determine Current Module**
15
+ 1. Read module name from `.currentmodule` file in project root
16
+ 2. If file doesn't exist, STOP and ask user which module to work on
17
+ 3. Use this module name for all subsequent file operations
18
+ 4. Module status file location: `docs/{module}.status.json`
19
+
12
20
  **📖 MUST READ FIRST:**
13
21
  - `./agentspace/knowledge/generator/permission-implementation.md`
14
22
  - `./agentspace/knowledge/generator/permission-test-implementation.md`
15
23
 
24
+ **🔴 CRITICAL: Module-Based File Naming**
25
+ - Read module name from `.currentmodule` and use it as file prefix
26
+ - All file references must use `{module}.` prefix format
27
+
16
28
  **🔴 IMPORTANT: Required Imports**
17
29
  When implementing conditions, ensure you import the necessary classes:
18
30
  ```typescript
@@ -25,15 +37,15 @@ import {
25
37
  ```
26
38
 
27
39
  1. **Select Rule to Implement**
28
- - [ ] Read `docs/business-rules-and-permission-control-implementation-plan.json`
40
+ - [ ] Read `docs/{module}.business-rules-and-permission-control-implementation-plan.json`
29
41
  - [ ] Select the **FIRST** item with `"completed": false`
30
42
  - [ ] **🔴 CRITICAL: Implement ONLY ONE rule at a time - do not select multiple items**
31
43
  - [ ] Note the rule ID and description for implementation
32
44
 
33
45
  2. **Implement the Rule**
34
46
  - **📖 MANDATORY FIRST STEP: Completely read `./agentspace/knowledge/generator/api-reference.md` to understand all API usage before writing any code**
35
- - **📖 MANDATORY SECOND STEP: Completely read `./backend/index.ts` to understand all existing implementations from previous tasks**
36
- - [ ] **Use assignment pattern (`Interaction.conditions = ...`)** to add conditions at the end of `./backend/index.ts` file
47
+ - **📖 MANDATORY SECOND STEP: Completely read `./backend/{module}.ts` to understand all existing implementations from previous tasks**
48
+ - [ ] **Use assignment pattern (`Interaction.conditions = ...`)** to add conditions at the end of `./backend/{module}.ts` file
37
49
  - [ ] Use Condition.create() for creating conditions
38
50
  - [ ] For complex logic, combine multiple conditions using BoolExp
39
51
  - [ ] **Example implementation pattern:**
@@ -143,7 +155,7 @@ import {
143
155
  - [ ] Do NOT write tests until type checking passes
144
156
 
145
157
  4. **Write Focused Test Cases**
146
- - [ ] Add test cases in `tests/permission.test.ts` under the 'Permission and Business Rules' describe group
158
+ - [ ] Add test cases in `tests/{module}.permission.test.ts` under the 'Permission and Business Rules' describe group
147
159
  - [ ] Test EVERY scenario listed in the implementation plan
148
160
  - [ ] Test both success and failure cases
149
161
  - [ ] **🔴 CRITICAL: Always explicitly check `result.error` after `controller.callInteraction`:**
@@ -158,14 +170,13 @@ import {
158
170
 
159
171
  6. **Run Test**
160
172
  - First run type check: `npm run check` to ensure test code has no type errors
161
- - Run full test suite: `npm run test tests/permission.test.ts`
173
+ - Run full test suite: `npm run test tests/{module}.permission.test.ts`
162
174
  - Must fix any failures (new tests or regressions) before proceeding
163
175
 
164
176
  **If test fails:**
165
177
  - Review permission condition logic - is the business rule correctly implemented?
166
178
  - Verify user roles and permissions are properly set up in test data
167
179
  - Check interaction payload matches expected structure
168
- - Verify against `requirements/interaction-matrix.md` for correct permission requirements
169
180
  - Common issues: incorrect role checks, wrong condition logic
170
181
 
171
182
  **🔴 CRITICAL: Never cheat to pass tests:**
@@ -175,18 +186,18 @@ import {
175
186
 
176
187
  **Error handling:**
177
188
  - After 10 fix attempts, STOP IMMEDIATELY and wait for user guidance
178
- - Create error document in `docs/errors/` with descriptive filename (e.g., `permission-admin-error.md`)
179
- - Update `lastError` field in business-rules-and-permission-control-implementation-plan.json with error doc path
189
+ - Create error document in `docs/errors/{module}.{error-name}.md` with descriptive filename
190
+ - Update `lastError` field in `docs/{module}.business-rules-and-permission-control-implementation-plan.json` with error doc path
180
191
  - Never skip tests or fake data to pass
181
192
 
182
193
  7. **Document Progress**
183
- - **🔴 CRITICAL: Update `docs/business-rules-and-permission-control-implementation-plan.json` based on test results:**
184
- - **If ALL tests pass** (`npm run test tests/permission.test.ts` shows ALL tests passing):
194
+ - **🔴 CRITICAL: Update `docs/{module}.business-rules-and-permission-control-implementation-plan.json` based on test results:**
195
+ - **If ALL tests pass** (`npm run test tests/{module}.permission.test.ts` shows ALL tests passing):
185
196
  - Set `"completed": true`
186
197
  - Remove `lastError` field if it exists
187
198
  - **If ANY test fails** (including regression tests):
188
199
  - Keep `"completed": false` - the item is NOT done
189
- - Add/update `lastError` field with path to error document in `docs/errors/`
200
+ - Add/update `lastError` field with path to error document in `docs/errors/{module}.{error-name}.md`
190
201
  - The item remains incomplete and needs fixing
191
202
 
192
203
  8. **Commit Changes (only if tests pass)**