@liquidmetal-ai/raindrop 0.7.0 → 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.
- package/README.md +408 -73
- package/bin/cjs-shims.js +7 -0
- package/bin/run.js +20 -2
- package/bundle/chunk-5GH4FS6C.js +12148 -0
- package/bundle/chunk-6B4I2CKP.js +231 -0
- package/bundle/chunk-6UE75KX2.js +4481 -0
- package/bundle/chunk-AU3EGGJP.js +44 -0
- package/bundle/chunk-CDQRD3JA.js +75 -0
- package/bundle/chunk-CMCEP64V.js +380 -0
- package/bundle/chunk-CW5ZHVPX.js +292 -0
- package/bundle/chunk-G6NE675D.js +238720 -0
- package/bundle/chunk-GLIYVKQA.js +48 -0
- package/bundle/chunk-KXEV6E63.js +133 -0
- package/bundle/chunk-MCRKUPJY.js +4515 -0
- package/bundle/chunk-MGM2L2T3.js +805 -0
- package/bundle/chunk-MVQYQJHI.js +502 -0
- package/bundle/chunk-NG7CZTTE.js +147 -0
- package/bundle/chunk-PU4RCSXF.js +22452 -0
- package/bundle/chunk-VXAZKB3J.js +292 -0
- package/bundle/chunk-W2L3MYN6.js +4480 -0
- package/bundle/chunk-XYJACVNA.js +231 -0
- package/bundle/commands/annotation/get.js +153 -0
- package/bundle/commands/annotation/list.js +226 -0
- package/bundle/commands/annotation/put.js +177 -0
- package/bundle/commands/auth/list.js +75 -0
- package/bundle/commands/auth/login.js +1654 -0
- package/bundle/commands/auth/logout.js +27 -0
- package/bundle/commands/auth/select.js +53 -0
- package/bundle/commands/bucket/create-credential.js +173 -0
- package/bundle/commands/bucket/delete-credential.js +140 -0
- package/bundle/commands/bucket/get-credential.js +151 -0
- package/bundle/commands/bucket/list-credentials.js +148 -0
- package/bundle/commands/build/branch.js +126 -0
- package/bundle/commands/build/checkout.js +198 -0
- package/bundle/commands/build/clone.js +153 -0
- package/bundle/commands/build/delete.js +227 -0
- package/bundle/commands/build/deploy.js +160 -0
- package/bundle/commands/build/env/get.js +105 -0
- package/bundle/commands/build/env/set.js +115 -0
- package/bundle/commands/build/find.js +333 -0
- package/bundle/commands/build/generate.js +75 -0
- package/bundle/commands/build/init.js +76 -0
- package/bundle/commands/build/list.js +11 -0
- package/bundle/commands/build/sandbox.js +65 -0
- package/bundle/commands/build/start.js +84 -0
- package/bundle/commands/build/status.js +1839 -0
- package/bundle/commands/build/stop.js +84 -0
- package/bundle/commands/build/tools/check.js +32 -0
- package/bundle/commands/build/tools/fmt.js +49 -0
- package/bundle/commands/build/unsandbox.js +65 -0
- package/bundle/commands/build/upload.js +83 -0
- package/bundle/commands/build/validate.js +71 -0
- package/bundle/commands/build/workos/delete.js +86 -0
- package/bundle/commands/build/workos/env/attach.js +134 -0
- package/bundle/commands/build/workos/env/create.js +176 -0
- package/bundle/commands/build/workos/env/delete.js +84 -0
- package/bundle/commands/build/workos/env/detach.js +115 -0
- package/bundle/commands/build/workos/env/get.js +117 -0
- package/bundle/commands/build/workos/env/list.js +139 -0
- package/bundle/commands/build/workos/env/set.js +138 -0
- package/bundle/commands/build/workos/invite.js +91 -0
- package/bundle/commands/build/workos/setup.js +124 -0
- package/bundle/commands/build/workos/status.js +93 -0
- package/bundle/commands/dns/create.js +128 -0
- package/bundle/commands/dns/delete.js +80 -0
- package/bundle/commands/dns/get.js +167 -0
- package/bundle/commands/dns/list.js +193 -0
- package/bundle/commands/dns/records/create.js +150 -0
- package/bundle/commands/dns/records/delete.js +76 -0
- package/bundle/commands/dns/records/get.js +118 -0
- package/bundle/commands/dns/records/list.js +153 -0
- package/bundle/commands/dns/records/update.js +146 -0
- package/bundle/commands/logs/query.js +237 -0
- package/bundle/commands/logs/tail.js +155 -0
- package/bundle/commands/mcp/install-claude.js +220 -0
- package/bundle/commands/mcp/install-gemini.js +220 -0
- package/bundle/commands/mcp/install-goose.js +232 -0
- package/bundle/commands/mcp/status.js +153 -0
- package/bundle/commands/object/delete.js +180 -0
- package/bundle/commands/object/get.js +209 -0
- package/bundle/commands/object/list.js +206 -0
- package/bundle/commands/object/put.js +211 -0
- package/bundle/commands/query/chunk-search.js +123 -0
- package/bundle/commands/query/document.js +126 -0
- package/bundle/commands/query/events.js +98 -0
- package/bundle/commands/query/reindex.js +147 -0
- package/bundle/commands/query/search.js +169 -0
- package/bundle/commands/tail.js +31 -0
- package/bundle/index.js +51 -0
- package/dist/base-command.d.ts +6 -0
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +14 -1
- package/dist/build.d.ts +2 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +169 -51
- package/dist/codegen.d.ts +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +17 -3
- package/dist/codegen.test.js +44 -0
- package/dist/commands/build/checkout.d.ts.map +1 -1
- package/dist/commands/build/checkout.js +4 -0
- package/dist/commands/build/delete.d.ts.map +1 -1
- package/dist/commands/build/delete.js +6 -3
- package/dist/commands/build/deploy.d.ts.map +1 -1
- package/dist/commands/build/deploy.js +10 -2
- package/dist/commands/build/find.d.ts +1 -0
- package/dist/commands/build/find.d.ts.map +1 -1
- package/dist/commands/build/find.js +33 -2
- package/dist/commands/build/validate.d.ts.map +1 -1
- package/dist/commands/build/validate.js +0 -1
- package/dist/commands/build/workos/delete.d.ts +18 -0
- package/dist/commands/build/workos/delete.d.ts.map +1 -0
- package/dist/commands/build/workos/delete.js +72 -0
- package/dist/commands/build/workos/env/attach.d.ts +24 -0
- package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
- package/dist/commands/build/workos/env/attach.js +111 -0
- package/dist/commands/build/workos/env/create.d.ts +26 -0
- package/dist/commands/build/workos/env/create.d.ts.map +1 -0
- package/dist/commands/build/workos/env/create.js +156 -0
- package/dist/commands/build/workos/env/delete.d.ts +20 -0
- package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
- package/dist/commands/build/workos/env/delete.js +61 -0
- package/dist/commands/build/workos/env/detach.d.ts +21 -0
- package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
- package/dist/commands/build/workos/env/detach.js +94 -0
- package/dist/commands/build/workos/env/get.d.ts +20 -0
- package/dist/commands/build/workos/env/get.d.ts.map +1 -0
- package/dist/commands/build/workos/env/get.js +94 -0
- package/dist/commands/build/workos/env/list.d.ts +18 -0
- package/dist/commands/build/workos/env/list.d.ts.map +1 -0
- package/dist/commands/build/workos/env/list.js +114 -0
- package/dist/commands/build/workos/env/set.d.ts +27 -0
- package/dist/commands/build/workos/env/set.d.ts.map +1 -0
- package/dist/commands/build/workos/env/set.js +115 -0
- package/dist/commands/build/workos/invite.d.ts +21 -0
- package/dist/commands/build/workos/invite.d.ts.map +1 -0
- package/dist/commands/build/workos/invite.js +68 -0
- package/dist/commands/build/workos/setup.d.ts +20 -0
- package/dist/commands/build/workos/setup.d.ts.map +1 -0
- package/dist/commands/build/workos/setup.js +106 -0
- package/dist/commands/build/workos/status.d.ts +18 -0
- package/dist/commands/build/workos/status.d.ts.map +1 -0
- package/dist/commands/build/workos/status.js +70 -0
- package/dist/commands/mcp/install-claude.d.ts.map +1 -1
- package/dist/commands/mcp/install-claude.js +0 -2
- package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
- package/dist/commands/mcp/install-gemini.js +0 -2
- package/dist/commands/mcp/install-goose.d.ts.map +1 -1
- package/dist/commands/mcp/install-goose.js +0 -2
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/oclif.manifest.json +4544 -2466
- package/package.json +8 -5
- package/templates/claude-code/debug-raindrop-app.md +89 -0
- package/templates/claude-code/new-raindrop-app.md +10 -6
- package/templates/claude-code/reattach-raindrop-session.md +50 -12
- package/templates/claude-code/update-raindrop-app.md +61 -9
- package/templates/db/node_modules/.bin/prisma +2 -2
- package/templates/db/node_modules/.bin/prisma-kysely +2 -2
- package/templates/db/node_modules/.bin/tsc +2 -2
- package/templates/db/node_modules/.bin/tsserver +2 -2
- package/templates/db/node_modules/.bin/zx +2 -2
- package/templates/gemini-code/debug-raindrop-app.toml +86 -0
- package/templates/gemini-code/new-raindrop-app.toml +9 -5
- package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
- package/templates/gemini-code/update-raindrop-app.toml +55 -10
- package/templates/goose/debug-raindrop-app.yaml +91 -0
- package/templates/goose/new-raindrop-app.yaml +12 -7
- package/templates/goose/reattach-raindrop-session.yaml +11 -4
- package/templates/goose/update-raindrop-app.yaml +57 -5
- package/templates/init/src/_app/auth.ts +18 -0
- package/templates/init/src/_app/cors.ts +64 -0
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/templates/claude-code/raindrop-guidelines.md +0 -322
- package/templates/gemini-code/raindrop-guidelines.md +0 -322
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
# RAINDROP GUIDELINES
|
|
2
|
-
|
|
3
|
-
## 🚨 ABSOLUTE COMPLIANCE REQUIRED 🚨
|
|
4
|
-
**YOU ARE A WORKFLOW COMPILER. FOLLOW THE MCP STATE MACHINE.**
|
|
5
|
-
**EXECUTE MCP INSTRUCTIONS EXACTLY. ZERO WORKFLOW DEVIATION.**
|
|
6
|
-
**SOLVE PROBLEMS WITHIN EACH STEP. NEVER SKIP STEPS.**
|
|
7
|
-
|
|
8
|
-
## ⚠️ CRITICAL INSTRUCTION
|
|
9
|
-
**FOLLOW MCP TOOLS GUIDANCE TO THE LETTER. DO NOT MAKE YOUR OWN PLANS.**
|
|
10
|
-
|
|
11
|
-
## WORKFLOWS
|
|
12
|
-
|
|
13
|
-
### NEW APPLICATION: `login` → `set_team` → `architecture_step` → `prd_step` → `sql_step` → `code_step` → `tests_step` → `deployment_step` → `endpoint_test_step`
|
|
14
|
-
|
|
15
|
-
### UPDATE APPLICATION: `update_app_step` → `update_prd_step` → `sql_step` → Continue normal flow
|
|
16
|
-
|
|
17
|
-
## DUAL-IDENTIFIER STATE MANAGEMENT
|
|
18
|
-
|
|
19
|
-
### Session-Timeline Architecture
|
|
20
|
-
- **Session ID**: Long-term project container (persists across workflows)
|
|
21
|
-
- **Timeline ID**: Individual workflow execution instance
|
|
22
|
-
- **State Storage**: All state keyed by `session_id + timeline_id`
|
|
23
|
-
- **Reattachment**: Use `reattach_to_session` to resume workflows
|
|
24
|
-
|
|
25
|
-
### State Management Pattern
|
|
26
|
-
```json
|
|
27
|
-
{
|
|
28
|
-
"session_id": "uuid-project-container",
|
|
29
|
-
"timeline_id": "uuid-workflow-execution",
|
|
30
|
-
"current_state": "workflow_state_name",
|
|
31
|
-
"context": {
|
|
32
|
-
"stakeholders": [],
|
|
33
|
-
"prd_content": "...",
|
|
34
|
-
"application_type": "...",
|
|
35
|
-
"validation_status": {}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## STATE MACHINE
|
|
41
|
-
|
|
42
|
-
```mermaid
|
|
43
|
-
flowchart TD
|
|
44
|
-
NewApp([New App Flow]) --> Login[login]
|
|
45
|
-
|
|
46
|
-
%% Debug Flow Addition
|
|
47
|
-
Debug[debug_step] --> Code
|
|
48
|
-
|
|
49
|
-
%% Main Authentication Flow
|
|
50
|
-
Login --> SetTeam[set_team]
|
|
51
|
-
Login --> Architecture[architecture_step]
|
|
52
|
-
SetTeam --> Architecture
|
|
53
|
-
|
|
54
|
-
%% Architecture to PRD Flow
|
|
55
|
-
Architecture --> PRD[prd_step]
|
|
56
|
-
|
|
57
|
-
%% Core Development Flow
|
|
58
|
-
PRD --> SQL[sql_step]
|
|
59
|
-
SQL --> Code[code_step]
|
|
60
|
-
Code --> Tests[tests_step]
|
|
61
|
-
Tests --> Deploy[deployment_step]
|
|
62
|
-
Deploy --> EndpointTest[endpoint_test_step]
|
|
63
|
-
|
|
64
|
-
%% Success Path
|
|
65
|
-
EndpointTest --> Complete([Workflow Complete])
|
|
66
|
-
|
|
67
|
-
%% Error Recovery Loop
|
|
68
|
-
EndpointTest -->|Endpoints Failed| Debug[debug_step]
|
|
69
|
-
Debug --> Code
|
|
70
|
-
Code -->|Raindrop Build Failed| Code
|
|
71
|
-
Tests -->|Tests Failed| Code
|
|
72
|
-
SQL -->|SQL Schemas Invalid| SQL
|
|
73
|
-
|
|
74
|
-
%% Update App Flow
|
|
75
|
-
UpdateApp([Update App Flow]) --> UpdateStart[update_app_step]
|
|
76
|
-
UpdateStart --> UpdatePRD[update_prd_step]
|
|
77
|
-
UpdatePRD --> PRD
|
|
78
|
-
|
|
79
|
-
%% Reattach Flow
|
|
80
|
-
ReattachFlow([Reattach Flow]) --> Reattach[reattach_to_session]
|
|
81
|
-
Reattach --> CheckState{Check Current State}
|
|
82
|
-
CheckState -->|session_started| SetTeam
|
|
83
|
-
CheckState -->|team_set| Architecture
|
|
84
|
-
CheckState -->|architecture_analyzed| PRD
|
|
85
|
-
CheckState -->|prd_created| SQL
|
|
86
|
-
CheckState -->|sql_schemas_created| Code
|
|
87
|
-
CheckState -->|coding_started| Tests
|
|
88
|
-
CheckState -->|tests_written| Deploy
|
|
89
|
-
CheckState -->|deployed| EndpointTest
|
|
90
|
-
CheckState -->|tested| Complete
|
|
91
|
-
CheckState -->|debugging| Code
|
|
92
|
-
CheckState -->|update_app_started| UpdatePRD
|
|
93
|
-
|
|
94
|
-
%% Entry Points
|
|
95
|
-
classDef entryPoint fill:#e1f5fe
|
|
96
|
-
classDef errorLoop fill:#ffebee
|
|
97
|
-
classDef complete fill:#e8f5e8
|
|
98
|
-
|
|
99
|
-
class NewApp,UpdateApp,ReattachFlow entryPoint
|
|
100
|
-
class Complete complete
|
|
101
|
-
|
|
102
|
-
%% Error Recovery Loops
|
|
103
|
-
class Code,Tests,EndpointTest errorLoop
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## MCP EXECUTION RULES
|
|
107
|
-
|
|
108
|
-
### State Tracking
|
|
109
|
-
- State via `session_id` + `timeline_id`
|
|
110
|
-
- Store in `.raindrop.config.local.json`
|
|
111
|
-
- Use `reattach_to_session` to resume
|
|
112
|
-
|
|
113
|
-
### Enhanced MCP Tool Response Patterns
|
|
114
|
-
|
|
115
|
-
#### Success Response
|
|
116
|
-
```json
|
|
117
|
-
{
|
|
118
|
-
"success": true,
|
|
119
|
-
"message": "Human-readable status",
|
|
120
|
-
"session_id": "uuid",
|
|
121
|
-
"timeline_id": "uuid",
|
|
122
|
-
"context_data": { "key": "value" },
|
|
123
|
-
"next_action": "next_tool_name"
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
#### Error Response with Recovery
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"success": false,
|
|
131
|
-
"message": "Human-readable error",
|
|
132
|
-
"error": "Technical error details",
|
|
133
|
-
"session_id": "uuid",
|
|
134
|
-
"timeline_id": "uuid",
|
|
135
|
-
"blocking_issue": "What is preventing progress",
|
|
136
|
-
"required_action": "What needs to be done",
|
|
137
|
-
"next_action": "recovery_action_or_same_step"
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
#### Validation Gate Response
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"success": false,
|
|
145
|
-
"message": "🚨 VALIDATION FAILED 🚨",
|
|
146
|
-
"blocking_issue": "Description of validation failure",
|
|
147
|
-
"required_action": "Specific action to resolve",
|
|
148
|
-
"validation_status": "failed",
|
|
149
|
-
"next_action": "same_step"
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### MANDATORY BEHAVIORS - NO EXCEPTIONS
|
|
154
|
-
1. **EXECUTE `next_action` FROM EVERY MCP RESPONSE**
|
|
155
|
-
2. **NEVER SKIP ANY WORKFLOW STEP**
|
|
156
|
-
3. **FOLLOW EVERY MCP PROMPT WORD-FOR-WORD**
|
|
157
|
-
4. **WAIT FOR EXPLICIT USER APPROVAL WHERE STATED**
|
|
158
|
-
5. **SOLVE PROBLEMS TO COMPLETE CURRENT STEP**
|
|
159
|
-
6. **VALIDATE PREREQUISITES BEFORE STATE TRANSITIONS**
|
|
160
|
-
7. **PRESERVE STATE DURING ERROR RECOVERY**
|
|
161
|
-
|
|
162
|
-
### ABSOLUTELY FORBIDDEN - WILL CAUSE FAILURE
|
|
163
|
-
- Skip MCP steps
|
|
164
|
-
- Jump ahead in workflow
|
|
165
|
-
- Create alternative workflows
|
|
166
|
-
- Ignore `next_action` directive
|
|
167
|
-
- Change the MCP workflow sequence
|
|
168
|
-
- Suggest workflow improvements
|
|
169
|
-
- Advance workflow without validation
|
|
170
|
-
- Lose state during error handling
|
|
171
|
-
|
|
172
|
-
## VALIDATION FRAMEWORK
|
|
173
|
-
|
|
174
|
-
### Validation Gates (Must Pass Before State Transition)
|
|
175
|
-
- **SQL Validation**: `validate_sql_schemas` - Must pass before `code_step`
|
|
176
|
-
- **TDD Compliance**: `validate_tdd_cycle` - Validate during development
|
|
177
|
-
- **Architecture Compliance**: Validate against selected patterns
|
|
178
|
-
- **Deployment Readiness**: Pre-deployment validation gates
|
|
179
|
-
|
|
180
|
-
### Validation Implementation Pattern
|
|
181
|
-
```typescript
|
|
182
|
-
// Check prerequisites before advancing
|
|
183
|
-
const prerequisiteValid = await validatePrerequisites(session_id, timeline_id);
|
|
184
|
-
if (!prerequisiteValid) {
|
|
185
|
-
return createMcpResponse({
|
|
186
|
-
success: false,
|
|
187
|
-
message: "🚨 VALIDATION FAILED 🚨",
|
|
188
|
-
blocking_issue: "Prerequisites not met",
|
|
189
|
-
required_action: "Complete validation requirements",
|
|
190
|
-
validation_status: "failed",
|
|
191
|
-
next_action: "same_step" // Stay in current step
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### Recovery Workflow Patterns
|
|
197
|
-
- **Debug Loop**: `debugging` state returns to `code_step`
|
|
198
|
-
- **Test Failure Loop**: Failed tests return to `code_step`
|
|
199
|
-
- **SQL Validation Loop**: Invalid SQL returns to `sql_step`
|
|
200
|
-
- **Endpoint Failure Loop**: Failed endpoints enter `debug_step`
|
|
201
|
-
|
|
202
|
-
## CONDITIONAL STATE TRANSITIONS
|
|
203
|
-
|
|
204
|
-
### Advanced State Mapping
|
|
205
|
-
```typescript
|
|
206
|
-
const WORKFLOW_STATE_TO_NEXT_ACTION = {
|
|
207
|
-
// Happy path with validation
|
|
208
|
-
session_started: 'architecture_step',
|
|
209
|
-
architecture_analyzed: 'prd_step',
|
|
210
|
-
prd_created: 'sql_step',
|
|
211
|
-
sql_schemas_created: 'code_step', // Only after sql validation
|
|
212
|
-
coding_started: 'tests_step',
|
|
213
|
-
tests_written: 'deployment_step',
|
|
214
|
-
deployed: 'endpoint_test_step',
|
|
215
|
-
|
|
216
|
-
// Conditional completion
|
|
217
|
-
tested: 'debug_step|mcp_end_step', // User choice based on results
|
|
218
|
-
|
|
219
|
-
// Recovery loops
|
|
220
|
-
debugging: 'code_step',
|
|
221
|
-
sql_validation_failed: 'sql_step',
|
|
222
|
-
test_validation_failed: 'code_step',
|
|
223
|
-
endpoint_validation_failed: 'debug_step',
|
|
224
|
-
|
|
225
|
-
// Update workflows
|
|
226
|
-
update_app_started: 'update_prd_step',
|
|
227
|
-
update_prd_completed: 'sql_step' // FIX: Skip architecture, go directly to SQL
|
|
228
|
-
};
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### State Transition Guards
|
|
232
|
-
1. **Validation Check**: Verify prerequisites are satisfied
|
|
233
|
-
2. **Context Preservation**: Maintain session state during transitions
|
|
234
|
-
3. **Error Context**: Store error details for recovery workflows
|
|
235
|
-
4. **User Approval Gates**: Wait for explicit approval where required
|
|
236
|
-
|
|
237
|
-
## UTILITY TOOLS
|
|
238
|
-
- `get_prd` - Get stored PRD
|
|
239
|
-
- `configure_raindrop` - Setup config
|
|
240
|
-
- `update_conversation_memory` - Store context
|
|
241
|
-
- `validate_sql_schemas` - Validate SQL schema files before proceeding to code_step
|
|
242
|
-
- `validate_tdd_cycle` - Validate Test-Driven Development compliance
|
|
243
|
-
- `save_prd_file` - Save PRD content as markdown file
|
|
244
|
-
- `storeState` - Store workflow state with session+timeline
|
|
245
|
-
- `retrieveState` - Retrieve workflow state by key
|
|
246
|
-
- `createSession` - Initialize new session container
|
|
247
|
-
|
|
248
|
-
## DOCUMENTATION TOOLS
|
|
249
|
-
- `list_documentation_pages` - List all available documentation pages
|
|
250
|
-
- `fetch_documentation_page` - Get specific documentation page content by path
|
|
251
|
-
|
|
252
|
-
## ARCHITECTURE TOOLS
|
|
253
|
-
- `list_architecture_patterns` - List all available architecture patterns
|
|
254
|
-
- `fetch_architecture_pattern` - Get specific architecture pattern content by path
|
|
255
|
-
|
|
256
|
-
## DOCUMENTATION ACCESS
|
|
257
|
-
- List pages: `list_documentation_pages` MCP tool
|
|
258
|
-
- Get page: `fetch_documentation_page` MCP tool with path parameter
|
|
259
|
-
|
|
260
|
-
## ARCHITECTURE PATTERN ACCESS
|
|
261
|
-
- List patterns: `list_architecture_patterns` MCP tool
|
|
262
|
-
- Get pattern: `fetch_architecture_pattern` MCP tool with path parameter
|
|
263
|
-
|
|
264
|
-
## ERROR HANDLING AND RECOVERY
|
|
265
|
-
|
|
266
|
-
### Multi-Level Error Handling
|
|
267
|
-
1. **Tool-Level**: Handle individual tool failures gracefully
|
|
268
|
-
2. **Workflow-Level**: Manage state transition failures
|
|
269
|
-
3. **System-Level**: Handle infrastructure and connectivity issues
|
|
270
|
-
|
|
271
|
-
### Error Recovery Pattern
|
|
272
|
-
```typescript
|
|
273
|
-
try {
|
|
274
|
-
// Execute workflow step
|
|
275
|
-
const result = await executeStep(session_id, timeline_id, step_data);
|
|
276
|
-
|
|
277
|
-
// Validate result before advancing
|
|
278
|
-
const isValid = await validateStepCompletion(result);
|
|
279
|
-
if (!isValid) {
|
|
280
|
-
await storeState(session_id, timeline_id, 'current_state', 'debugging', env);
|
|
281
|
-
return createRecoveryResponse();
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Advance to next step
|
|
285
|
-
await storeState(session_id, timeline_id, 'current_state', next_state, env);
|
|
286
|
-
|
|
287
|
-
} catch (error) {
|
|
288
|
-
// Preserve error context for recovery
|
|
289
|
-
await storeState(session_id, timeline_id, 'error_context', error.message, env);
|
|
290
|
-
await storeState(session_id, timeline_id, 'current_state', 'debugging', env);
|
|
291
|
-
|
|
292
|
-
return createMcpResponse({
|
|
293
|
-
success: false,
|
|
294
|
-
error: error.message,
|
|
295
|
-
next_action: 'debug_step'
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### Context Preservation During Recovery
|
|
301
|
-
- **Error Details**: Store complete error context
|
|
302
|
-
- **Partial Progress**: Preserve completed work
|
|
303
|
-
- **Recovery Guidance**: Provide specific recovery actions
|
|
304
|
-
- **State Integrity**: Maintain workflow state consistency
|
|
305
|
-
|
|
306
|
-
## EXECUTION STYLE
|
|
307
|
-
- **WORKFLOW COMPILER: Execute MCP steps exactly with validation**
|
|
308
|
-
- **PROBLEM SOLVER: Debug, code, fix within each step**
|
|
309
|
-
- **STATE GUARDIAN: Preserve and validate state at each transition**
|
|
310
|
-
- Auto-pilot with user status updates
|
|
311
|
-
- Report key decisions (PRD, code choices)
|
|
312
|
-
- Update during `code_step` and manifest creation
|
|
313
|
-
- Validate prerequisites before advancing
|
|
314
|
-
- Handle errors gracefully with recovery workflows
|
|
315
|
-
|
|
316
|
-
## REMEMBER
|
|
317
|
-
**FOLLOW THE MCP WORKFLOW RELIGIOUSLY.**
|
|
318
|
-
**SOLVE PROBLEMS INTELLIGENTLY WITHIN EACH STEP.**
|
|
319
|
-
**NEVER DEVIATE FROM THE STATE MACHINE SEQUENCE.**
|
|
320
|
-
**VALIDATE BEFORE EVERY STATE TRANSITION.**
|
|
321
|
-
**PRESERVE STATE DURING ERROR RECOVERY.**
|
|
322
|
-
**USE DUAL-IDENTIFIER STATE MANAGEMENT CONSISTENTLY.**
|