@wildo-ai/dev-companion 1.1.2 → 1.1.3
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/esm/.tsbuildinfo +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +4 -12
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +0 -16
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +0 -17
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +0 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +2 -27
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +1 -8
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +9 -4
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +21 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +1 -39
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +1 -3
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +23 -36
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js +0 -5
- package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts +3 -82
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +4 -113
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +3 -82
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +54 -138
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +1 -27
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +5 -38
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +0 -25
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +0 -37
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +2 -7
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +30 -122
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js +0 -2
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +1 -3
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +1 -38
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
- package/package.json +17 -17
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +0 -36
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +0 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +0 -75
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildo-ai/dev-companion",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Wildo.ai Dev Companion — local development management and introspection service. Canonical source home; applications receive only the built dist below their .wildo-saas/wildo-dev-companion drop.",
|
|
5
5
|
"author": "Wildo AI",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -32,22 +32,22 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@react-email/components": "^1.0.8",
|
|
34
34
|
"@react-email/render": "^2.0.4",
|
|
35
|
-
"@wildo-ai/application-creation-runtime": "1.1.
|
|
36
|
-
"@wildo-ai/external-connectors-models": "1.1.
|
|
37
|
-
"@wildo-ai/framework-knowledge": "1.1.
|
|
38
|
-
"@wildo-ai/platform-config-lib": "1.1.
|
|
39
|
-
"@wildo-ai/platform-core-backend": "1.1.
|
|
40
|
-
"@wildo-ai/platform-core-shared": "1.1.
|
|
41
|
-
"@wildo-ai/platform-shared-lib": "1.1.
|
|
42
|
-
"@wildo-ai/presets-components-models": "1.1.
|
|
43
|
-
"@wildo-ai/saas-backend-lib": "1.1.
|
|
44
|
-
"@wildo-ai/saas-frontend-lib": "1.1.
|
|
45
|
-
"@wildo-ai/saas-models": "1.1.
|
|
46
|
-
"@wildo-ai/saas-specifications": "1.1.
|
|
47
|
-
"@wildo-ai/saas-technical-doc": "1.1.
|
|
48
|
-
"@wildo-ai/saas-website": "1.1.
|
|
49
|
-
"@wildo-ai/wildo-module-client": "1.1.
|
|
50
|
-
"@wildo-ai/zod-decorators": "1.1.
|
|
35
|
+
"@wildo-ai/application-creation-runtime": "1.1.3",
|
|
36
|
+
"@wildo-ai/external-connectors-models": "1.1.3",
|
|
37
|
+
"@wildo-ai/framework-knowledge": "1.1.3",
|
|
38
|
+
"@wildo-ai/platform-config-lib": "1.1.3",
|
|
39
|
+
"@wildo-ai/platform-core-backend": "1.1.3",
|
|
40
|
+
"@wildo-ai/platform-core-shared": "1.1.3",
|
|
41
|
+
"@wildo-ai/platform-shared-lib": "1.1.3",
|
|
42
|
+
"@wildo-ai/presets-components-models": "1.1.3",
|
|
43
|
+
"@wildo-ai/saas-backend-lib": "1.1.3",
|
|
44
|
+
"@wildo-ai/saas-frontend-lib": "1.1.3",
|
|
45
|
+
"@wildo-ai/saas-models": "1.1.3",
|
|
46
|
+
"@wildo-ai/saas-specifications": "1.1.3",
|
|
47
|
+
"@wildo-ai/saas-technical-doc": "1.1.3",
|
|
48
|
+
"@wildo-ai/saas-website": "1.1.3",
|
|
49
|
+
"@wildo-ai/wildo-module-client": "1.1.3",
|
|
50
|
+
"@wildo-ai/zod-decorators": "1.1.3",
|
|
51
51
|
"big.js": "^6.2.2",
|
|
52
52
|
"cors": "^2.8.5",
|
|
53
53
|
"date-fns": "^4.1.0",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Brief-adequacy judge — the GATE half of #254's rescoped shape.
|
|
3
|
-
*
|
|
4
|
-
* Reads ONE composed generation brief plus the closed list of context sources the playbook did NOT
|
|
5
|
-
* declare, and answers a single structured question: is this brief sufficient to produce the
|
|
6
|
-
* declared family artifact, and if not, WHICH undeclared sources would repair it? The runtime then
|
|
7
|
-
* performs ONE monotonic recompose (add-only) and generates. The judge never authors content and
|
|
8
|
-
* never removes context — it SHAPES the brief and carries no authority, per the bounded
|
|
9
|
-
* auxiliary-LLM ladder (`.claude/context/app-creation-dynamic-context.md`, design 2).
|
|
10
|
-
*
|
|
11
|
-
* Tool-free by the lane invariant: the brief is the entire input surface, so provenance stays
|
|
12
|
-
* complete by construction. Calibrated toward `sufficient` — a false `insufficient` costs a
|
|
13
|
-
* recompose; a chatty gate that always repairs is a standing rung nobody decided to build.
|
|
14
|
-
*/
|
|
15
|
-
import { z } from 'zod';
|
|
16
|
-
import type { FlowsActors_Agent } from '@wildo-ai/saas-models';
|
|
17
|
-
import { MetaWorkflow_ContextSource } from '@wildo-ai/saas-specifications/application-creation';
|
|
18
|
-
/** One stable identity the generation path resolves by ref. */
|
|
19
|
-
export declare const BRIEF_ADEQUACY_JUDGE_AGENT_REF: "brief-adequacy-judge.agent";
|
|
20
|
-
/**
|
|
21
|
-
* The strict verdict the judge must emit. `missingSources` is constrained to the closed
|
|
22
|
-
* {@link MetaWorkflow_ContextSource} vocabulary, so the repair arm can only ever propose sources
|
|
23
|
-
* the runtime knows how to compose — an invented source is a schema violation, not a silent no-op.
|
|
24
|
-
*/
|
|
25
|
-
export declare const BriefAdequacyVerdictOutputSchema: z.ZodObject<{
|
|
26
|
-
verdict: z.ZodEnum<{
|
|
27
|
-
sufficient: "sufficient";
|
|
28
|
-
insufficient: "insufficient";
|
|
29
|
-
}>;
|
|
30
|
-
missingSources: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof MetaWorkflow_ContextSource>>>;
|
|
31
|
-
rationale: z.ZodString;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
export declare const briefAdequacyJudgeAgent: FlowsActors_Agent;
|
|
34
|
-
/** Root spreads this collection into the one startup Agent registry. */
|
|
35
|
-
export declare const briefAdequacyAgents: readonly FlowsActors_Agent[];
|
|
36
|
-
//# sourceMappingURL=brief-adequacy.actors-system.definitions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief-adequacy.actors-system.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/brief-adequacy.actors-system.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAgB/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG,+DAA+D;AAC/D,eAAO,MAAM,8BAA8B,EAAG,4BAAqC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;;;iBAI3C,CAAC;AAEH,eAAO,MAAM,uBAAuB,EAAE,iBA2CrC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAA8B,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Brief-adequacy judge — the GATE half of #254's rescoped shape.
|
|
3
|
-
*
|
|
4
|
-
* Reads ONE composed generation brief plus the closed list of context sources the playbook did NOT
|
|
5
|
-
* declare, and answers a single structured question: is this brief sufficient to produce the
|
|
6
|
-
* declared family artifact, and if not, WHICH undeclared sources would repair it? The runtime then
|
|
7
|
-
* performs ONE monotonic recompose (add-only) and generates. The judge never authors content and
|
|
8
|
-
* never removes context — it SHAPES the brief and carries no authority, per the bounded
|
|
9
|
-
* auxiliary-LLM ladder (`.claude/context/app-creation-dynamic-context.md`, design 2).
|
|
10
|
-
*
|
|
11
|
-
* Tool-free by the lane invariant: the brief is the entire input surface, so provenance stays
|
|
12
|
-
* complete by construction. Calibrated toward `sufficient` — a false `insufficient` costs a
|
|
13
|
-
* recompose; a chatty gate that always repairs is a standing rung nobody decided to build.
|
|
14
|
-
*/
|
|
15
|
-
import { z } from 'zod';
|
|
16
|
-
import { FlowsActors_Agent_Skill_Type, FlowsActors_Agent_Status, ResourceOperationRiskLevel, ResourcePrimaryScope, StructuredGenerationExecutionMode, } from '@wildo-ai/saas-models';
|
|
17
|
-
import { LLM_Model, LLMProvider_GenerateStructuredInputSchema, LLMProvider_GenerateStructuredOutputSchema, LLMProvider_OperationContext_BaseSchema, LLMProvider_OperationKey, } from '@wildo-ai/external-connectors-models';
|
|
18
|
-
import { MetaWorkflow_ContextSource } from '@wildo-ai/saas-specifications/application-creation';
|
|
19
|
-
/** One stable identity the generation path resolves by ref. */
|
|
20
|
-
export const BRIEF_ADEQUACY_JUDGE_AGENT_REF = 'brief-adequacy-judge.agent';
|
|
21
|
-
/**
|
|
22
|
-
* The strict verdict the judge must emit. `missingSources` is constrained to the closed
|
|
23
|
-
* {@link MetaWorkflow_ContextSource} vocabulary, so the repair arm can only ever propose sources
|
|
24
|
-
* the runtime knows how to compose — an invented source is a schema violation, not a silent no-op.
|
|
25
|
-
*/
|
|
26
|
-
export const BriefAdequacyVerdictOutputSchema = z.object({
|
|
27
|
-
verdict: z.enum(['sufficient', 'insufficient']),
|
|
28
|
-
missingSources: z.array(z.enum(MetaWorkflow_ContextSource)).default([]),
|
|
29
|
-
rationale: z.string(),
|
|
30
|
-
});
|
|
31
|
-
export const briefAdequacyJudgeAgent = {
|
|
32
|
-
ref: BRIEF_ADEQUACY_JUDGE_AGENT_REF,
|
|
33
|
-
displayName: 'Brief Adequacy Judge Agent',
|
|
34
|
-
status: FlowsActors_Agent_Status.ACTIVE,
|
|
35
|
-
config: {
|
|
36
|
-
providerRef: 'anthropic',
|
|
37
|
-
model: LLM_Model.CLAUDE_FABLE_5,
|
|
38
|
-
operationKey: LLMProvider_OperationKey.GENERATE_STRUCTURED,
|
|
39
|
-
structuredGenerationExecutionMode: StructuredGenerationExecutionMode.SINGLE_CALL_REQUIRED,
|
|
40
|
-
// SINGLE_CALL_REQUIRED refuses without this bound, fail-closed — the turn classifier shipped
|
|
41
|
-
// without it and every classification died in 12ms (2026-09-04). Verdict + enum array +
|
|
42
|
-
// rationale is a handful of leaves; 8 is honest headroom.
|
|
43
|
-
maximumStructuredOutputLeafFields: 8,
|
|
44
|
-
accessControl: [{ primaryScope: ResourcePrimaryScope.APPLICATION, requiresApproval: false }],
|
|
45
|
-
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
46
|
-
},
|
|
47
|
-
operationDefinition: {
|
|
48
|
-
operationKey: LLMProvider_OperationKey.GENERATE_STRUCTURED,
|
|
49
|
-
providerRef: 'anthropic',
|
|
50
|
-
inputSchema: LLMProvider_GenerateStructuredInputSchema,
|
|
51
|
-
outputSchema: LLMProvider_GenerateStructuredOutputSchema,
|
|
52
|
-
operationContextSchema: LLMProvider_OperationContext_BaseSchema,
|
|
53
|
-
},
|
|
54
|
-
promptSpec: {
|
|
55
|
-
role: 'You are the brief-adequacy gate for one structured generation. Judge whether the brief below is '
|
|
56
|
-
+ 'sufficient to produce the declared artifact; if not, name which of the LISTED undeclared context '
|
|
57
|
-
+ 'sources would repair it.',
|
|
58
|
-
persona: 'You are a gate, not an author. You never write artifact content, never restate the method, and '
|
|
59
|
-
+ 'never propose removing or weakening anything the brief already carries.',
|
|
60
|
-
skillType: FlowsActors_Agent_Skill_Type.GENERATION,
|
|
61
|
-
instructions: [
|
|
62
|
-
'Answer `insufficient` ONLY when the method demonstrably needs information the brief does not carry '
|
|
63
|
-
+ 'AND one of the listed undeclared sources would supply it. When in doubt, answer `sufficient` — '
|
|
64
|
-
+ 'a repair costs a full recompose, and a gate that always repairs is worse than no gate.',
|
|
65
|
-
'Propose ONLY sources from the provided undeclared list. Sources already in the brief are never '
|
|
66
|
-
+ 'yours to mention; removing context is never an option.',
|
|
67
|
-
'Your rationale is one short paragraph naming the specific method obligation the missing source '
|
|
68
|
-
+ 'serves. No summaries of the brief.',
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
createdAt: new Date().toISOString(),
|
|
72
|
-
};
|
|
73
|
-
/** Root spreads this collection into the one startup Agent registry. */
|
|
74
|
-
export const briefAdequacyAgents = [briefAdequacyJudgeAgent];
|
|
75
|
-
//# sourceMappingURL=brief-adequacy.actors-system.definitions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief-adequacy.actors-system.definitions.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/brief-adequacy.actors-system.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,SAAS,EACT,yCAAyC,EACzC,0CAA0C,EAC1C,uCAAuC,EACvC,wBAAwB,GAEzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG,+DAA+D;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,4BAAqC,CAAC;AAEpF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC/C,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,GAAG,EAAE,8BAA8B;IACnC,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAE,wBAAwB,CAAC,MAAM;IACvC,MAAM,EAAE;QACN,WAAW,EAAE,WAAW;QACxB,KAAK,EAAE,SAAS,CAAC,cAAc;QAC/B,YAAY,EAAE,wBAAwB,CAAC,mBAAmB;QAC1D,iCAAiC,EAAE,iCAAiC,CAAC,oBAAoB;QACzF,6FAA6F;QAC7F,wFAAwF;QACxF,0DAA0D;QAC1D,iCAAiC,EAAE,CAAC;QACpC,aAAa,EAAE,CAAC,EAAE,YAAY,EAAE,oBAAoB,CAAC,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC;QAC5F,SAAS,EAAE,0BAA0B,CAAC,GAAG;KAC1C;IACD,mBAAmB,EAAE;QACnB,YAAY,EAAE,wBAAwB,CAAC,mBAAmB;QAC1D,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,yCAAyC;QACtD,YAAY,EAAE,0CAA0C;QACxD,sBAAsB,EAAE,uCAAuC;KAClB;IAC/C,UAAU,EAAE;QACV,IAAI,EACF,kGAAkG;cAChG,mGAAmG;cACnG,0BAA0B;QAC9B,OAAO,EACL,iGAAiG;cAC/F,yEAAyE;QAC7E,SAAS,EAAE,4BAA4B,CAAC,UAAU;QAClD,YAAY,EAAE;YACZ,qGAAqG;kBACjG,iGAAiG;kBACjG,wFAAwF;YAC5F,iGAAiG;kBAC7F,wDAAwD;YAC5D,iGAAiG;kBAC7F,oCAAoC;SACzC;KACF;IACD,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;CACpC,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAiC,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["/**\n * Brief-adequacy judge — the GATE half of #254's rescoped shape.\n *\n * Reads ONE composed generation brief plus the closed list of context sources the playbook did NOT\n * declare, and answers a single structured question: is this brief sufficient to produce the\n * declared family artifact, and if not, WHICH undeclared sources would repair it? The runtime then\n * performs ONE monotonic recompose (add-only) and generates. The judge never authors content and\n * never removes context — it SHAPES the brief and carries no authority, per the bounded\n * auxiliary-LLM ladder (`.claude/context/app-creation-dynamic-context.md`, design 2).\n *\n * Tool-free by the lane invariant: the brief is the entire input surface, so provenance stays\n * complete by construction. Calibrated toward `sufficient` — a false `insufficient` costs a\n * recompose; a chatty gate that always repairs is a standing rung nobody decided to build.\n */\n\nimport { z } from 'zod';\nimport type { FlowsActors_Agent } from '@wildo-ai/saas-models';\nimport {\n FlowsActors_Agent_Skill_Type,\n FlowsActors_Agent_Status,\n ResourceOperationRiskLevel,\n ResourcePrimaryScope,\n StructuredGenerationExecutionMode,\n} from '@wildo-ai/saas-models';\nimport {\n LLM_Model,\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n LLMProvider_OperationContext_BaseSchema,\n LLMProvider_OperationKey,\n type LLMProvider_OperationDefinitionBase,\n} from '@wildo-ai/external-connectors-models';\nimport { MetaWorkflow_ContextSource } from '@wildo-ai/saas-specifications/application-creation';\n\n/** One stable identity the generation path resolves by ref. */\nexport const BRIEF_ADEQUACY_JUDGE_AGENT_REF = 'brief-adequacy-judge.agent' as const;\n\n/**\n * The strict verdict the judge must emit. `missingSources` is constrained to the closed\n * {@link MetaWorkflow_ContextSource} vocabulary, so the repair arm can only ever propose sources\n * the runtime knows how to compose — an invented source is a schema violation, not a silent no-op.\n */\nexport const BriefAdequacyVerdictOutputSchema = z.object({\n verdict: z.enum(['sufficient', 'insufficient']),\n missingSources: z.array(z.enum(MetaWorkflow_ContextSource)).default([]),\n rationale: z.string(),\n});\n\nexport const briefAdequacyJudgeAgent: FlowsActors_Agent = {\n ref: BRIEF_ADEQUACY_JUDGE_AGENT_REF,\n displayName: 'Brief Adequacy Judge Agent',\n status: FlowsActors_Agent_Status.ACTIVE,\n config: {\n providerRef: 'anthropic',\n model: LLM_Model.CLAUDE_FABLE_5,\n operationKey: LLMProvider_OperationKey.GENERATE_STRUCTURED,\n structuredGenerationExecutionMode: StructuredGenerationExecutionMode.SINGLE_CALL_REQUIRED,\n // SINGLE_CALL_REQUIRED refuses without this bound, fail-closed — the turn classifier shipped\n // without it and every classification died in 12ms (2026-09-04). Verdict + enum array +\n // rationale is a handful of leaves; 8 is honest headroom.\n maximumStructuredOutputLeafFields: 8,\n accessControl: [{ primaryScope: ResourcePrimaryScope.APPLICATION, requiresApproval: false }],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n operationDefinition: {\n operationKey: LLMProvider_OperationKey.GENERATE_STRUCTURED,\n providerRef: 'anthropic',\n inputSchema: LLMProvider_GenerateStructuredInputSchema,\n outputSchema: LLMProvider_GenerateStructuredOutputSchema,\n operationContextSchema: LLMProvider_OperationContext_BaseSchema,\n } satisfies LLMProvider_OperationDefinitionBase,\n promptSpec: {\n role:\n 'You are the brief-adequacy gate for one structured generation. Judge whether the brief below is '\n + 'sufficient to produce the declared artifact; if not, name which of the LISTED undeclared context '\n + 'sources would repair it.',\n persona:\n 'You are a gate, not an author. You never write artifact content, never restate the method, and '\n + 'never propose removing or weakening anything the brief already carries.',\n skillType: FlowsActors_Agent_Skill_Type.GENERATION,\n instructions: [\n 'Answer `insufficient` ONLY when the method demonstrably needs information the brief does not carry '\n + 'AND one of the listed undeclared sources would supply it. When in doubt, answer `sufficient` — '\n + 'a repair costs a full recompose, and a gate that always repairs is worse than no gate.',\n 'Propose ONLY sources from the provided undeclared list. Sources already in the brief are never '\n + 'yours to mention; removing context is never an option.',\n 'Your rationale is one short paragraph naming the specific method obligation the missing source '\n + 'serves. No summaries of the brief.',\n ],\n },\n createdAt: new Date().toISOString(),\n};\n\n/** Root spreads this collection into the one startup Agent registry. */\nexport const briefAdequacyAgents: readonly FlowsActors_Agent[] = [briefAdequacyJudgeAgent];\n"]}
|