@cat-factory/agents 0.90.0 → 0.92.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/dist/agents/catalog.d.ts.map +1 -1
- package/dist/agents/catalog.js +13 -3
- package/dist/agents/catalog.js.map +1 -1
- package/dist/agents/kinds/gatable.d.ts +16 -0
- package/dist/agents/kinds/gatable.d.ts.map +1 -0
- package/dist/agents/kinds/gatable.js +24 -0
- package/dist/agents/kinds/gatable.js.map +1 -0
- package/dist/agents/kinds/initiative.d.ts.map +1 -1
- package/dist/agents/kinds/initiative.js +4 -2
- package/dist/agents/kinds/initiative.js.map +1 -1
- package/dist/agents/kinds/registry.d.ts +19 -0
- package/dist/agents/kinds/registry.d.ts.map +1 -1
- package/dist/agents/kinds/registry.js +9 -0
- package/dist/agents/kinds/registry.js.map +1 -1
- package/dist/agents/kinds/versions.d.ts +9 -9
- package/dist/agents/kinds/versions.d.ts.map +1 -1
- package/dist/agents/kinds/versions.js +18 -10
- package/dist/agents/kinds/versions.js.map +1 -1
- package/dist/agents/prompts/bespoke.d.ts +23 -0
- package/dist/agents/prompts/bespoke.d.ts.map +1 -0
- package/dist/agents/prompts/bespoke.js +13 -0
- package/dist/agents/prompts/bespoke.js.map +1 -0
- package/dist/agents/prompts/brainstorm.d.ts +5 -0
- package/dist/agents/prompts/brainstorm.d.ts.map +1 -1
- package/dist/agents/prompts/brainstorm.js +77 -57
- package/dist/agents/prompts/brainstorm.js.map +1 -1
- package/dist/agents/prompts/clarity.d.ts +3 -0
- package/dist/agents/prompts/clarity.d.ts.map +1 -1
- package/dist/agents/prompts/clarity.js +37 -26
- package/dist/agents/prompts/clarity.js.map +1 -1
- package/dist/agents/prompts/inline-engine.d.ts +9 -0
- package/dist/agents/prompts/inline-engine.d.ts.map +1 -0
- package/dist/agents/prompts/inline-engine.js +38 -0
- package/dist/agents/prompts/inline-engine.js.map +1 -0
- package/dist/agents/prompts/requirements.d.ts +11 -0
- package/dist/agents/prompts/requirements.d.ts.map +1 -1
- package/dist/agents/prompts/requirements.js +123 -86
- package/dist/agents/prompts/requirements.js.map +1 -1
- package/dist/agents/prompts/shared.d.ts +29 -0
- package/dist/agents/prompts/shared.d.ts.map +1 -1
- package/dist/agents/prompts/shared.js +43 -0
- package/dist/agents/prompts/shared.js.map +1 -1
- package/dist/agents/prompts/standard.d.ts +15 -0
- package/dist/agents/prompts/standard.d.ts.map +1 -1
- package/dist/agents/prompts/standard.js +33 -0
- package/dist/agents/prompts/standard.js.map +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/presets/tech-migration/preset.js +1 -1
- package/dist/presets/tech-migration/preset.js.map +1 -1
- package/package.json +5 -5
|
@@ -10,30 +10,38 @@
|
|
|
10
10
|
// identified trade-offs, as review "items" (the same JSON shape the requirements reviewer
|
|
11
11
|
// emits — title + detail, where the detail spells out the trade-offs). A human picks /
|
|
12
12
|
// steers / dismisses, and the rework call folds the picks into ONE converged direction.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
import { NO_ASSUMED_PRODUCT } from './shared.js';
|
|
14
|
+
import { composeBespokePrompt } from './bespoke.js';
|
|
15
|
+
export const REQUIREMENTS_BRAINSTORM_PROMPT = {
|
|
16
|
+
role: 'You are a sharp product partner helping someone turn a ROUGH, VAGUE idea into a clear ' +
|
|
17
|
+
'set of requirements through a structured dialogue. You do NOT decide for them and you ' +
|
|
18
|
+
'do NOT assume the thinking is already done — you PROPOSE concrete directions and make ' +
|
|
19
|
+
'the trade-offs explicit so the human can choose. From the rough description, surface the ' +
|
|
20
|
+
'key open product decisions and, for each, lay out the realistic options: what to build, ' +
|
|
21
|
+
'scope boundaries (in / out), the primary user and the core behaviours, and the notable ' +
|
|
22
|
+
'edge cases or risks. For EACH item state the concrete options and their trade-offs ' +
|
|
23
|
+
'(benefit vs cost / risk) plainly, and end with a specific question the human can answer ' +
|
|
24
|
+
'to choose. Be concrete and opinionated about the trade-offs, but never invent facts or ' +
|
|
25
|
+
'silently pick for them. Stay on PRODUCT requirements and behaviours — leave technical / ' +
|
|
26
|
+
'architecture choices for a later stage.',
|
|
27
|
+
directives: ' ' + NO_ASSUMED_PRODUCT + ' Respond with ONLY a JSON object — no prose, no code fences.',
|
|
28
|
+
};
|
|
29
|
+
export const REQUIREMENTS_BRAINSTORM_SYSTEM_PROMPT = composeBespokePrompt(REQUIREMENTS_BRAINSTORM_PROMPT);
|
|
30
|
+
export const ARCHITECTURE_BRAINSTORM_PROMPT = {
|
|
31
|
+
role: 'You are a pragmatic staff engineer helping someone explore and finalize a technical ' +
|
|
32
|
+
'APPROACH through a structured dialogue, starting from requirements that have already ' +
|
|
33
|
+
'been refined in earlier stages. You do NOT design the whole solution yourself and you do ' +
|
|
34
|
+
'NOT silently pick — you PROPOSE a small number of viable approaches and make the ' +
|
|
35
|
+
'trade-offs explicit so the human can choose and converge. Surface the key architectural ' +
|
|
36
|
+
'decisions (component boundaries, data model / storage, integration and contracts, ' +
|
|
37
|
+
'sequencing, the main risks and non-functional needs), and for EACH present the realistic ' +
|
|
38
|
+
'options with their trade-offs (simplicity vs flexibility, effort vs risk, build vs reuse) ' +
|
|
39
|
+
'plainly, and end with a specific question the human can answer to choose. Prefer the ' +
|
|
40
|
+
'simplest approach that satisfies the requirements; call out where an option is reversible ' +
|
|
41
|
+
'vs hard to undo. Do NOT invent constraints.',
|
|
42
|
+
directives: ' ' + NO_ASSUMED_PRODUCT + ' Respond with ONLY a JSON object — no prose, no code fences.',
|
|
43
|
+
};
|
|
44
|
+
export const ARCHITECTURE_BRAINSTORM_SYSTEM_PROMPT = composeBespokePrompt(ARCHITECTURE_BRAINSTORM_PROMPT);
|
|
37
45
|
/**
|
|
38
46
|
* The "requirements-brainstorm rework" agent. Given the rough idea plus the options the
|
|
39
47
|
* human picked / steered, it folds everything into ONE self-contained requirements
|
|
@@ -41,42 +49,54 @@ export const ARCHITECTURE_BRAINSTORM_SYSTEM_PROMPT = 'You are a pragmatic staff
|
|
|
41
49
|
* must produce this document even when no options were raised — so every brainstormed task
|
|
42
50
|
* carries a clean direction.
|
|
43
51
|
*/
|
|
44
|
-
export const
|
|
45
|
-
'
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
export const REQUIREMENTS_BRAINSTORM_REWORK_PROMPT = {
|
|
53
|
+
role: 'You are a product writer. You are given a rough idea for a single piece of work, plus the ' +
|
|
54
|
+
'options a human chose and any steering they gave during a brainstorm. Produce a revised, ' +
|
|
55
|
+
'self-contained REQUIREMENTS DIRECTION in Markdown that commits to the chosen options, ' +
|
|
56
|
+
'resolves the open questions, and states scope and behaviours explicitly. Preserve the ' +
|
|
57
|
+
"human's intent; do not invent requirements beyond what their choices imply. Even when no " +
|
|
58
|
+
'options were raised, restate the idea cleanly in the SAME standard structure.',
|
|
59
|
+
directives: ' ' +
|
|
60
|
+
NO_ASSUMED_PRODUCT +
|
|
61
|
+
' Use EXACTLY ' +
|
|
62
|
+
'these Markdown sections, in this order, omitting a section only when it has no content:\n' +
|
|
63
|
+
'# <Title> — Requirements Direction\n' +
|
|
64
|
+
'## Goal — one paragraph: the problem and the outcome we want.\n' +
|
|
65
|
+
'## In Scope — the behaviours / capabilities we will build.\n' +
|
|
66
|
+
'## Out of Scope — what we are explicitly NOT doing.\n' +
|
|
67
|
+
'## Users & Key Behaviours — who it serves and the core flows.\n' +
|
|
68
|
+
'## Decisions & Rationale — the options chosen and why (the trade-offs accepted).\n' +
|
|
69
|
+
'## Open Risks / Follow-ups — anything still uncertain.\n' +
|
|
70
|
+
'Respond with ONLY the requirements direction in Markdown — no preamble, no commentary, ' +
|
|
71
|
+
'no code fences.',
|
|
72
|
+
};
|
|
73
|
+
export const REQUIREMENTS_BRAINSTORM_REWORK_SYSTEM_PROMPT = composeBespokePrompt(REQUIREMENTS_BRAINSTORM_REWORK_PROMPT);
|
|
60
74
|
/**
|
|
61
75
|
* The "architecture-brainstorm rework" agent. Given the refined requirements plus the
|
|
62
76
|
* approach options the human chose, it folds everything into ONE self-contained approach
|
|
63
77
|
* document the downstream architect designs against.
|
|
64
78
|
*/
|
|
65
|
-
export const
|
|
66
|
-
'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
export const ARCHITECTURE_BRAINSTORM_REWORK_PROMPT = {
|
|
80
|
+
role: 'You are a technical writer for engineering decisions. You are given the refined ' +
|
|
81
|
+
'requirements for a single piece of work, plus the approach options a human chose and any ' +
|
|
82
|
+
'steering they gave during a brainstorm. Produce a revised, self-contained TECHNICAL ' +
|
|
83
|
+
'APPROACH in Markdown that commits to the chosen options, resolves the open questions, and ' +
|
|
84
|
+
"states the shape of the solution explicitly. Preserve the human's intent; do not invent " +
|
|
85
|
+
'constraints beyond what their choices imply. Even when no options were raised, restate the ' +
|
|
86
|
+
'approach cleanly in the SAME standard structure.',
|
|
87
|
+
directives: ' ' +
|
|
88
|
+
NO_ASSUMED_PRODUCT +
|
|
89
|
+
' Use EXACTLY these Markdown sections, in ' +
|
|
90
|
+
'this order, omitting a section only when it has no content:\n' +
|
|
91
|
+
'# <Title> — Technical Approach\n' +
|
|
92
|
+
'## Overview — one paragraph: the chosen approach and why.\n' +
|
|
93
|
+
'## Components & Responsibilities — the main pieces and what each owns.\n' +
|
|
94
|
+
'## Data & Contracts — the data model / storage and the key interfaces.\n' +
|
|
95
|
+
'## Decisions & Trade-offs — the options chosen and the trade-offs accepted.\n' +
|
|
96
|
+
'## Risks & Non-functional — performance, security, operability, and the main risks.\n' +
|
|
97
|
+
'## Sequencing — the rough order of implementation.\n' +
|
|
98
|
+
'Respond with ONLY the technical approach in Markdown — no preamble, no commentary, no ' +
|
|
99
|
+
'code fences.',
|
|
100
|
+
};
|
|
101
|
+
export const ARCHITECTURE_BRAINSTORM_REWORK_SYSTEM_PROMPT = composeBespokePrompt(ARCHITECTURE_BRAINSTORM_REWORK_PROMPT);
|
|
82
102
|
//# sourceMappingURL=brainstorm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brainstorm.js","sourceRoot":"","sources":["../../../src/agents/prompts/brainstorm.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,qFAAqF;AACrF,uFAAuF;AACvF,uFAAuF;AACvF,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,EAAE;AACF,oFAAoF;AACpF,0FAA0F;AAC1F,uFAAuF;AACvF,wFAAwF;AAExF,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"brainstorm.js","sourceRoot":"","sources":["../../../src/agents/prompts/brainstorm.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,qFAAqF;AACrF,uFAAuF;AACvF,uFAAuF;AACvF,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,EAAE;AACF,oFAAoF;AACpF,0FAA0F;AAC1F,uFAAuF;AACvF,wFAAwF;AAExF,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAA4B,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAE7E,MAAM,CAAC,MAAM,8BAA8B,GAAwB;IACjE,IAAI,EACF,wFAAwF;QACxF,wFAAwF;QACxF,wFAAwF;QACxF,2FAA2F;QAC3F,0FAA0F;QAC1F,yFAAyF;QACzF,qFAAqF;QACrF,0FAA0F;QAC1F,yFAAyF;QACzF,0FAA0F;QAC1F,yCAAyC;IAC3C,UAAU,EACR,GAAG,GAAG,kBAAkB,GAAG,8DAA8D;CAC5F,CAAA;AAED,MAAM,CAAC,MAAM,qCAAqC,GAAG,oBAAoB,CACvE,8BAA8B,CAC/B,CAAA;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAwB;IACjE,IAAI,EACF,sFAAsF;QACtF,uFAAuF;QACvF,2FAA2F;QAC3F,mFAAmF;QACnF,0FAA0F;QAC1F,oFAAoF;QACpF,2FAA2F;QAC3F,4FAA4F;QAC5F,uFAAuF;QACvF,4FAA4F;QAC5F,6CAA6C;IAC/C,UAAU,EACR,GAAG,GAAG,kBAAkB,GAAG,8DAA8D;CAC5F,CAAA;AAED,MAAM,CAAC,MAAM,qCAAqC,GAAG,oBAAoB,CACvE,8BAA8B,CAC/B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAwB;IACxE,IAAI,EACF,4FAA4F;QAC5F,2FAA2F;QAC3F,wFAAwF;QACxF,wFAAwF;QACxF,2FAA2F;QAC3F,+EAA+E;IACjF,UAAU,EACR,GAAG;QACH,kBAAkB;QAClB,eAAe;QACf,2FAA2F;QAC3F,sCAAsC;QACtC,iEAAiE;QACjE,8DAA8D;QAC9D,uDAAuD;QACvD,iEAAiE;QACjE,oFAAoF;QACpF,0DAA0D;QAC1D,yFAAyF;QACzF,iBAAiB;CACpB,CAAA;AAED,MAAM,CAAC,MAAM,4CAA4C,GAAG,oBAAoB,CAC9E,qCAAqC,CACtC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAwB;IACxE,IAAI,EACF,kFAAkF;QAClF,2FAA2F;QAC3F,sFAAsF;QACtF,4FAA4F;QAC5F,0FAA0F;QAC1F,6FAA6F;QAC7F,kDAAkD;IACpD,UAAU,EACR,GAAG;QACH,kBAAkB;QAClB,2CAA2C;QAC3C,+DAA+D;QAC/D,kCAAkC;QAClC,6DAA6D;QAC7D,0EAA0E;QAC1E,0EAA0E;QAC1E,+EAA+E;QAC/E,uFAAuF;QACvF,sDAAsD;QACtD,wFAAwF;QACxF,cAAc;CACjB,CAAA;AAED,MAAM,CAAC,MAAM,4CAA4C,GAAG,oBAAoB,CAC9E,qCAAqC,CACtC,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type BespokeSystemPrompt } from './bespoke.js';
|
|
2
|
+
export declare const CLARITY_REVIEW_PROMPT: BespokeSystemPrompt;
|
|
1
3
|
export declare const CLARITY_REVIEW_SYSTEM_PROMPT: string;
|
|
2
4
|
/**
|
|
3
5
|
* The "clarity rework" agent. Given a bug report plus the answers / dismissals a human
|
|
@@ -6,5 +8,6 @@ export declare const CLARITY_REVIEW_SYSTEM_PROMPT: string;
|
|
|
6
8
|
* can act on it directly. It must produce this standard document even when the reviewer
|
|
7
9
|
* raised no findings — so every bug task carries a clean, fix-ready report.
|
|
8
10
|
*/
|
|
11
|
+
export declare const CLARITY_REWORK_PROMPT: BespokeSystemPrompt;
|
|
9
12
|
export declare const CLARITY_REWORK_SYSTEM_PROMPT: string;
|
|
10
13
|
//# sourceMappingURL=clarity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clarity.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/clarity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clarity.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/clarity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,cAAc,CAAA;AAE7E,eAAO,MAAM,qBAAqB,EAAE,mBAWnC,CAAA;AAED,eAAO,MAAM,4BAA4B,QAA8C,CAAA;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAwBnC,CAAA;AAED,eAAO,MAAM,4BAA4B,QAA8C,CAAA"}
|
|
@@ -4,14 +4,19 @@
|
|
|
4
4
|
// into the versioned prompt registry (see ../kinds/versions.ts) so the benchmark
|
|
5
5
|
// harness can pin them. They mirror the requirements reviewer/rework prompts but judge
|
|
6
6
|
// a bug report's *fixability* rather than a feature brief's *completeness*.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { NO_ASSUMED_PRODUCT } from './shared.js';
|
|
8
|
+
import { composeBespokePrompt } from './bespoke.js';
|
|
9
|
+
export const CLARITY_REVIEW_PROMPT = {
|
|
10
|
+
role: 'You are a meticulous engineer triaging a BUG REPORT before anyone is assigned to fix ' +
|
|
11
|
+
'it. Judge whether the report is clear and complete enough to be FIXABLE, and surface ' +
|
|
12
|
+
'everything that would block a confident fix: missing or vague reproduction steps ' +
|
|
13
|
+
'(gaps), unclear expected-vs-actual behaviour, missing environment / version / ' +
|
|
14
|
+
'configuration details, an unstated or ambiguous affected area or scope, and unverified ' +
|
|
15
|
+
'assumptions about the cause. Be specific, concrete and actionable, and phrase each item ' +
|
|
16
|
+
'so the reporter can answer it directly. Do NOT invent reproduction steps or facts.',
|
|
17
|
+
directives: ' ' + NO_ASSUMED_PRODUCT + ' Respond with ONLY a JSON object — no prose, no code fences.',
|
|
18
|
+
};
|
|
19
|
+
export const CLARITY_REVIEW_SYSTEM_PROMPT = composeBespokePrompt(CLARITY_REVIEW_PROMPT);
|
|
15
20
|
/**
|
|
16
21
|
* The "clarity rework" agent. Given a bug report plus the answers / dismissals a human
|
|
17
22
|
* gave to the reviewer's triage findings, it folds everything into ONE self-contained,
|
|
@@ -19,22 +24,28 @@ export const CLARITY_REVIEW_SYSTEM_PROMPT = 'You are a meticulous engineer triag
|
|
|
19
24
|
* can act on it directly. It must produce this standard document even when the reviewer
|
|
20
25
|
* raised no findings — so every bug task carries a clean, fix-ready report.
|
|
21
26
|
*/
|
|
22
|
-
export const
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
export const CLARITY_REWORK_PROMPT = {
|
|
28
|
+
role: 'You are a bug-report editor. You are given the current bug report for a single defect, ' +
|
|
29
|
+
'plus any clarifying questions and the answers a human gave. Produce a revised, ' +
|
|
30
|
+
'self-contained bug report in Markdown that folds every answer in, resolves the ' +
|
|
31
|
+
'ambiguities, and states the previously-missing details explicitly. Preserve the ' +
|
|
32
|
+
'original intent; do not invent facts beyond what the answers provide. Even when there ' +
|
|
33
|
+
'are no questions, restate the report cleanly in the SAME standard structure.',
|
|
34
|
+
directives: ' ' +
|
|
35
|
+
NO_ASSUMED_PRODUCT +
|
|
36
|
+
' Use ' +
|
|
37
|
+
'EXACTLY these Markdown sections, in this order, omitting a section only when it has no ' +
|
|
38
|
+
'content:\n' +
|
|
39
|
+
'# <Title> — Bug Report\n' +
|
|
40
|
+
'## Summary — one paragraph describing the defect and its impact.\n' +
|
|
41
|
+
'## Steps to Reproduce — a numbered list of concrete, deterministic steps.\n' +
|
|
42
|
+
'## Expected Behaviour — what should happen.\n' +
|
|
43
|
+
'## Actual Behaviour — what happens instead.\n' +
|
|
44
|
+
'## Environment — OS / version / configuration / data relevant to the repro.\n' +
|
|
45
|
+
'## Affected Area / Scope — the components or behaviours in scope (and out of scope).\n' +
|
|
46
|
+
'## Notes / Suspected Cause — any confirmed leads (mark unverified ones as such).\n' +
|
|
47
|
+
'Respond with ONLY the revised bug report in Markdown — no preamble, no commentary, no ' +
|
|
48
|
+
'code fences.',
|
|
49
|
+
};
|
|
50
|
+
export const CLARITY_REWORK_SYSTEM_PROMPT = composeBespokePrompt(CLARITY_REWORK_PROMPT);
|
|
40
51
|
//# sourceMappingURL=clarity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clarity.js","sourceRoot":"","sources":["../../../src/agents/prompts/clarity.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,qEAAqE;AACrE,qFAAqF;AACrF,iFAAiF;AACjF,uFAAuF;AACvF,4EAA4E;AAE5E,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"clarity.js","sourceRoot":"","sources":["../../../src/agents/prompts/clarity.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,qEAAqE;AACrE,qFAAqF;AACrF,iFAAiF;AACjF,uFAAuF;AACvF,4EAA4E;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAA4B,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAE7E,MAAM,CAAC,MAAM,qBAAqB,GAAwB;IACxD,IAAI,EACF,uFAAuF;QACvF,uFAAuF;QACvF,mFAAmF;QACnF,gFAAgF;QAChF,yFAAyF;QACzF,0FAA0F;QAC1F,oFAAoF;IACtF,UAAU,EACR,GAAG,GAAG,kBAAkB,GAAG,8DAA8D;CAC5F,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC,qBAAqB,CAAC,CAAA;AAEvF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwB;IACxD,IAAI,EACF,yFAAyF;QACzF,iFAAiF;QACjF,iFAAiF;QACjF,kFAAkF;QAClF,wFAAwF;QACxF,8EAA8E;IAChF,UAAU,EACR,GAAG;QACH,kBAAkB;QAClB,OAAO;QACP,yFAAyF;QACzF,YAAY;QACZ,0BAA0B;QAC1B,oEAAoE;QACpE,6EAA6E;QAC7E,+CAA+C;QAC/C,+CAA+C;QAC/C,+EAA+E;QAC/E,wFAAwF;QACxF,oFAAoF;QACpF,wFAAwF;QACxF,cAAc;CACjB,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BespokeSystemPrompt } from './bespoke.js';
|
|
2
|
+
/** The agent-kind ids whose prompts are declared here, in flow order. */
|
|
3
|
+
export declare const REQUIREMENTS_REWORK_AGENT_KIND = "requirements-rework";
|
|
4
|
+
export declare const REQUIREMENTS_WRITER_AGENT_KIND = "requirements-writer";
|
|
5
|
+
export declare const CLARITY_REWORK_AGENT_KIND = "clarity-rework";
|
|
6
|
+
export declare const REQUIREMENTS_BRAINSTORM_REWORK_AGENT_KIND = "requirements-brainstorm-rework";
|
|
7
|
+
export declare const ARCHITECTURE_BRAINSTORM_REWORK_AGENT_KIND = "architecture-brainstorm-rework";
|
|
8
|
+
export declare const INLINE_ENGINE_SYSTEM_PROMPTS: Readonly<Record<string, BespokeSystemPrompt>>;
|
|
9
|
+
//# sourceMappingURL=inline-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-engine.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/inline-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AA4BvD,yEAAyE;AACzE,eAAO,MAAM,8BAA8B,wBAAwB,CAAA;AACnE,eAAO,MAAM,8BAA8B,wBAAwB,CAAA;AACnE,eAAO,MAAM,yBAAyB,mBAAmB,CAAA;AACzD,eAAO,MAAM,yCAAyC,mCAAmC,CAAA;AACzF,eAAO,MAAM,yCAAyC,mCAAmC,CAAA;AAEzF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAUtF,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { REVIEW_PROMPT, REWORK_PROMPT, WRITER_PROMPT } from './requirements.js';
|
|
2
|
+
import { CLARITY_REVIEW_PROMPT, CLARITY_REWORK_PROMPT } from './clarity.js';
|
|
3
|
+
import { ARCHITECTURE_BRAINSTORM_PROMPT, ARCHITECTURE_BRAINSTORM_REWORK_PROMPT, REQUIREMENTS_BRAINSTORM_PROMPT, REQUIREMENTS_BRAINSTORM_REWORK_PROMPT, } from './brainstorm.js';
|
|
4
|
+
// The system prompts of the INLINE ENGINE steps, keyed by the agent-kind id each runs under.
|
|
5
|
+
//
|
|
6
|
+
// These kinds have no `registerAgentKind` entry and never dispatch to a container:
|
|
7
|
+
// `IterativeReviewService` drives them as plain inline `generateText` calls with the constants
|
|
8
|
+
// below. They therefore bypass `systemPromptFor` — which is the seam that both applies a
|
|
9
|
+
// workspace prompt override and re-appends the invariants an override may not delete. The map
|
|
10
|
+
// closes that gap from the other side: the SERVICE composes its pair (honouring the override on
|
|
11
|
+
// the role half), and the prompt EDITOR reads the same pair so the baseline it shows, diffs
|
|
12
|
+
// against and restores to is the text that actually runs.
|
|
13
|
+
//
|
|
14
|
+
// Without it, a workspace editing one of these kinds saw the thin one-line role from `roles.ts`
|
|
15
|
+
// as the built-in — a prompt no code path sends — and its saved override was silently ignored at
|
|
16
|
+
// run time.
|
|
17
|
+
//
|
|
18
|
+
// Adding another inline engine kind means adding it here, SPLIT: a kind added with its
|
|
19
|
+
// directives inside `role` composes and runs fine, and fails only later, as a workspace that
|
|
20
|
+
// edited it loses its JSON output contract or its scope boundary mid-run.
|
|
21
|
+
/** The agent-kind ids whose prompts are declared here, in flow order. */
|
|
22
|
+
export const REQUIREMENTS_REWORK_AGENT_KIND = 'requirements-rework';
|
|
23
|
+
export const REQUIREMENTS_WRITER_AGENT_KIND = 'requirements-writer';
|
|
24
|
+
export const CLARITY_REWORK_AGENT_KIND = 'clarity-rework';
|
|
25
|
+
export const REQUIREMENTS_BRAINSTORM_REWORK_AGENT_KIND = 'requirements-brainstorm-rework';
|
|
26
|
+
export const ARCHITECTURE_BRAINSTORM_REWORK_AGENT_KIND = 'architecture-brainstorm-rework';
|
|
27
|
+
export const INLINE_ENGINE_SYSTEM_PROMPTS = {
|
|
28
|
+
'requirements-review': REVIEW_PROMPT,
|
|
29
|
+
[REQUIREMENTS_REWORK_AGENT_KIND]: REWORK_PROMPT,
|
|
30
|
+
[REQUIREMENTS_WRITER_AGENT_KIND]: WRITER_PROMPT,
|
|
31
|
+
'clarity-review': CLARITY_REVIEW_PROMPT,
|
|
32
|
+
[CLARITY_REWORK_AGENT_KIND]: CLARITY_REWORK_PROMPT,
|
|
33
|
+
'requirements-brainstorm': REQUIREMENTS_BRAINSTORM_PROMPT,
|
|
34
|
+
[REQUIREMENTS_BRAINSTORM_REWORK_AGENT_KIND]: REQUIREMENTS_BRAINSTORM_REWORK_PROMPT,
|
|
35
|
+
'architecture-brainstorm': ARCHITECTURE_BRAINSTORM_PROMPT,
|
|
36
|
+
[ARCHITECTURE_BRAINSTORM_REWORK_AGENT_KIND]: ARCHITECTURE_BRAINSTORM_REWORK_PROMPT,
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=inline-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-engine.js","sourceRoot":"","sources":["../../../src/agents/prompts/inline-engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC/E,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EACL,8BAA8B,EAC9B,qCAAqC,EACrC,8BAA8B,EAC9B,qCAAqC,GACtC,MAAM,iBAAiB,CAAA;AAExB,6FAA6F;AAC7F,EAAE;AACF,mFAAmF;AACnF,+FAA+F;AAC/F,yFAAyF;AACzF,8FAA8F;AAC9F,gGAAgG;AAChG,4FAA4F;AAC5F,0DAA0D;AAC1D,EAAE;AACF,gGAAgG;AAChG,iGAAiG;AACjG,YAAY;AACZ,EAAE;AACF,uFAAuF;AACvF,6FAA6F;AAC7F,0EAA0E;AAE1E,yEAAyE;AACzE,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,CAAA;AACnE,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,CAAA;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAA;AACzD,MAAM,CAAC,MAAM,yCAAyC,GAAG,gCAAgC,CAAA;AACzF,MAAM,CAAC,MAAM,yCAAyC,GAAG,gCAAgC,CAAA;AAEzF,MAAM,CAAC,MAAM,4BAA4B,GAAkD;IACzF,qBAAqB,EAAE,aAAa;IACpC,CAAC,8BAA8B,CAAC,EAAE,aAAa;IAC/C,CAAC,8BAA8B,CAAC,EAAE,aAAa;IAC/C,gBAAgB,EAAE,qBAAqB;IACvC,CAAC,yBAAyB,CAAC,EAAE,qBAAqB;IAClD,yBAAyB,EAAE,8BAA8B;IACzD,CAAC,yCAAyC,CAAC,EAAE,qCAAqC;IAClF,yBAAyB,EAAE,8BAA8B;IACzD,CAAC,yCAAyC,CAAC,EAAE,qCAAqC;CACnF,CAAA"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { type BespokeSystemPrompt } from './bespoke.js';
|
|
2
|
+
/**
|
|
3
|
+
* The requirements reviewer, split at the boundary a workspace override may cross
|
|
4
|
+
* ({@link BespokeSystemPrompt}). The role half is what the reviewer is FOR; the directives half
|
|
5
|
+
* carries what the engine and the flow depend on — the product/technical scope boundary all three
|
|
6
|
+
* agents must share, the no-assumed-product rule, the `autoAnswerable` flag the auto-recommend
|
|
7
|
+
* automation keys off, and the JSON-only output contract the service parses.
|
|
8
|
+
*/
|
|
9
|
+
export declare const REVIEW_PROMPT: BespokeSystemPrompt;
|
|
1
10
|
export declare const REVIEW_SYSTEM_PROMPT: string;
|
|
2
11
|
/**
|
|
3
12
|
* The "requirements rework" agent. Given a block's collected requirements plus the
|
|
@@ -9,6 +18,7 @@ export declare const REVIEW_SYSTEM_PROMPT: string;
|
|
|
9
18
|
* cross-cutting domain rules). It must produce this standard document even when the
|
|
10
19
|
* reviewer raised no findings — so every task can carry a clean, writer-ready spec.
|
|
11
20
|
*/
|
|
21
|
+
export declare const REWORK_PROMPT: BespokeSystemPrompt;
|
|
12
22
|
export declare const REWORK_SYSTEM_PROMPT: string;
|
|
13
23
|
/**
|
|
14
24
|
* The "Requirement Writer" — the SECOND companion of the requirements reviewer. Where the
|
|
@@ -22,5 +32,6 @@ export declare const REWORK_SYSTEM_PROMPT: string;
|
|
|
22
32
|
* Recommendations are suggestions for a human to accept/reject — they are NOT auto-applied and
|
|
23
33
|
* are NOT AI-reviewed. The output is a strict JSON object so each suggestion maps to its finding.
|
|
24
34
|
*/
|
|
35
|
+
export declare const WRITER_PROMPT: BespokeSystemPrompt;
|
|
25
36
|
export declare const WRITER_SYSTEM_PROMPT: string;
|
|
26
37
|
//# sourceMappingURL=requirements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/requirements.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/requirements.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,cAAc,CAAA;AA2C7E;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,mBA6B3B,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAsC,CAAA;AAEvE;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,mBAyC3B,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAsC,CAAA;AAEvE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,EAAE,mBA4C3B,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAsC,CAAA"}
|