@cat-factory/agents 0.76.0 → 0.77.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/kinds/versions.d.ts +3 -3
- package/dist/agents/kinds/versions.d.ts.map +1 -1
- package/dist/agents/kinds/versions.js +6 -3
- package/dist/agents/kinds/versions.js.map +1 -1
- package/dist/agents/prompts/requirements.d.ts.map +1 -1
- package/dist/agents/prompts/requirements.js +81 -10
- package/dist/agents/prompts/requirements.js.map +1 -1
- package/dist/agents/prompts/roles.js +1 -1
- package/dist/agents/prompts/roles.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,17 +8,17 @@ export interface VersionedPrompt {
|
|
|
8
8
|
export declare const PROMPT_VERSIONS: {
|
|
9
9
|
readonly 'requirement-review': {
|
|
10
10
|
readonly id: 'requirement-review';
|
|
11
|
-
readonly version:
|
|
11
|
+
readonly version: 4;
|
|
12
12
|
readonly text: string;
|
|
13
13
|
};
|
|
14
14
|
readonly 'requirement-rework': {
|
|
15
15
|
readonly id: 'requirement-rework';
|
|
16
|
-
readonly version:
|
|
16
|
+
readonly version: 3;
|
|
17
17
|
readonly text: string;
|
|
18
18
|
};
|
|
19
19
|
readonly 'requirement-writer': {
|
|
20
20
|
readonly id: 'requirement-writer';
|
|
21
|
-
readonly version:
|
|
21
|
+
readonly version: 3;
|
|
22
22
|
readonly text: string;
|
|
23
23
|
};
|
|
24
24
|
readonly 'clarity-review': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/versions.ts"],"names":[],"mappings":"AA6BA,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED,8DAA8D;AAC9D,eAAO,MAAM,eAAe;;
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sour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;iBAAE,IAAI;;;iBACvC,EAAE,EAAE,OAAO;iBAAE,OAAO,EAAE,CAAC;iBAAE,IAAI;;CACY,CAAA;AAEpD,0DAA0D;AAC1D,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,eAAe,CAAA;AAyBnD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,8CAA8C;AAC9C,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG,eAAe,CAE3D;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGvE"}
|
|
@@ -9,9 +9,12 @@ import { JUDGE_SYSTEM_PROMPT } from '../prompts/judge.js';
|
|
|
9
9
|
import { SPEC_WRITER_SYSTEM_PROMPT } from './spec-blueprints.js';
|
|
10
10
|
/** The currently-shipping version of each numbered prompt. */
|
|
11
11
|
export const PROMPT_VERSIONS = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'
|
|
12
|
+
// v4 / v3 / v3: all three carry the shared `PRODUCT_SCOPE_BOUNDARY` — requirements review
|
|
13
|
+
// settles the product/business layer only, and the technical layer is the Architect's and
|
|
14
|
+
// Researcher's. Bumped together because the boundary only holds if all three honour it.
|
|
15
|
+
'requirement-review': { id: 'requirement-review', version: 4, text: REVIEW_SYSTEM_PROMPT },
|
|
16
|
+
'requirement-rework': { id: 'requirement-rework', version: 3, text: REWORK_SYSTEM_PROMPT },
|
|
17
|
+
'requirement-writer': { id: 'requirement-writer', version: 3, text: WRITER_SYSTEM_PROMPT },
|
|
15
18
|
'clarity-review': { id: 'clarity-review', version: 1, text: CLARITY_REVIEW_SYSTEM_PROMPT },
|
|
16
19
|
'clarity-rework': { id: 'clarity-rework', version: 1, text: CLARITY_REWORK_SYSTEM_PROMPT },
|
|
17
20
|
'requirements-brainstorm': {
|
|
@@ -1 +1 @@
|
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GAA6C;IACjE,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACjB,CAAA;AAED;;;GAGG;AACH,MAAM,oBAAoB,GAA6B;IACrD,qBAAqB,EAAE,oBAAoB;IAC3C,OAAO,EAAE,gBAAgB;IACzB,eAAe,EAAE,eAAe;IAChC,aAAa,EAAE,aAAa;CAC7B,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAA;IACzC,IAAI,MAAM;QAAE,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAA;IAClD,MAAM,KAAK,GAAG,YAAY,CAAC,IAA0C,CAAC,CAAA;IACtE,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC3D,OAAO,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AACvD,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,aAAa,CAAC,EAAY;IACxC,OAAO,eAAe,CAAC,EAAE,CAAC,CAAA;AAC5B,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,CAAC,EAAU,EAAE,OAAgB;IAC7D,MAAM,CAAC,GAAG,OAAO,IAAI,CAAC,EAAE,IAAI,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,EAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1F,OAAO,GAAG,EAAE,KAAK,CAAC,EAAE,CAAA;AACtB,CAAC"}
|
|
@@ -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":"AAgDA,eAAO,MAAM,oBAAoB,QAsBV,CAAA;AAEvB;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,QAmCV,CAAA;AAEvB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,QA4BV,CAAA"}
|
|
@@ -3,12 +3,58 @@
|
|
|
3
3
|
// inline reviewer / rework LLM calls, and are also entered into the versioned prompt
|
|
4
4
|
// registry (see ../kinds/versions.ts) so the benchmark harness can pin them.
|
|
5
5
|
import { FINAL_ANSWER_IN_REPLY } from './shared.js';
|
|
6
|
+
/**
|
|
7
|
+
* The scope boundary EVERY prompt in this flow states, in identical words.
|
|
8
|
+
*
|
|
9
|
+
* Requirements review settles the PRODUCT / BUSINESS layer only. The technical layer is
|
|
10
|
+
* deliberately deferred to the later `architect` (design phase) and `researcher` steps, which
|
|
11
|
+
* run with the repository, the existing architecture and the in-repo `tech-spec/` in hand —
|
|
12
|
+
* context this stage does not have. A reviewer that raises technical design questions here
|
|
13
|
+
* both asks a product owner something they cannot answer and buries the questions only they
|
|
14
|
+
* can, which is what stalls the iterative loop.
|
|
15
|
+
*
|
|
16
|
+
* It is shared rather than restated per prompt because the boundary only holds if all three
|
|
17
|
+
* agents honour it: a reviewer that stays product-level, an incorporation editor that then
|
|
18
|
+
* writes a design into the document, and a Writer that recommends one, add up to no boundary
|
|
19
|
+
* at all.
|
|
20
|
+
*/
|
|
21
|
+
const PRODUCT_SCOPE_BOUNDARY = 'SCOPE — THIS STAGE SETTLES PRODUCT AND BUSINESS REQUIREMENTS ONLY. It establishes WHAT the ' +
|
|
22
|
+
'software must do for its users and the business, and the rules and outcomes that govern ' +
|
|
23
|
+
'that behaviour. It never establishes HOW the software will be built.\n' +
|
|
24
|
+
'IN SCOPE: user-visible behaviour and workflows; business rules and their edge cases; the ' +
|
|
25
|
+
'actors involved and what each is permitted to do; the meaning, validity and lifecycle of ' +
|
|
26
|
+
'business data; error, empty and conflict cases stated as what the USER experiences; success ' +
|
|
27
|
+
'criteria and how the outcome is measured; explicit in-scope and out-of-scope boundaries; ' +
|
|
28
|
+
'business-level quality expectations stated as OUTCOMES (expected volumes, how current the ' +
|
|
29
|
+
'data must be, retention periods, availability expectations, legal / compliance / privacy ' +
|
|
30
|
+
'obligations); and dependencies on other teams, products or external parties.\n' +
|
|
31
|
+
'OUT OF SCOPE — the technical layer. The later ARCHITECT and RESEARCHER steps own it and ' +
|
|
32
|
+
'refine it with the repository, the existing architecture and the technical specification in ' +
|
|
33
|
+
'hand, so leave ALL of this to them: technology, language, framework or library choice; ' +
|
|
34
|
+
'architecture, service or component decomposition, and where code should live; API shapes, ' +
|
|
35
|
+
'endpoint design, schemas, data models, storage and migrations; algorithms, caching, ' +
|
|
36
|
+
'indexing, concurrency and performance techniques; deployment, infrastructure, rollout and ' +
|
|
37
|
+
'observability mechanics; coding patterns, refactoring and test strategy.\n' +
|
|
38
|
+
'THE TEST, applied to every point before you raise or record it: could a product owner or ' +
|
|
39
|
+
'domain expert who does not read code settle it from business knowledge alone? If settling ' +
|
|
40
|
+
'it would take engineering design work, or if the answer would itself BE a technical ' +
|
|
41
|
+
'decision, it belongs to the Architect or the Researcher and not to this stage. Where a ' +
|
|
42
|
+
'technical concern genuinely matters to the product, express it as the business outcome it ' +
|
|
43
|
+
'affects ("how many records must a user be able to export in one go?"), never as the ' +
|
|
44
|
+
'technical choice it implies ("should the export be paginated or streamed?").';
|
|
6
45
|
export const REVIEW_SYSTEM_PROMPT = 'You are a meticulous product / requirements analyst reviewing the collected ' +
|
|
7
|
-
'requirements for a single unit of software work before an engineer starts on it
|
|
8
|
-
|
|
9
|
-
'
|
|
10
|
-
'
|
|
46
|
+
'requirements for a single unit of software work before an engineer starts on it.\n' +
|
|
47
|
+
PRODUCT_SCOPE_BOUNDARY +
|
|
48
|
+
'\n' +
|
|
49
|
+
'Within that scope, surface everything that would block confident implementation: missing ' +
|
|
50
|
+
'information (gaps), ambiguities that need clarification, unstated assumptions, risks, and ' +
|
|
51
|
+
'open questions. Be specific, concrete and actionable, and phrase each item so a product ' +
|
|
11
52
|
'owner can answer it directly. Do NOT invent answers or requirements. ' +
|
|
53
|
+
'A technical finding is not a bonus and does not become acceptable by carrying a low ' +
|
|
54
|
+
'severity: drop it entirely rather than raising it. Raising NOTHING is a valid and expected ' +
|
|
55
|
+
'result when the product intent is already clear, and is the normal result for purely ' +
|
|
56
|
+
'technical work (a refactor, dependency upgrade or other internal change) that alters no ' +
|
|
57
|
+
'user-visible behaviour and no business rule. ' +
|
|
12
58
|
'For EVERY finding, also judge whether it can be answered without the product owner: set ' +
|
|
13
59
|
'"autoAnswerable" to true ONLY when a confident, defensible answer follows from universal ' +
|
|
14
60
|
'engineering / product best practice OR is already determinable from the context provided ' +
|
|
@@ -34,16 +80,30 @@ export const REWORK_SYSTEM_PROMPT = 'You are a requirements editor. You are give
|
|
|
34
80
|
'that folds every answer in, resolves the ambiguities, and states the ' +
|
|
35
81
|
'previously-missing details explicitly. Preserve the original intent; do not invent ' +
|
|
36
82
|
'facts beyond what the answers provide. Even when there are no questions, restate ' +
|
|
37
|
-
'the requirements cleanly in the SAME standard structure
|
|
38
|
-
|
|
83
|
+
'the requirements cleanly in the SAME standard structure.\n' +
|
|
84
|
+
PRODUCT_SCOPE_BOUNDARY +
|
|
85
|
+
'\n' +
|
|
86
|
+
'So the document you produce is a PRODUCT specification, never a design document. Two rules ' +
|
|
87
|
+
'follow. First, never introduce technical design of your own — no technology or library ' +
|
|
88
|
+
'choice, no architecture, no API, schema or data-model shape, no algorithm, no ' +
|
|
89
|
+
'infrastructure — even where it seems obvious and even to make a requirement sound more ' +
|
|
90
|
+
'concrete. Second, when an answer a human gave contains a technical decision, record only ' +
|
|
91
|
+
'the CONSTRAINT it places on the product ("the system SHALL reuse the existing billing ' +
|
|
92
|
+
'provider") and drop the design reasoning around it; the Architect owns the rest and will ' +
|
|
93
|
+
'read this document as its input.\n' +
|
|
94
|
+
'Use EXACTLY these Markdown sections, in this order, omitting a section only when it has no ' +
|
|
95
|
+
'content:\n' +
|
|
39
96
|
'# <Title> — Requirements\n' +
|
|
40
97
|
'## Overview — one paragraph of intent and scope.\n' +
|
|
41
98
|
'## Functional Requirements — a bullet per requirement phrased as "The system SHALL ' +
|
|
42
|
-
'…"
|
|
99
|
+
'…" in terms of externally observable behaviour, never as an instruction about how to ' +
|
|
100
|
+
'implement it, each tagged with a MoSCoW priority (must/should/could); under each, an ' +
|
|
43
101
|
'"Acceptance:" sub-list of Given/When/Then criteria.\n' +
|
|
44
|
-
'## Non-Functional Requirements — quality attributes
|
|
102
|
+
'## Non-Functional Requirements — quality attributes stated as measurable business ' +
|
|
103
|
+
'outcomes (volumes, response times as a user experiences them, availability, retention, ' +
|
|
104
|
+
'compliance) rather than the mechanism that would achieve them, same "The system SHALL …" ' +
|
|
45
105
|
'phrasing with a priority and a short rationale.\n' +
|
|
46
|
-
'## Domain Rules / Constraints — cross-cutting invariants, each with a brief why.\n' +
|
|
106
|
+
'## Domain Rules / Constraints — cross-cutting business invariants, each with a brief why.\n' +
|
|
47
107
|
'## Assumptions — assumptions the requirements rest on.\n' +
|
|
48
108
|
'## Out of Scope — what this work explicitly does not cover.\n' +
|
|
49
109
|
'Respond with ONLY the revised requirements in Markdown — no preamble, no ' +
|
|
@@ -63,7 +123,18 @@ export const REWORK_SYSTEM_PROMPT = 'You are a requirements editor. You are give
|
|
|
63
123
|
*/
|
|
64
124
|
export const WRITER_SYSTEM_PROMPT = 'You are a senior engineer acting as a Requirement Writer: for each requirements-review ' +
|
|
65
125
|
'finding you are given, recommend a concrete, defensible answer the product owner could ' +
|
|
66
|
-
'adopt
|
|
126
|
+
'adopt.\n' +
|
|
127
|
+
PRODUCT_SCOPE_BOUNDARY +
|
|
128
|
+
'\n' +
|
|
129
|
+
'So every recommendation is a PRODUCT decision the owner can accept or reject on business ' +
|
|
130
|
+
'grounds — a behaviour, a rule, a limit, a boundary — never a technical design. The ' +
|
|
131
|
+
'technical material you are given (the `tech-spec/` excerpts, the standards) is there to ' +
|
|
132
|
+
'keep your recommendation FEASIBLE and consistent with what already exists, not to license ' +
|
|
133
|
+
'you to design: read a constraint out of it, do not write one into your answer. If a ' +
|
|
134
|
+
'finding turns out to be a technical design question that ' +
|
|
135
|
+
'slipped past the reviewer, do not answer it as one — recommend the product-level decision ' +
|
|
136
|
+
'it actually depends on, or say plainly that it should be left to the Architect step.\n' +
|
|
137
|
+
'Ground every recommendation in reality, in THIS order of precedence: (1) the ' +
|
|
67
138
|
"project's best-practice standards provided to you — if a standard already settles the " +
|
|
68
139
|
'finding, recommend exactly that and set "fromStandard" to its id; (2) the in-repo `spec/` ' +
|
|
69
140
|
'(business requirements) and `tech-spec/` (architecture, tech-stack, cross-cutting patterns ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.js","sourceRoot":"","sources":["../../../src/agents/prompts/requirements.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,mFAAmF;AACnF,qFAAqF;AACrF,6EAA6E;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAC/B,8EAA8E;IAC9E,
|
|
1
|
+
{"version":3,"file":"requirements.js","sourceRoot":"","sources":["../../../src/agents/prompts/requirements.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,mFAAmF;AACnF,qFAAqF;AACrF,6EAA6E;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,MAAM,sBAAsB,GAC1B,6FAA6F;IAC7F,0FAA0F;IAC1F,wEAAwE;IACxE,2FAA2F;IAC3F,2FAA2F;IAC3F,8FAA8F;IAC9F,2FAA2F;IAC3F,4FAA4F;IAC5F,2FAA2F;IAC3F,gFAAgF;IAChF,0FAA0F;IAC1F,8FAA8F;IAC9F,yFAAyF;IACzF,4FAA4F;IAC5F,sFAAsF;IAC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,qFAAqF;IACrF,0FAA0F;IAC1F,4FAA4F;IAC5F,sFAAsF;IACtF,2DAA2D;IAC3D,4FAA4F;IAC5F,wFAAwF;IACxF,+EAA+E;IAC/E,wFAAwF;IACxF,4FAA4F;IAC5F,6FAA6F;IAC7F,2FAA2F;IAC3F,wFAAwF;IACxF,2FAA2F;IAC3F,+FAA+F;IAC/F,iGAAiG;IACjG,+FAA+F;IAC/F,qCAAqC;IACrC,0FAA0F;IAC1F,gGAAgG;IAChG,oDAAoD;IACpD,qBAAqB,CAAA"}
|
|
@@ -29,7 +29,7 @@ const ROLES = {
|
|
|
29
29
|
// and surfaces what would block confident implementation. Its findings are presented
|
|
30
30
|
// to a human at an approval gate (to reject items or supply missing information)
|
|
31
31
|
// before the architect proceeds, so it must read as a clear, editable list.
|
|
32
|
-
'requirements-review': 'You are a meticulous product / requirements analyst reviewing the collected requirements for a single building block before an engineer designs or builds it.
|
|
32
|
+
'requirements-review': 'You are a meticulous product / requirements analyst reviewing the collected requirements for a single building block before an engineer designs or builds it. This stage settles PRODUCT AND BUSINESS requirements ONLY — what the software must do for its users and the business, and the rules and outcomes that govern that behaviour. It never settles HOW the software will be built: technology and library choice, architecture and component decomposition, API, schema and data-model shape, algorithms and performance techniques, infrastructure, and coding or test approach all belong to the later ARCHITECT and RESEARCHER steps, which refine them with the repository and the technical specification in hand. Within the product scope, surface everything that would block confident implementation: missing information (gaps), ambiguities that need clarification, unstated assumptions, risks, and open questions. Be specific, concrete and actionable, and phrase each item so a product owner can answer it directly. Do NOT invent answers or requirements. Before raising a point, apply the test: could a product owner who does not read code answer it from business knowledge alone? If not, drop it entirely rather than raising it as a minor note. Group your findings under clear headings and present a concise, readable markdown list — a human will review and edit it before the architect proceeds. Raising nothing is a valid result when the product intent is already clear, and is the normal result for purely technical work.',
|
|
33
33
|
// The two brainstorm (structured-dialogue) gate agents. These are driven inline by
|
|
34
34
|
// `BrainstormService` with their own system prompts (see prompts/brainstorm.ts); the role
|
|
35
35
|
// lines here are only a fallback for any generic `systemPromptFor` lookup.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../../src/agents/prompts/roles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAA;AAEzD,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,kFAAkF;AAElF,MAAM,KAAK,GAAuC;IAChD,UAAU,EACR,yJAAyJ;IAC3J,kFAAkF;IAClF,mFAAmF;IACnF,8EAA8E;IAC9E,uEAAuE;IACvE,QAAQ,EACN,wfAAwf;IAC1f,0EAA0E;IAC1E,iEAAiE;IACjE,qFAAqF;IACrF,gEAAgE;IAChE,UAAU,EACR,iHAAiH;IACnH,UAAU,EACR,yIAAyI;IAC3I,oFAAoF;IACpF,qFAAqF;IACrF,iFAAiF;IACjF,4EAA4E;IAC5E,qBAAqB,EACnB,
|
|
1
|
+
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../../src/agents/prompts/roles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAA;AAEzD,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,kFAAkF;AAElF,MAAM,KAAK,GAAuC;IAChD,UAAU,EACR,yJAAyJ;IAC3J,kFAAkF;IAClF,mFAAmF;IACnF,8EAA8E;IAC9E,uEAAuE;IACvE,QAAQ,EACN,wfAAwf;IAC1f,0EAA0E;IAC1E,iEAAiE;IACjE,qFAAqF;IACrF,gEAAgE;IAChE,UAAU,EACR,iHAAiH;IACnH,UAAU,EACR,yIAAyI;IAC3I,oFAAo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