cyrus-edge-worker 0.2.5 → 0.2.6
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/dist/AgentSessionManager.d.ts +42 -5
- package/dist/AgentSessionManager.d.ts.map +1 -1
- package/dist/AgentSessionManager.js +135 -15
- package/dist/AgentSessionManager.js.map +1 -1
- package/dist/AskUserQuestionHandler.d.ts +96 -0
- package/dist/AskUserQuestionHandler.d.ts.map +1 -0
- package/dist/AskUserQuestionHandler.js +203 -0
- package/dist/AskUserQuestionHandler.js.map +1 -0
- package/dist/EdgeWorker.d.ts +72 -11
- package/dist/EdgeWorker.d.ts.map +1 -1
- package/dist/EdgeWorker.js +469 -124
- package/dist/EdgeWorker.js.map +1 -1
- package/dist/GitService.d.ts +34 -0
- package/dist/GitService.d.ts.map +1 -0
- package/dist/GitService.js +347 -0
- package/dist/GitService.js.map +1 -0
- package/dist/SharedApplicationServer.d.ts +2 -1
- package/dist/SharedApplicationServer.d.ts.map +1 -1
- package/dist/SharedApplicationServer.js +5 -3
- package/dist/SharedApplicationServer.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/procedures/{ProcedureRouter.d.ts → ProcedureAnalyzer.d.ts} +11 -11
- package/dist/procedures/ProcedureAnalyzer.d.ts.map +1 -0
- package/dist/procedures/{ProcedureRouter.js → ProcedureAnalyzer.js} +21 -14
- package/dist/procedures/ProcedureAnalyzer.js.map +1 -0
- package/dist/procedures/index.d.ts +2 -2
- package/dist/procedures/index.d.ts.map +1 -1
- package/dist/procedures/index.js +2 -2
- package/dist/procedures/index.js.map +1 -1
- package/dist/procedures/registry.d.ts +20 -1
- package/dist/procedures/registry.d.ts.map +1 -1
- package/dist/procedures/registry.js +26 -1
- package/dist/procedures/registry.js.map +1 -1
- package/dist/procedures/types.d.ts +29 -5
- package/dist/procedures/types.d.ts.map +1 -1
- package/dist/procedures/types.js +1 -1
- package/dist/prompts/subroutines/user-testing-summary.md +87 -0
- package/dist/prompts/subroutines/user-testing.md +48 -0
- package/dist/prompts/subroutines/validation-fixer.md +56 -0
- package/dist/prompts/subroutines/verifications.md +51 -24
- package/dist/validation/ValidationLoopController.d.ts +54 -0
- package/dist/validation/ValidationLoopController.d.ts.map +1 -0
- package/dist/validation/ValidationLoopController.js +242 -0
- package/dist/validation/ValidationLoopController.js.map +1 -0
- package/dist/validation/index.d.ts +7 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +7 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/types.d.ts +90 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +33 -0
- package/dist/validation/types.js.map +1 -0
- package/package.json +51 -49
- package/prompts/graphite-orchestrator.md +360 -0
- package/LICENSE +0 -674
- package/dist/procedures/ProcedureRouter.d.ts.map +0 -1
- package/dist/procedures/ProcedureRouter.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ProcedureAnalyzer - Intelligent analysis of agent sessions to determine procedures
|
|
3
3
|
*
|
|
4
4
|
* Uses a SimpleAgentRunner (Claude or Gemini) to analyze requests and determine
|
|
5
5
|
* which procedure (sequence of subroutines) should be executed.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { SimpleGeminiRunner } from "cyrus-gemini-runner";
|
|
8
8
|
import { SimpleClaudeRunner } from "cyrus-simple-agent-runner";
|
|
9
9
|
import { getProcedureForClassification, PROCEDURES } from "./registry.js";
|
|
10
|
-
export class
|
|
11
|
-
|
|
10
|
+
export class ProcedureAnalyzer {
|
|
11
|
+
analysisRunner;
|
|
12
12
|
procedures = new Map();
|
|
13
13
|
constructor(config) {
|
|
14
14
|
// Determine which runner to use
|
|
@@ -26,16 +26,17 @@ export class ProcedureRouter {
|
|
|
26
26
|
"code",
|
|
27
27
|
"debugger",
|
|
28
28
|
"orchestrator",
|
|
29
|
+
"user-testing",
|
|
29
30
|
],
|
|
30
31
|
cyrusHome: config.cyrusHome,
|
|
31
32
|
model: config.model || defaultModel,
|
|
32
33
|
fallbackModel: defaultFallbackModel,
|
|
33
|
-
systemPrompt: this.
|
|
34
|
+
systemPrompt: this.buildAnalysisSystemPrompt(),
|
|
34
35
|
maxTurns: 1,
|
|
35
36
|
timeoutMs: config.timeoutMs || 10000,
|
|
36
37
|
};
|
|
37
38
|
// Initialize the appropriate runner based on type
|
|
38
|
-
this.
|
|
39
|
+
this.analysisRunner =
|
|
39
40
|
runnerType === "claude"
|
|
40
41
|
? new SimpleClaudeRunner(runnerConfig)
|
|
41
42
|
: new SimpleGeminiRunner(runnerConfig);
|
|
@@ -43,9 +44,9 @@ export class ProcedureRouter {
|
|
|
43
44
|
this.loadPredefinedProcedures();
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
46
|
-
* Build the system prompt for
|
|
47
|
+
* Build the system prompt for request analysis and classification
|
|
47
48
|
*/
|
|
48
|
-
|
|
49
|
+
buildAnalysisSystemPrompt() {
|
|
49
50
|
return `You are a request classifier for a software agent system.
|
|
50
51
|
|
|
51
52
|
Analyze the Linear issue request and classify it into ONE of these categories:
|
|
@@ -81,6 +82,12 @@ Analyze the Linear issue request and classify it into ONE of these categories:
|
|
|
81
82
|
- Use this for ALL test-related work: "Add unit tests", "Fix failing tests", "Write test coverage", etc.
|
|
82
83
|
- Use this when user explicitly says "Classify as full development", "classify as code", or similar
|
|
83
84
|
|
|
85
|
+
**user-testing**: User EXPLICITLY requests a manual testing or user testing session.
|
|
86
|
+
- ONLY use this if the user specifically asks for: "test this for me", "run a testing session", "perform user testing", "manual testing"
|
|
87
|
+
- Examples: "Test the login flow manually", "Run user testing on the checkout feature", "Help me test this integration"
|
|
88
|
+
- DO NOT use for automated test writing (use "code" instead)
|
|
89
|
+
- This is for interactive, user-guided testing sessions
|
|
90
|
+
|
|
84
91
|
IMPORTANT: Respond with ONLY the classification word, nothing else.`;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
@@ -92,12 +99,12 @@ IMPORTANT: Respond with ONLY the classification word, nothing else.`;
|
|
|
92
99
|
}
|
|
93
100
|
}
|
|
94
101
|
/**
|
|
95
|
-
*
|
|
102
|
+
* Analyze a request and determine which procedure to use
|
|
96
103
|
*/
|
|
97
104
|
async determineRoutine(requestText) {
|
|
98
105
|
try {
|
|
99
|
-
// Classify the request using
|
|
100
|
-
const result = await this.
|
|
106
|
+
// Classify the request using analysis runner
|
|
107
|
+
const result = await this.analysisRunner.query(`Classify this Linear issue request:\n\n${requestText}`);
|
|
101
108
|
const classification = result.response;
|
|
102
109
|
// Get procedure name for this classification
|
|
103
110
|
const procedureName = getProcedureForClassification(classification);
|
|
@@ -114,7 +121,7 @@ IMPORTANT: Respond with ONLY the classification word, nothing else.`;
|
|
|
114
121
|
}
|
|
115
122
|
catch (error) {
|
|
116
123
|
// Fallback to full-development on error
|
|
117
|
-
console.log("[
|
|
124
|
+
console.log("[ProcedureAnalyzer] Error during analysis:", error);
|
|
118
125
|
const fallbackProcedure = this.procedures.get("full-development");
|
|
119
126
|
if (!fallbackProcedure) {
|
|
120
127
|
throw new Error("Fallback procedure 'full-development' not found");
|
|
@@ -133,12 +140,12 @@ IMPORTANT: Respond with ONLY the classification word, nothing else.`;
|
|
|
133
140
|
getNextSubroutine(session) {
|
|
134
141
|
const procedureMetadata = session.metadata?.procedure;
|
|
135
142
|
if (!procedureMetadata) {
|
|
136
|
-
// No procedure metadata - session doesn't use
|
|
143
|
+
// No procedure metadata - session doesn't use procedures
|
|
137
144
|
return null;
|
|
138
145
|
}
|
|
139
146
|
const procedure = this.procedures.get(procedureMetadata.procedureName);
|
|
140
147
|
if (!procedure) {
|
|
141
|
-
console.error(`[
|
|
148
|
+
console.error(`[ProcedureAnalyzer] Procedure "${procedureMetadata.procedureName}" not found`);
|
|
142
149
|
return null;
|
|
143
150
|
}
|
|
144
151
|
const nextIndex = procedureMetadata.currentSubroutineIndex + 1;
|
|
@@ -221,4 +228,4 @@ IMPORTANT: Respond with ONLY the classification word, nothing else.`;
|
|
|
221
228
|
return this.procedures.get(name);
|
|
222
229
|
}
|
|
223
230
|
}
|
|
224
|
-
//# sourceMappingURL=
|
|
231
|
+
//# sourceMappingURL=ProcedureAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcedureAnalyzer.js","sourceRoot":"","sources":["../../src/procedures/ProcedureAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAkB1E,MAAM,OAAO,iBAAiB;IACrB,cAAc,CAA4C;IAC1D,UAAU,GAAqC,IAAI,GAAG,EAAE,CAAC;IAEjE,YAAY,MAA+B;QAC1C,gCAAgC;QAChC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC;QAEjD,qDAAqD;QACrD,MAAM,YAAY,GACjB,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;QAC7D,MAAM,oBAAoB,GACzB,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC;QAE7D,8BAA8B;QAC9B,MAAM,YAAY,GAAG;YACpB,cAAc,EAAE;gBACf,UAAU;gBACV,eAAe;gBACf,WAAW;gBACX,UAAU;gBACV,MAAM;gBACN,UAAU;gBACV,cAAc;gBACd,cAAc;aACL;YACV,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY;YACnC,aAAa,EAAE,oBAAoB;YACnC,YAAY,EAAE,IAAI,CAAC,yBAAyB,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AAO,CAAC,eAAe,KAAK,SAAS,CAAC;YAE9D,oDAAoD;YACpD,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC;gBACxC,UAAU,EAAE,iBAAiB,CAAC,IAAI;gBAClC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;gBACvB,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBACnD,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;aACnD,CAAC,CAAC;QACJ,CAAC;QAED,gBAAgB;QAChB,iBAAiB,CAAC,sBAAsB,EAAE,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,OAA0B;QAC7C,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,SAA8B;QAC/C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Procedure
|
|
2
|
+
* Procedure analysis system for intelligent workflow selection
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./ProcedureAnalyzer.js";
|
|
5
5
|
export * from "./registry.js";
|
|
6
6
|
export * from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
package/dist/procedures/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Procedure
|
|
2
|
+
* Procedure analysis system for intelligent workflow selection
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./ProcedureAnalyzer.js";
|
|
5
5
|
export * from "./registry.js";
|
|
6
6
|
export * from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Registry of predefined procedures and
|
|
2
|
+
* Registry of predefined procedures and analysis rules
|
|
3
3
|
*/
|
|
4
4
|
import type { ProcedureDefinition, RequestClassification } from "./types.js";
|
|
5
5
|
/**
|
|
@@ -32,6 +32,12 @@ export declare const SUBROUTINES: {
|
|
|
32
32
|
readonly name: "verifications";
|
|
33
33
|
readonly promptPath: "subroutines/verifications.md";
|
|
34
34
|
readonly description: "Run tests, linting, and type checking";
|
|
35
|
+
readonly usesValidationLoop: true;
|
|
36
|
+
};
|
|
37
|
+
readonly validationFixer: {
|
|
38
|
+
readonly name: "validation-fixer";
|
|
39
|
+
readonly promptPath: "subroutines/validation-fixer.md";
|
|
40
|
+
readonly description: "Fix validation failures from the verifications subroutine";
|
|
35
41
|
};
|
|
36
42
|
readonly gitGh: {
|
|
37
43
|
readonly name: "git-gh";
|
|
@@ -85,6 +91,19 @@ export declare const SUBROUTINES: {
|
|
|
85
91
|
readonly suppressThoughtPosting: true;
|
|
86
92
|
readonly disallowedTools: readonly ["mcp__linear__create_comment"];
|
|
87
93
|
};
|
|
94
|
+
readonly userTesting: {
|
|
95
|
+
readonly name: "user-testing";
|
|
96
|
+
readonly promptPath: "subroutines/user-testing.md";
|
|
97
|
+
readonly description: "Perform testing as requested by the user";
|
|
98
|
+
};
|
|
99
|
+
readonly userTestingSummary: {
|
|
100
|
+
readonly name: "user-testing-summary";
|
|
101
|
+
readonly promptPath: "subroutines/user-testing-summary.md";
|
|
102
|
+
readonly singleTurn: true;
|
|
103
|
+
readonly description: "Summary of user testing session results";
|
|
104
|
+
readonly suppressThoughtPosting: true;
|
|
105
|
+
readonly disallowedTools: readonly ["mcp__linear__create_comment"];
|
|
106
|
+
};
|
|
88
107
|
};
|
|
89
108
|
/**
|
|
90
109
|
* Predefined procedure definitions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAgE1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC/C,qBAAqB,EACrB,MAAM,CAUN,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE1E;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC5C,cAAc,EAAE,qBAAqB,GACnC,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Registry of predefined procedures and
|
|
2
|
+
* Registry of predefined procedures and analysis rules
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Predefined subroutine definitions
|
|
@@ -31,6 +31,12 @@ export const SUBROUTINES = {
|
|
|
31
31
|
name: "verifications",
|
|
32
32
|
promptPath: "subroutines/verifications.md",
|
|
33
33
|
description: "Run tests, linting, and type checking",
|
|
34
|
+
usesValidationLoop: true, // Enable validation loop with retry logic
|
|
35
|
+
},
|
|
36
|
+
validationFixer: {
|
|
37
|
+
name: "validation-fixer",
|
|
38
|
+
promptPath: "subroutines/validation-fixer.md",
|
|
39
|
+
description: "Fix validation failures from the verifications subroutine",
|
|
34
40
|
},
|
|
35
41
|
gitGh: {
|
|
36
42
|
name: "git-gh",
|
|
@@ -84,6 +90,19 @@ export const SUBROUTINES = {
|
|
|
84
90
|
suppressThoughtPosting: true,
|
|
85
91
|
disallowedTools: ["mcp__linear__create_comment"],
|
|
86
92
|
},
|
|
93
|
+
userTesting: {
|
|
94
|
+
name: "user-testing",
|
|
95
|
+
promptPath: "subroutines/user-testing.md",
|
|
96
|
+
description: "Perform testing as requested by the user",
|
|
97
|
+
},
|
|
98
|
+
userTestingSummary: {
|
|
99
|
+
name: "user-testing-summary",
|
|
100
|
+
promptPath: "subroutines/user-testing-summary.md",
|
|
101
|
+
singleTurn: true,
|
|
102
|
+
description: "Summary of user testing session results",
|
|
103
|
+
suppressThoughtPosting: true,
|
|
104
|
+
disallowedTools: ["mcp__linear__create_comment"],
|
|
105
|
+
},
|
|
87
106
|
};
|
|
88
107
|
/**
|
|
89
108
|
* Predefined procedure definitions
|
|
@@ -137,6 +156,11 @@ export const PROCEDURES = {
|
|
|
137
156
|
description: "Planning mode for requests needing clarification or implementation planning",
|
|
138
157
|
subroutines: [SUBROUTINES.preparation, SUBROUTINES.planSummary],
|
|
139
158
|
},
|
|
159
|
+
"user-testing": {
|
|
160
|
+
name: "user-testing",
|
|
161
|
+
description: "User-driven testing workflow for manual testing sessions",
|
|
162
|
+
subroutines: [SUBROUTINES.userTesting, SUBROUTINES.userTestingSummary],
|
|
163
|
+
},
|
|
140
164
|
};
|
|
141
165
|
/**
|
|
142
166
|
* Mapping from request classification to procedure name
|
|
@@ -149,6 +173,7 @@ export const CLASSIFICATION_TO_PROCEDURE = {
|
|
|
149
173
|
code: "full-development",
|
|
150
174
|
debugger: "debugger-full",
|
|
151
175
|
orchestrator: "orchestrator-full",
|
|
176
|
+
"user-testing": "user-testing",
|
|
152
177
|
};
|
|
153
178
|
/**
|
|
154
179
|
* Get a procedure definition by name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,OAAO,EAAE;QACR,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,SAAS,EAAE,0FAA0F;QACjH,WAAW,EAAE,2BAA2B;KACxC;IACD,oBAAoB,EAAE;QACrB,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,+CAA+C;KAC5D;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,6BAA6B;QACzC,WAAW,EAAE,yCAAyC;QACtD,UAAU,EAAE,IAAI;QAChB,gBAAgB,EAAE,IAAI,EAAE,oCAAoC;KAC5D;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,6BAA6B;QACzC,WAAW,EAAE,sDAAsD;KACnE;IACD,aAAa,EAAE;QACd,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,uCAAuC;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,OAAO,EAAE;QACR,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,SAAS,EAAE,0FAA0F;QACjH,WAAW,EAAE,2BAA2B;KACxC;IACD,oBAAoB,EAAE;QACrB,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,+CAA+C;KAC5D;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,6BAA6B;QACzC,WAAW,EAAE,yCAAyC;QACtD,UAAU,EAAE,IAAI;QAChB,gBAAgB,EAAE,IAAI,EAAE,oCAAoC;KAC5D;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,6BAA6B;QACzC,WAAW,EAAE,sDAAsD;KACnE;IACD,aAAa,EAAE;QACd,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,uCAAuC;QACpD,kBAAkB,EAAE,IAAI,EAAE,0CAA0C;KACpE;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,iCAAiC;QAC7C,WAAW,EAAE,2DAA2D;KACxE;IACD,KAAK,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,uBAAuB;QACnC,WAAW,EAAE,qCAAqC;KAClD;IACD,cAAc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C;KAC/D;IAED,cAAc,EAAE;QACf,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,0DAA0D;QACvE,WAAW,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,kBAAkB,CAAC;KACtE;CACD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAGpC;IACH,QAAQ,EAAE,iBAAiB;IAC3B,aAAa,EAAE,oBAAoB;IACnC,SAAS,EAAE,iBAAiB;IAC5B,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,eAAe;IACzB,YAAY,EAAE,mBAAmB;IACjC,cAAc,EAAE,cAAc;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACxC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAC5C,cAAqC;IAErC,OAAO,2BAA2B,CAAC,cAAc,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Type definitions for the procedure
|
|
2
|
+
* Type definitions for the procedure analysis system
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Definition of a single subroutine in a procedure
|
|
@@ -21,6 +21,12 @@ export interface SubroutineDefinition {
|
|
|
21
21
|
requiresApproval?: boolean;
|
|
22
22
|
/** Tools that should be explicitly disallowed during this subroutine */
|
|
23
23
|
disallowedTools?: readonly string[];
|
|
24
|
+
/**
|
|
25
|
+
* Whether this subroutine uses the validation loop with retry logic.
|
|
26
|
+
* When true, the subroutine output is parsed as ValidationResult and
|
|
27
|
+
* the validation-fixer subroutine is run on failures (up to maxIterations).
|
|
28
|
+
*/
|
|
29
|
+
usesValidationLoop?: boolean;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
26
32
|
* Complete definition of a procedure (sequence of subroutines)
|
|
@@ -33,6 +39,22 @@ export interface ProcedureDefinition {
|
|
|
33
39
|
/** Ordered list of subroutines to execute */
|
|
34
40
|
subroutines: SubroutineDefinition[];
|
|
35
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Validation loop state for subroutines that use retry logic
|
|
44
|
+
*/
|
|
45
|
+
export interface ValidationLoopMetadata {
|
|
46
|
+
/** Current iteration (1-based) */
|
|
47
|
+
iteration: number;
|
|
48
|
+
/** Whether the loop is in fixer mode (running validation-fixer) */
|
|
49
|
+
inFixerMode: boolean;
|
|
50
|
+
/** Results from each validation attempt */
|
|
51
|
+
attempts: Array<{
|
|
52
|
+
iteration: number;
|
|
53
|
+
pass: boolean;
|
|
54
|
+
reason: string;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
36
58
|
/**
|
|
37
59
|
* Procedure metadata stored in session.metadata.procedure
|
|
38
60
|
*/
|
|
@@ -48,15 +70,17 @@ export interface ProcedureMetadata {
|
|
|
48
70
|
claudeSessionId: string | null;
|
|
49
71
|
geminiSessionId: string | null;
|
|
50
72
|
}>;
|
|
73
|
+
/** State for validation loop (when current subroutine uses usesValidationLoop) */
|
|
74
|
+
validationLoop?: ValidationLoopMetadata;
|
|
51
75
|
}
|
|
52
76
|
/**
|
|
53
|
-
* Request classification types for
|
|
77
|
+
* Request classification types for analysis decisions
|
|
54
78
|
*/
|
|
55
|
-
export type RequestClassification = "question" | "documentation" | "transient" | "planning" | "code" | "debugger" | "orchestrator";
|
|
79
|
+
export type RequestClassification = "question" | "documentation" | "transient" | "planning" | "code" | "debugger" | "orchestrator" | "user-testing";
|
|
56
80
|
/**
|
|
57
|
-
* Result of procedure
|
|
81
|
+
* Result of procedure analysis decision
|
|
58
82
|
*/
|
|
59
|
-
export interface
|
|
83
|
+
export interface ProcedureAnalysisDecision {
|
|
60
84
|
/** Classification of the request */
|
|
61
85
|
classification: RequestClassification;
|
|
62
86
|
/** Selected procedure to execute */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/procedures/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IAEnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IAEpB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,wEAAwE;IACxE,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/procedures/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IAEnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IAEpB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,wEAAwE;IACxE,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEpC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAA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,CAAC;CACnB"}
|
package/dist/procedures/types.js
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# User Testing Summary - Final Response for Linear
|
|
2
|
+
|
|
3
|
+
Generate a comprehensive summary of the user testing session for posting to Linear.
|
|
4
|
+
|
|
5
|
+
## Your Task
|
|
6
|
+
|
|
7
|
+
Create a clear, structured summary that covers:
|
|
8
|
+
|
|
9
|
+
### 1. Testing Overview
|
|
10
|
+
- What was tested (features, workflows, integrations)
|
|
11
|
+
- Testing approach and methodology used
|
|
12
|
+
- Scope of the testing session
|
|
13
|
+
|
|
14
|
+
### 2. Test Results
|
|
15
|
+
- Total number of scenarios/tests executed
|
|
16
|
+
- Pass/fail breakdown
|
|
17
|
+
- Key observations and findings
|
|
18
|
+
|
|
19
|
+
### 3. Issues Discovered (if any)
|
|
20
|
+
- Description of each issue found
|
|
21
|
+
- Severity assessment (critical/high/medium/low)
|
|
22
|
+
- Reproduction steps for failures
|
|
23
|
+
- Relevant error messages or logs
|
|
24
|
+
|
|
25
|
+
### 4. Recommendations
|
|
26
|
+
- Suggested fixes or follow-up actions
|
|
27
|
+
- Areas that may need additional testing
|
|
28
|
+
- Any improvements identified during testing
|
|
29
|
+
|
|
30
|
+
## Format Requirements
|
|
31
|
+
|
|
32
|
+
- **Be concise but comprehensive** - aim for a well-structured summary
|
|
33
|
+
- Use clear, professional language suitable for Linear
|
|
34
|
+
- Use markdown formatting for readability
|
|
35
|
+
- Focus on what matters to stakeholders
|
|
36
|
+
- **To mention someone**: Use `https://linear.app/linear/profiles/username` syntax where `username` is the Linear username (e.g., `https://linear.app/linear/profiles/alice` to mention @alice)
|
|
37
|
+
|
|
38
|
+
## Constraints
|
|
39
|
+
|
|
40
|
+
- **You have exactly 1 turn** - generate the summary in a single response
|
|
41
|
+
- This is the final output that will be posted to Linear
|
|
42
|
+
- Make it informative and actionable
|
|
43
|
+
|
|
44
|
+
## Example Format
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
## Testing Summary
|
|
48
|
+
|
|
49
|
+
[Brief overview of what was tested and the testing approach]
|
|
50
|
+
|
|
51
|
+
### Results
|
|
52
|
+
|
|
53
|
+
| Status | Count |
|
|
54
|
+
|--------|-------|
|
|
55
|
+
| ✅ Passed | X |
|
|
56
|
+
| ❌ Failed | Y |
|
|
57
|
+
| ⚠️ Observations | Z |
|
|
58
|
+
|
|
59
|
+
+++Test Details
|
|
60
|
+
- [Test 1]: [Result and notes]
|
|
61
|
+
- [Test 2]: [Result and notes]
|
|
62
|
+
+++
|
|
63
|
+
|
|
64
|
+
+++Issues Found
|
|
65
|
+
1. **[Issue title]** - [Severity]
|
|
66
|
+
- Description: [What went wrong]
|
|
67
|
+
- Steps to reproduce: [How to trigger]
|
|
68
|
+
- Notes: [Additional context]
|
|
69
|
+
+++
|
|
70
|
+
|
|
71
|
+
## Recommendations
|
|
72
|
+
|
|
73
|
+
[Next steps and suggested actions]
|
|
74
|
+
|
|
75
|
+
## Status
|
|
76
|
+
|
|
77
|
+
[Overall testing status and conclusions]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Collapsible Sections
|
|
81
|
+
|
|
82
|
+
**IMPORTANT**: When creating your summary, make the following sections collapsible (collapsed by default):
|
|
83
|
+
|
|
84
|
+
- **"Test Details"** section - Wrap with `+++Test Details\n...\n+++`
|
|
85
|
+
- **"Issues Found"** section - Wrap with `+++Issues Found\n...\n+++`
|
|
86
|
+
|
|
87
|
+
This keeps the summary concise while preserving detailed information for those who want to expand and read it.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# User Testing Phase
|
|
2
|
+
|
|
3
|
+
Perform testing as requested by the user. This subroutine allows interactive testing based on user instructions.
|
|
4
|
+
|
|
5
|
+
## Your Task
|
|
6
|
+
|
|
7
|
+
Execute the testing activities requested by the user:
|
|
8
|
+
|
|
9
|
+
### 1. Understand the Testing Request
|
|
10
|
+
- Review the user's testing requirements from the issue description
|
|
11
|
+
- Identify what needs to be tested (features, workflows, integrations, etc.)
|
|
12
|
+
- Clarify the scope and success criteria for the testing
|
|
13
|
+
|
|
14
|
+
### 2. Execute Tests
|
|
15
|
+
- Run the tests or testing scenarios as requested
|
|
16
|
+
- Follow any specific testing instructions provided by the user
|
|
17
|
+
- Document test results and observations as you go
|
|
18
|
+
- Note any unexpected behavior or issues discovered
|
|
19
|
+
|
|
20
|
+
### 3. Interactive Testing
|
|
21
|
+
- Be responsive to user feedback during the testing process
|
|
22
|
+
- The user may provide additional instructions or adjustments mid-session
|
|
23
|
+
- Adapt your testing approach based on user guidance
|
|
24
|
+
- Report progress and findings to enable real-time feedback
|
|
25
|
+
|
|
26
|
+
### 4. Document Findings
|
|
27
|
+
- Track all test results (pass/fail/observations)
|
|
28
|
+
- Note any bugs, issues, or areas of concern discovered
|
|
29
|
+
- Document reproduction steps for any failures
|
|
30
|
+
- Capture relevant logs, error messages, or screenshots if applicable
|
|
31
|
+
|
|
32
|
+
## Important Notes
|
|
33
|
+
|
|
34
|
+
- **Do NOT commit or push changes** - that happens in a separate subroutine if needed
|
|
35
|
+
- **Do NOT create or update PRs** - focus on testing only
|
|
36
|
+
- **Be thorough and methodical** - test systematically based on user requirements
|
|
37
|
+
- **Communicate clearly** - report findings as you discover them
|
|
38
|
+
- **Follow user instructions** - this is a user-driven testing session
|
|
39
|
+
|
|
40
|
+
## Expected Output
|
|
41
|
+
|
|
42
|
+
Provide a completion message summarizing the testing session:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Testing complete - [X] scenarios tested, [Y] passed, [Z] issues found.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Example: "Testing complete - 5 scenarios tested, 4 passed, 1 issue found (login redirect failure)."
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Validation Fixer - Fix Verification Failures
|
|
2
|
+
|
|
3
|
+
The previous verification step failed. Your task is to fix the specific issues identified.
|
|
4
|
+
|
|
5
|
+
## Failure Context
|
|
6
|
+
|
|
7
|
+
<validation_failure>
|
|
8
|
+
{{FAILURE_REASON}}
|
|
9
|
+
</validation_failure>
|
|
10
|
+
|
|
11
|
+
<iteration_info>
|
|
12
|
+
Attempt {{ITERATION}} of {{MAX_ITERATIONS}}
|
|
13
|
+
</iteration_info>
|
|
14
|
+
|
|
15
|
+
{{#if PREVIOUS_ATTEMPTS}}
|
|
16
|
+
<previous_attempts>
|
|
17
|
+
{{PREVIOUS_ATTEMPTS}}
|
|
18
|
+
</previous_attempts>
|
|
19
|
+
{{/if}}
|
|
20
|
+
|
|
21
|
+
## Your Task
|
|
22
|
+
|
|
23
|
+
Fix ONLY the specific issues mentioned in the failure reason above. Do not make unrelated changes.
|
|
24
|
+
|
|
25
|
+
### Guidelines
|
|
26
|
+
|
|
27
|
+
1. **Focus on the specific failures** - Address only what failed, nothing else
|
|
28
|
+
2. **Read error messages carefully** - The failure reason contains specific error details
|
|
29
|
+
3. **Make minimal changes** - Fix the issue with the smallest possible change
|
|
30
|
+
4. **Avoid introducing new issues** - Be careful not to break other things while fixing
|
|
31
|
+
5. **If you've seen this error before** - Check the previous attempts to understand what didn't work
|
|
32
|
+
|
|
33
|
+
### Common Fix Patterns
|
|
34
|
+
|
|
35
|
+
- **Acceptance criteria failures**: Re-read the specific criterion that failed, understand what's missing, and implement the missing functionality
|
|
36
|
+
- **Test failures**: Read the failing test, understand the expected vs actual behavior, fix the code or test
|
|
37
|
+
- **TypeScript errors**: Check the type definitions and ensure proper typing
|
|
38
|
+
- **Linting errors**: Run the linter with auto-fix first, then manually fix what remains
|
|
39
|
+
- **Build errors**: Check imports, exports, and module resolution
|
|
40
|
+
|
|
41
|
+
## Important Notes
|
|
42
|
+
|
|
43
|
+
- **Do NOT commit or push changes** - just fix the issues
|
|
44
|
+
- **Do NOT create or update PRs** - that happens in a later subroutine
|
|
45
|
+
- **Do NOT post Linear comments** - your output is for internal workflow only
|
|
46
|
+
- Be thorough but efficient - we have limited retry attempts
|
|
47
|
+
|
|
48
|
+
## Expected Output
|
|
49
|
+
|
|
50
|
+
After fixing the issues, provide a brief completion message (1 sentence max):
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Fixed: [brief description of what was fixed]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Example: "Fixed: Corrected type error in UserService.ts by adding missing optional chaining"
|
|
@@ -4,46 +4,73 @@ You have completed the primary work on this issue. Now perform thorough verifica
|
|
|
4
4
|
|
|
5
5
|
## Your Tasks
|
|
6
6
|
|
|
7
|
-
### 1.
|
|
7
|
+
### 1. Acceptance Criteria Validation (CRITICAL - Do This First)
|
|
8
|
+
|
|
9
|
+
Use the issue tracker `get_issue` tool to fetch the current issue details. The issue identifier is available in your conversation context (e.g., "CYPACK-123").
|
|
10
|
+
|
|
11
|
+
**Steps:**
|
|
12
|
+
1. Fetch the issue using the issue tracker `get_issue` tool with the issue identifier
|
|
13
|
+
2. Extract ALL acceptance criteria from the issue description (look for bullet points, numbered lists, checkboxes, or sections labeled "Acceptance Criteria", "Requirements", "Definition of Done", etc.)
|
|
14
|
+
3. For EACH acceptance criterion, verify that the implementation satisfies it
|
|
15
|
+
4. Document which criteria pass and which fail
|
|
16
|
+
|
|
17
|
+
**Important:** If no explicit acceptance criteria are found, extract implied requirements from the issue title and description. Every issue has requirements that must be verified.
|
|
18
|
+
|
|
19
|
+
### 2. Code Quality Review
|
|
8
20
|
- Review all code changes for quality, consistency, and best practices
|
|
9
21
|
- Ensure proper error handling and edge cases are covered
|
|
10
22
|
- Verify code follows project conventions and patterns
|
|
11
23
|
- Check for any code smells or areas that need refactoring
|
|
12
24
|
|
|
13
|
-
###
|
|
25
|
+
### 3. Testing & Verification
|
|
14
26
|
- Run all relevant tests and ensure they pass
|
|
15
|
-
-
|
|
16
|
-
- Add any missing test coverage for new functionality
|
|
27
|
+
- **Do NOT fix failing tests yourself** - just report the failures
|
|
17
28
|
- Verify the implementation meets all requirements from the issue description
|
|
18
29
|
- Check that existing functionality wasn't broken by the changes
|
|
19
30
|
|
|
20
|
-
###
|
|
21
|
-
- Run linting tools and
|
|
22
|
-
- Run TypeScript type checking (if applicable) and
|
|
23
|
-
-
|
|
24
|
-
- Fix any auto-fixable issues
|
|
31
|
+
### 4. Linting & Type Checking
|
|
32
|
+
- Run linting tools and report any issues
|
|
33
|
+
- Run TypeScript type checking (if applicable) and report any errors
|
|
34
|
+
- **Do NOT fix linting/type errors yourself** - just report them
|
|
25
35
|
|
|
26
|
-
###
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- Ensure code comments are clear and up-to-date
|
|
30
|
-
- Update CHANGELOG.md if applicable
|
|
36
|
+
### 5. Documentation Review
|
|
37
|
+
- Check if relevant documentation needs updating
|
|
38
|
+
- Note any debug code, console.logs, or commented-out sections that should be removed
|
|
31
39
|
|
|
32
40
|
## Important Notes
|
|
33
41
|
|
|
34
|
-
- **Do NOT commit or push changes** - that happens in
|
|
35
|
-
- **Do NOT create or update PRs** - that also happens in
|
|
36
|
-
- **
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
- **Do NOT commit or push changes** - that happens in a later subroutine
|
|
43
|
+
- **Do NOT create or update PRs** - that also happens in a later subroutine
|
|
44
|
+
- **Do NOT fix issues yourself** - your job is to verify and report
|
|
45
|
+
- **Do NOT post Linear comments** - your output is for internal workflow only
|
|
46
|
+
- Be thorough in running and reporting verification results
|
|
47
|
+
- **Acceptance criteria validation is MANDATORY** - failing to validate against acceptance criteria counts as a failed verification
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
## Expected FINAL Message Output Format
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
You MUST respond in your FINAL message with a JSON object in exactly this format:
|
|
44
52
|
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"pass": true,
|
|
56
|
+
"reason": "All 3 acceptance criteria met. 47 tests passing, linting clean, types valid"
|
|
57
|
+
}
|
|
45
58
|
```
|
|
46
|
-
|
|
59
|
+
|
|
60
|
+
Or if there are failures:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"pass": false,
|
|
65
|
+
"reason": "Acceptance criteria failed: 'Support pagination' not implemented. TypeScript error in src/services/UserService.ts:42 - Property 'email' does not exist on type 'User'. 3 tests failing in auth.test.ts"
|
|
66
|
+
}
|
|
47
67
|
```
|
|
48
68
|
|
|
49
|
-
|
|
69
|
+
### Output Rules
|
|
70
|
+
|
|
71
|
+
1. **pass**: Set to `true` if ALL verifications pass (including ALL acceptance criteria), `false` if ANY fail
|
|
72
|
+
2. **reason**:
|
|
73
|
+
- If passing: Brief summary that mentions acceptance criteria status, e.g., "All X acceptance criteria met. Y tests passing, linting clean, types valid"
|
|
74
|
+
- If failing: Specific error details that would help someone fix the issues. **Always list any failing acceptance criteria first**, then other failures.
|
|
75
|
+
|
|
76
|
+
**CRITICAL**: Your entire final response message must be valid JSON matching the schema above. Do not include any text before or after the JSON.
|