@cat-factory/agents 0.6.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/LICENSE +21 -0
- package/dist/agents/AiAgentExecutor.d.ts +72 -0
- package/dist/agents/AiAgentExecutor.d.ts.map +1 -0
- package/dist/agents/AiAgentExecutor.js +125 -0
- package/dist/agents/AiAgentExecutor.js.map +1 -0
- package/dist/agents/acceptance-prompts.d.ts +29 -0
- package/dist/agents/acceptance-prompts.d.ts.map +1 -0
- package/dist/agents/acceptance-prompts.js +112 -0
- package/dist/agents/acceptance-prompts.js.map +1 -0
- package/dist/agents/agent-catalog.d.ts +6 -0
- package/dist/agents/agent-catalog.d.ts.map +1 -0
- package/dist/agents/agent-catalog.js +197 -0
- package/dist/agents/agent-catalog.js.map +1 -0
- package/dist/agents/agent-configs.d.ts +17 -0
- package/dist/agents/agent-configs.d.ts.map +1 -0
- package/dist/agents/agent-configs.js +66 -0
- package/dist/agents/agent-configs.js.map +1 -0
- package/dist/agents/agent-routing.d.ts +57 -0
- package/dist/agents/agent-routing.d.ts.map +1 -0
- package/dist/agents/agent-routing.js +41 -0
- package/dist/agents/agent-routing.js.map +1 -0
- package/dist/agents/business-logic-prompts.d.ts +28 -0
- package/dist/agents/business-logic-prompts.d.ts.map +1 -0
- package/dist/agents/business-logic-prompts.js +96 -0
- package/dist/agents/business-logic-prompts.js.map +1 -0
- package/dist/agents/catalog.d.ts +6 -0
- package/dist/agents/catalog.d.ts.map +1 -0
- package/dist/agents/catalog.js +168 -0
- package/dist/agents/catalog.js.map +1 -0
- package/dist/agents/ci-gate.d.ts +2 -0
- package/dist/agents/ci-gate.d.ts.map +1 -0
- package/dist/agents/ci-gate.js +33 -0
- package/dist/agents/ci-gate.js.map +1 -0
- package/dist/agents/companion-prompts.d.ts +4 -0
- package/dist/agents/companion-prompts.d.ts.map +1 -0
- package/dist/agents/companion-prompts.js +27 -0
- package/dist/agents/companion-prompts.js.map +1 -0
- package/dist/agents/companions.d.ts +20 -0
- package/dist/agents/companions.d.ts.map +1 -0
- package/dist/agents/companions.js +38 -0
- package/dist/agents/companions.js.map +1 -0
- package/dist/agents/kinds/companions.d.ts +20 -0
- package/dist/agents/kinds/companions.d.ts.map +1 -0
- package/dist/agents/kinds/companions.js +39 -0
- package/dist/agents/kinds/companions.js.map +1 -0
- package/dist/agents/kinds/configs.d.ts +17 -0
- package/dist/agents/kinds/configs.d.ts.map +1 -0
- package/dist/agents/kinds/configs.js +66 -0
- package/dist/agents/kinds/configs.js.map +1 -0
- package/dist/agents/kinds/read-only.d.ts +13 -0
- package/dist/agents/kinds/read-only.d.ts.map +1 -0
- package/dist/agents/kinds/read-only.js +32 -0
- package/dist/agents/kinds/read-only.js.map +1 -0
- package/dist/agents/kinds/registry.d.ts +70 -0
- package/dist/agents/kinds/registry.d.ts.map +1 -0
- package/dist/agents/kinds/registry.js +51 -0
- package/dist/agents/kinds/registry.js.map +1 -0
- package/dist/agents/kinds/traits.d.ts +60 -0
- package/dist/agents/kinds/traits.d.ts.map +1 -0
- package/dist/agents/kinds/traits.js +123 -0
- package/dist/agents/kinds/traits.js.map +1 -0
- package/dist/agents/kinds/versions.d.ts +46 -0
- package/dist/agents/kinds/versions.d.ts.map +1 -0
- package/dist/agents/kinds/versions.js +22 -0
- package/dist/agents/kinds/versions.js.map +1 -0
- package/dist/agents/mock-prompts.d.ts +12 -0
- package/dist/agents/mock-prompts.d.ts.map +1 -0
- package/dist/agents/mock-prompts.js +61 -0
- package/dist/agents/mock-prompts.js.map +1 -0
- package/dist/agents/prompt-fragments.d.ts +17 -0
- package/dist/agents/prompt-fragments.d.ts.map +1 -0
- package/dist/agents/prompt-fragments.js +33 -0
- package/dist/agents/prompt-fragments.js.map +1 -0
- package/dist/agents/prompt-shared.d.ts +7 -0
- package/dist/agents/prompt-shared.d.ts.map +1 -0
- package/dist/agents/prompt-shared.js +10 -0
- package/dist/agents/prompt-shared.js.map +1 -0
- package/dist/agents/prompt-versions.d.ts +48 -0
- package/dist/agents/prompt-versions.d.ts.map +1 -0
- package/dist/agents/prompt-versions.js +55 -0
- package/dist/agents/prompt-versions.js.map +1 -0
- package/dist/agents/prompts/acceptance.d.ts +29 -0
- package/dist/agents/prompts/acceptance.d.ts.map +1 -0
- package/dist/agents/prompts/acceptance.js +112 -0
- package/dist/agents/prompts/acceptance.js.map +1 -0
- package/dist/agents/prompts/business-logic.d.ts +28 -0
- package/dist/agents/prompts/business-logic.d.ts.map +1 -0
- package/dist/agents/prompts/business-logic.js +98 -0
- package/dist/agents/prompts/business-logic.js.map +1 -0
- package/dist/agents/prompts/clarity.d.ts +10 -0
- package/dist/agents/prompts/clarity.d.ts.map +1 -0
- package/dist/agents/prompts/clarity.js +40 -0
- package/dist/agents/prompts/clarity.js.map +1 -0
- package/dist/agents/prompts/companion.d.ts +4 -0
- package/dist/agents/prompts/companion.d.ts.map +1 -0
- package/dist/agents/prompts/companion.js +61 -0
- package/dist/agents/prompts/companion.js.map +1 -0
- package/dist/agents/prompts/delivery-contract.d.ts +2 -0
- package/dist/agents/prompts/delivery-contract.d.ts.map +1 -0
- package/dist/agents/prompts/delivery-contract.js +33 -0
- package/dist/agents/prompts/delivery-contract.js.map +1 -0
- package/dist/agents/prompts/mock.d.ts +12 -0
- package/dist/agents/prompts/mock.d.ts.map +1 -0
- package/dist/agents/prompts/mock.js +61 -0
- package/dist/agents/prompts/mock.js.map +1 -0
- package/dist/agents/prompts/requirements.d.ts +13 -0
- package/dist/agents/prompts/requirements.d.ts.map +1 -0
- package/dist/agents/prompts/requirements.js +45 -0
- package/dist/agents/prompts/requirements.js.map +1 -0
- package/dist/agents/prompts/roles.d.ts +16 -0
- package/dist/agents/prompts/roles.d.ts.map +1 -0
- package/dist/agents/prompts/roles.js +74 -0
- package/dist/agents/prompts/roles.js.map +1 -0
- package/dist/agents/prompts/shared.d.ts +19 -0
- package/dist/agents/prompts/shared.d.ts.map +1 -0
- package/dist/agents/prompts/shared.js +25 -0
- package/dist/agents/prompts/shared.js.map +1 -0
- package/dist/agents/prompts/standard-templates.generated.d.ts +36 -0
- package/dist/agents/prompts/standard-templates.generated.d.ts.map +1 -0
- package/dist/agents/prompts/standard-templates.generated.js +122 -0
- package/dist/agents/prompts/standard-templates.generated.js.map +1 -0
- package/dist/agents/prompts/standard.d.ts +36 -0
- package/dist/agents/prompts/standard.d.ts.map +1 -0
- package/dist/agents/prompts/standard.js +208 -0
- package/dist/agents/prompts/standard.js.map +1 -0
- package/dist/agents/prompts/testing.d.ts +12 -0
- package/dist/agents/prompts/testing.d.ts.map +1 -0
- package/dist/agents/prompts/testing.js +94 -0
- package/dist/agents/prompts/testing.js.map +1 -0
- package/dist/agents/read-only.d.ts +13 -0
- package/dist/agents/read-only.d.ts.map +1 -0
- package/dist/agents/read-only.js +29 -0
- package/dist/agents/read-only.js.map +1 -0
- package/dist/agents/registry.d.ts +70 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +51 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/runtime/executor.d.ts +72 -0
- package/dist/agents/runtime/executor.d.ts.map +1 -0
- package/dist/agents/runtime/executor.js +125 -0
- package/dist/agents/runtime/executor.js.map +1 -0
- package/dist/agents/runtime/fragments.d.ts +17 -0
- package/dist/agents/runtime/fragments.d.ts.map +1 -0
- package/dist/agents/runtime/fragments.js +33 -0
- package/dist/agents/runtime/fragments.js.map +1 -0
- package/dist/agents/runtime/routing.d.ts +57 -0
- package/dist/agents/runtime/routing.d.ts.map +1 -0
- package/dist/agents/runtime/routing.js +41 -0
- package/dist/agents/runtime/routing.js.map +1 -0
- package/dist/agents/runtime/web-search.d.ts +43 -0
- package/dist/agents/runtime/web-search.d.ts.map +1 -0
- package/dist/agents/runtime/web-search.js +102 -0
- package/dist/agents/runtime/web-search.js.map +1 -0
- package/dist/agents/standard-prompt-templates.generated.d.ts +36 -0
- package/dist/agents/standard-prompt-templates.generated.d.ts.map +1 -0
- package/dist/agents/standard-prompt-templates.generated.js +122 -0
- package/dist/agents/standard-prompt-templates.generated.js.map +1 -0
- package/dist/agents/standard-prompts.d.ts +36 -0
- package/dist/agents/standard-prompts.d.ts.map +1 -0
- package/dist/agents/standard-prompts.js +202 -0
- package/dist/agents/standard-prompts.js.map +1 -0
- package/dist/agents/test-prompts.d.ts +12 -0
- package/dist/agents/test-prompts.d.ts.map +1 -0
- package/dist/agents/test-prompts.js +92 -0
- package/dist/agents/test-prompts.js.map +1 -0
- package/dist/agents/traits.d.ts +56 -0
- package/dist/agents/traits.d.ts.map +1 -0
- package/dist/agents/traits.js +100 -0
- package/dist/agents/traits.js.map +1 -0
- package/dist/agents/web-search.d.ts +43 -0
- package/dist/agents/web-search.d.ts.map +1 -0
- package/dist/agents/web-search.js +102 -0
- package/dist/agents/web-search.js.map +1 -0
- package/dist/fragmentLibrary/DeterministicFragmentSelector.d.ts +10 -0
- package/dist/fragmentLibrary/DeterministicFragmentSelector.d.ts.map +1 -0
- package/dist/fragmentLibrary/DeterministicFragmentSelector.js +12 -0
- package/dist/fragmentLibrary/DeterministicFragmentSelector.js.map +1 -0
- package/dist/fragmentLibrary/FragmentLibraryService.d.ts +55 -0
- package/dist/fragmentLibrary/FragmentLibraryService.d.ts.map +1 -0
- package/dist/fragmentLibrary/FragmentLibraryService.js +203 -0
- package/dist/fragmentLibrary/FragmentLibraryService.js.map +1 -0
- package/dist/fragmentLibrary/FragmentSourceService.d.ts +51 -0
- package/dist/fragmentLibrary/FragmentSourceService.d.ts.map +1 -0
- package/dist/fragmentLibrary/FragmentSourceService.js +181 -0
- package/dist/fragmentLibrary/FragmentSourceService.js.map +1 -0
- package/dist/fragmentLibrary/LlmFragmentSelector.d.ts +21 -0
- package/dist/fragmentLibrary/LlmFragmentSelector.d.ts.map +1 -0
- package/dist/fragmentLibrary/LlmFragmentSelector.js +87 -0
- package/dist/fragmentLibrary/LlmFragmentSelector.js.map +1 -0
- package/dist/fragmentLibrary/fragment-catalog.d.ts +43 -0
- package/dist/fragmentLibrary/fragment-catalog.d.ts.map +1 -0
- package/dist/fragmentLibrary/fragment-catalog.js +129 -0
- package/dist/fragmentLibrary/fragment-catalog.js.map +1 -0
- package/dist/fragmentLibrary/fragment-source.logic.d.ts +34 -0
- package/dist/fragmentLibrary/fragment-source.logic.d.ts.map +1 -0
- package/dist/fragmentLibrary/fragment-source.logic.js +172 -0
- package/dist/fragmentLibrary/fragment-source.logic.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/cache.d.ts +22 -0
- package/dist/providers/cache.d.ts.map +1 -0
- package/dist/providers/cache.js +64 -0
- package/dist/providers/cache.js.map +1 -0
- package/dist/providers/endpoints.d.ts +8 -0
- package/dist/providers/endpoints.d.ts.map +1 -0
- package/dist/providers/endpoints.js +23 -0
- package/dist/providers/endpoints.js.map +1 -0
- package/dist/providers/index.d.ts +6 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +6 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/instrumented.d.ts +28 -0
- package/dist/providers/instrumented.d.ts.map +1 -0
- package/dist/providers/instrumented.js +147 -0
- package/dist/providers/instrumented.js.map +1 -0
- package/dist/providers/registry.d.ts +26 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +32 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/providers/resolvers.d.ts +58 -0
- package/dist/providers/resolvers.d.ts.map +1 -0
- package/dist/providers/resolvers.js +78 -0
- package/dist/providers/resolvers.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { anthropic } from '@ai-sdk/anthropic';
|
|
2
|
+
import { openai } from '@ai-sdk/openai';
|
|
3
|
+
import { registeredWebResearchHint } from '../kinds/registry.js';
|
|
4
|
+
// Provider-hosted web search for the INLINE agents (architect / researcher), which
|
|
5
|
+
// run a single `generateText` call via the AI SDK rather than going through the Pi
|
|
6
|
+
// container harness. Anthropic and OpenAI expose a server-executed web_search tool
|
|
7
|
+
// the SDK runs inline (the provider performs the search and folds the results into
|
|
8
|
+
// the same response — no client-side tool loop), exactly how Claude Code and Codex
|
|
9
|
+
// add web access. Providers without a hosted search (workers-ai, the
|
|
10
|
+
// OpenAI-compatible trio, mock) get no tool, so those deployments run unchanged.
|
|
11
|
+
/** Default inline kinds allowed to search the web — the design/research steps. */
|
|
12
|
+
export const DEFAULT_INLINE_WEB_SEARCH_KINDS = new Set([
|
|
13
|
+
'architect',
|
|
14
|
+
'researcher',
|
|
15
|
+
]);
|
|
16
|
+
/** Default ceiling on provider web searches per inline run (Anthropic `maxUses`). */
|
|
17
|
+
export const DEFAULT_INLINE_WEB_SEARCH_MAX_USES = 5;
|
|
18
|
+
// Per-kind reason an agent reaches for web search, so the nudge speaks to what that
|
|
19
|
+
// agent is actually doing rather than a generic "verify facts". These are the defaults
|
|
20
|
+
// for the BUILT-IN kinds; a custom/proprietary kind supplies its own via the registry
|
|
21
|
+
// (`AgentKindDefinition.webResearchHint`), which wins — so the shared composition here
|
|
22
|
+
// never needs to know a proprietary kind exists. Resolution order is registry → these
|
|
23
|
+
// built-in defaults → GENERIC_WEB_RESEARCH_HINT (see `webResearchGuidanceFor`).
|
|
24
|
+
const BUILTIN_WEB_RESEARCH_HINTS = {
|
|
25
|
+
coder: 'confirm a current library/API signature before you rely on it, and check for a known breaking change when an import or call behaves unexpectedly',
|
|
26
|
+
'ci-fixer': "search the exact failing error message, or a dependency's changelog/known issues, to find the real fix instead of guessing at versions",
|
|
27
|
+
mocker: "fetch the real third-party API's reference (endpoints, status codes, payload shapes, error formats) so the stubs match production behaviour",
|
|
28
|
+
analysis: 'check whether a dependency is deprecated, end-of-life, or has a known CVE / newer major version when judging technical debt',
|
|
29
|
+
'business-documenter': 'verify domain or regulatory terminology when documenting business rules, so the captured rules use the correct, current vocabulary',
|
|
30
|
+
playwright: "confirm a current testing-framework or locator API when the project's version differs from what you remember",
|
|
31
|
+
architect: 'compare current library/framework options and their trade-offs, and verify a capability or version is real before you design around it',
|
|
32
|
+
researcher: 'this is your primary tool — survey prior art, candidate libraries, benchmarks and known pitfalls, and ground every recommendation in a cited source',
|
|
33
|
+
};
|
|
34
|
+
const GENERIC_WEB_RESEARCH_HINT = "verify a fact that genuinely changes — a library version, an API, a recent breaking change, a security advisory — when the repository itself can't answer it";
|
|
35
|
+
/**
|
|
36
|
+
* The web-search guidance appended to an agent's context ONLY when the tools are
|
|
37
|
+
* actually available, so the model is never told about a tool it lacks. The hint is
|
|
38
|
+
* tailored to `kind`; `fetch` controls whether the companion `web_fetch` tool (the Pi
|
|
39
|
+
* container path has it; the inline provider tool does not) is mentioned. Mirrors the
|
|
40
|
+
* harness's own conservative framing: search is for things that change or that the
|
|
41
|
+
* agent is unsure of, not a reflex, and never a substitute for reading the code.
|
|
42
|
+
*/
|
|
43
|
+
export function webResearchGuidanceFor(kind, opts = {}) {
|
|
44
|
+
// A proprietary/custom kind's own hint wins (it knows its job; the shared library
|
|
45
|
+
// doesn't); then the built-in defaults; then the generic fallback.
|
|
46
|
+
const hint = registeredWebResearchHint(kind) ?? BUILTIN_WEB_RESEARCH_HINTS[kind] ?? GENERIC_WEB_RESEARCH_HINT;
|
|
47
|
+
const tools = opts.fetch
|
|
48
|
+
? '`web_search` (titled result snippets for a query) and `web_fetch` (read a URL as text)'
|
|
49
|
+
: 'a `web_search` tool';
|
|
50
|
+
const them = opts.fetch ? 'them' : 'it';
|
|
51
|
+
return `
|
|
52
|
+
|
|
53
|
+
## Web search (use sparingly)
|
|
54
|
+
|
|
55
|
+
You have ${tools}. Use ${them} mainly to ${hint}. Prefer first-party documentation, and
|
|
56
|
+
cite the source URL when a decision rests on what you find. Do not search for anything
|
|
57
|
+
already in the checkout or the context you were given, and don't let searching replace
|
|
58
|
+
reading the code.`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The provider-hosted web_search tool set for a provider, or undefined when the
|
|
62
|
+
* provider has no server-executed web search the AI SDK can run inline. Only the
|
|
63
|
+
* provider id is consulted — the actual search runs under the model request's own
|
|
64
|
+
* credentials, so this just selects the right provider-defined tool spec.
|
|
65
|
+
*/
|
|
66
|
+
export function providerWebSearchTools(provider, maxUses = DEFAULT_INLINE_WEB_SEARCH_MAX_USES) {
|
|
67
|
+
if (provider === 'anthropic') {
|
|
68
|
+
return { web_search: anthropic.tools.webSearch_20250305({ maxUses }) };
|
|
69
|
+
}
|
|
70
|
+
if (provider === 'openai') {
|
|
71
|
+
// OpenAI's hosted search runs via the Responses API; `@ai-sdk/openai`'s default
|
|
72
|
+
// model uses it, so a standard `openai:gpt-…` model resolves correctly. The
|
|
73
|
+
// per-run cap isn't a tool parameter here (OpenAI manages its own budget), so
|
|
74
|
+
// `maxUses` only applies to the Anthropic tool above.
|
|
75
|
+
return { web_search: openai.tools.webSearch({}) };
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Read inline web-search configuration from a deployment's environment, or
|
|
81
|
+
* undefined when it is not enabled. `INLINE_WEB_SEARCH_ENABLED` (truthy) is the
|
|
82
|
+
* single opt-in switch; `INLINE_WEB_SEARCH_KINDS` (comma-separated) overrides the
|
|
83
|
+
* default architect/researcher allow-list, and `INLINE_WEB_SEARCH_MAX_USES` caps
|
|
84
|
+
* searches per run. Off ⇒ the inline agents run exactly as before.
|
|
85
|
+
*/
|
|
86
|
+
export function inlineWebSearchOptionsFromEnv(env) {
|
|
87
|
+
const enabled = env.INLINE_WEB_SEARCH_ENABLED?.trim().toLowerCase();
|
|
88
|
+
if (enabled !== 'true' && enabled !== '1' && enabled !== 'yes')
|
|
89
|
+
return undefined;
|
|
90
|
+
const kindList = (env.INLINE_WEB_SEARCH_KINDS ?? '')
|
|
91
|
+
.split(',')
|
|
92
|
+
.map((k) => k.trim().toLowerCase())
|
|
93
|
+
.filter(Boolean);
|
|
94
|
+
const maxUses = Number(env.INLINE_WEB_SEARCH_MAX_USES);
|
|
95
|
+
return {
|
|
96
|
+
kinds: kindList.length ? new Set(kindList) : DEFAULT_INLINE_WEB_SEARCH_KINDS,
|
|
97
|
+
maxUses: Number.isFinite(maxUses) && maxUses > 0
|
|
98
|
+
? Math.floor(maxUses)
|
|
99
|
+
: DEFAULT_INLINE_WEB_SEARCH_MAX_USES,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=web-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-search.js","sourceRoot":"","sources":["../../../src/agents/runtime/web-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,mFAAmF;AACnF,mFAAmF;AACnF,mFAAmF;AACnF,mFAAmF;AACnF,mFAAmF;AACnF,qEAAqE;AACrE,iFAAiF;AAEjF,kFAAkF;AAClF,MAAM,CAAC,MAAM,+BAA+B,GAAwB,IAAI,GAAG,CAAC;IAC1E,WAAW;IACX,YAAY;CACb,CAAC,CAAA;AAEF,qFAAqF;AACrF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAA;AAUnD,oFAAoF;AACpF,uFAAuF;AACvF,sFAAsF;AACtF,uFAAuF;AACvF,sFAAsF;AACtF,gFAAgF;AAChF,MAAM,0BAA0B,GAA2B;IACzD,KAAK,EACH,kJAAkJ;IACpJ,UAAU,EACR,wIAAwI;IAC1I,MAAM,EACJ,6IAA6I;IAC/I,QAAQ,EACN,6HAA6H;IAC/H,qBAAqB,EACnB,oIAAoI;IACtI,UAAU,EACR,8GAA8G;IAChH,SAAS,EACP,wIAAwI;IAC1I,UAAU,EACR,qJAAqJ;CACxJ,CAAA;AAED,MAAM,yBAAyB,GAC7B,8JAA8J,CA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AAM,QAAQ,GAAG,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAC;SACjD,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAClC,MAAM,CAAC,OAAO,CAAC,CAAA;IAClB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;IACtD,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,+BAA+B;QAC5E,OAAO,EACL,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC;YACrC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;YACrB,CAAC,CAAC,kCAAkC;KACzC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const blockContext: {
|
|
2
|
+
"0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
4
|
+
"2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
5
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
6
|
+
"4": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
7
|
+
"5": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
8
|
+
compiler: (string | number)[];
|
|
9
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
10
|
+
useData: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const design: {
|
|
13
|
+
compiler: (string | number)[];
|
|
14
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
15
|
+
usePartial: boolean;
|
|
16
|
+
useData: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const build: {
|
|
19
|
+
compiler: (string | number)[];
|
|
20
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
21
|
+
usePartial: boolean;
|
|
22
|
+
useData: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const review: {
|
|
25
|
+
compiler: (string | number)[];
|
|
26
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
27
|
+
usePartial: boolean;
|
|
28
|
+
useData: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare const test: {
|
|
31
|
+
compiler: (string | number)[];
|
|
32
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
|
|
33
|
+
usePartial: boolean;
|
|
34
|
+
useData: boolean;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=standard-prompt-templates.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-prompt-templates.generated.d.ts","sourceRoot":"","sources":["../../src/agents/standard-prompt-templates.generated.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY;;;;;;;;;;CA6ER,CAAA;AAEjB,eAAO,MAAM,MAAM;;;;;CAUgB,CAAA;AAEnC,eAAO,MAAM,KAAK;;;;;CAUiB,CAAA;AAEnC,eAAO,MAAM,MAAM;;;;;CAUgB,CAAA;AAEnC,eAAO,MAAM,IAAI;;;;;CAUkB,CAAA"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
// Precompiled Handlebars specs for the standard-prompt templates, consumed by the
|
|
4
|
+
// codegen-free Handlebars runtime so the worker can render them on Cloudflare
|
|
5
|
+
// Workers (which forbid runtime code generation).
|
|
6
|
+
//
|
|
7
|
+
// Regenerate with: pnpm --filter @cat-factory/agents run precompile:templates
|
|
8
|
+
// Source templates live in scripts/precompile-prompts.mjs.
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
export const blockContext = { "0": function (container, depth0, helpers, partials, data) {
|
|
11
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
12
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
13
|
+
return parent[propertyName];
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
};
|
|
17
|
+
return ((stack1 = container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "description") : stack1), depth0)) != null ? stack1 : "");
|
|
18
|
+
}, "1": function (container, depth0, helpers, partials, data) {
|
|
19
|
+
return "(none provided)";
|
|
20
|
+
}, "2": function (container, depth0, helpers, partials, data) {
|
|
21
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
23
|
+
return parent[propertyName];
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
};
|
|
27
|
+
return "Resolved decisions:\n"
|
|
28
|
+
+ ((stack1 = lookupProperty(helpers, "each").call(depth0 != null ? depth0 : (container.nullContext || {}), (depth0 != null ? lookupProperty(depth0, "decisions") : depth0), { "name": "each", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 7, "column": 9 } } })) != null ? stack1 : "");
|
|
29
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
30
|
+
var stack1, helper, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.hooks.helperMissing, alias3 = "function", lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
32
|
+
return parent[propertyName];
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
};
|
|
36
|
+
return "- "
|
|
37
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers, "question") || (depth0 != null ? lookupProperty(depth0, "question") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "question", "hash": {}, "data": data, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 33 } } }) : helper))) != null ? stack1 : "")
|
|
38
|
+
+ " → "
|
|
39
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers, "chosen") || (depth0 != null ? lookupProperty(depth0, "chosen") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "chosen", "hash": {}, "data": data, "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 46 } } }) : helper))) != null ? stack1 : "")
|
|
40
|
+
+ "\n";
|
|
41
|
+
}, "4": function (container, depth0, helpers, partials, data) {
|
|
42
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
43
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
44
|
+
return parent[propertyName];
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
};
|
|
48
|
+
return "Work from earlier agents in this pipeline:\n"
|
|
49
|
+
+ ((stack1 = lookupProperty(helpers, "each").call(depth0 != null ? depth0 : (container.nullContext || {}), (depth0 != null ? lookupProperty(depth0, "priorOutputs") : depth0), { "name": "each", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 13, "column": 9 } } })) != null ? stack1 : "");
|
|
50
|
+
}, "5": function (container, depth0, helpers, partials, data) {
|
|
51
|
+
var stack1, helper, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.hooks.helperMissing, alias3 = "function", lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
53
|
+
return parent[propertyName];
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
};
|
|
57
|
+
return "### "
|
|
58
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers, "agentKind") || (depth0 != null ? lookupProperty(depth0, "agentKind") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "agentKind", "hash": {}, "data": data, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 39 } } }) : helper))) != null ? stack1 : "")
|
|
59
|
+
+ "\n"
|
|
60
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers, "output") || (depth0 != null ? lookupProperty(depth0, "output") : depth0)) != null ? helper : alias2), (typeof helper === alias3 ? helper.call(alias1, { "name": "output", "hash": {}, "data": data, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 10 } } }) : helper))) != null ? stack1 : "")
|
|
61
|
+
+ "\n\n";
|
|
62
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
63
|
+
var stack1, helper, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.lambda, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
65
|
+
return parent[propertyName];
|
|
66
|
+
}
|
|
67
|
+
return undefined;
|
|
68
|
+
};
|
|
69
|
+
return "Pipeline: "
|
|
70
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers, "pipelineName") || (depth0 != null ? lookupProperty(depth0, "pipelineName") : depth0)) != null ? helper : container.hooks.helperMissing), (typeof helper === "function" ? helper.call(alias1, { "name": "pipelineName", "hash": {}, "data": data, "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 26 } } }) : helper))) != null ? stack1 : "")
|
|
71
|
+
+ "\nBlock: "
|
|
72
|
+
+ ((stack1 = alias2(((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "title") : stack1), depth0)) != null ? stack1 : "")
|
|
73
|
+
+ " ("
|
|
74
|
+
+ ((stack1 = alias2(((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "type") : stack1), depth0)) != null ? stack1 : "")
|
|
75
|
+
+ ")\nDescription: "
|
|
76
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, ((stack1 = (depth0 != null ? lookupProperty(depth0, "block") : depth0)) != null ? lookupProperty(stack1, "description") : stack1), { "name": "if", "hash": {}, "fn": container.program(0, data, 0), "inverse": container.program(1, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 89 } } })) != null ? stack1 : "")
|
|
77
|
+
+ "\n"
|
|
78
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, ((stack1 = (depth0 != null ? lookupProperty(depth0, "decisions") : depth0)) != null ? lookupProperty(stack1, "length") : stack1), { "name": "if", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 7, "column": 16 } } })) != null ? stack1 : "")
|
|
79
|
+
+ "\n"
|
|
80
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, ((stack1 = (depth0 != null ? lookupProperty(depth0, "priorOutputs") : depth0)) != null ? lookupProperty(stack1, "length") : stack1), { "name": "if", "hash": {}, "fn": container.program(4, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 13, "column": 16 } } })) != null ? stack1 : "");
|
|
81
|
+
}, "useData": true };
|
|
82
|
+
export const design = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
83
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
84
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
85
|
+
return parent[propertyName];
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
};
|
|
89
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
90
|
+
+ "Produce the solution design for this block. Be concise and concrete: prefer short bullets over prose, and finish with the ordered implementation steps.";
|
|
91
|
+
}, "usePartial": true, "useData": true };
|
|
92
|
+
export const build = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
93
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
95
|
+
return parent[propertyName];
|
|
96
|
+
}
|
|
97
|
+
return undefined;
|
|
98
|
+
};
|
|
99
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
100
|
+
+ "Produce the implementation for this block, faithful to the design and prior work above: the key modules, functions, data shapes and wiring.";
|
|
101
|
+
}, "usePartial": true, "useData": true };
|
|
102
|
+
export const review = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
103
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
104
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
105
|
+
return parent[propertyName];
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
};
|
|
109
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
110
|
+
+ "Review the work above. List concrete, actionable findings ordered by severity; if it is sound, say so explicitly.";
|
|
111
|
+
}, "usePartial": true, "useData": true };
|
|
112
|
+
export const test = { "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
113
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
114
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
115
|
+
return parent[propertyName];
|
|
116
|
+
}
|
|
117
|
+
return undefined;
|
|
118
|
+
};
|
|
119
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "blockContext"), depth0, { "name": "blockContext", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
120
|
+
+ "Produce a pragmatic test plan for this block: the highest-value tests to write first, the key edge cases and the failure modes to cover.";
|
|
121
|
+
}, "usePartial": true, "useData": true };
|
|
122
|
+
//# sourceMappingURL=standard-prompt-templates.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-prompt-templates.generated.js","sourceRoot":"","sources":["../../src/agents/standard-prompt-templates.generated.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,wCAAwC;AACxC,kFAAkF;AAClF,8EAA8E;AAC9E,kDAAkD;AAClD,EAAE;AACF,8EAA8E;AAC9E,2DAA2D;AAE3D,oBAAoB;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAG,EAAC,GAAG,EAAC,UAAS,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,IAAI;QAC5E,IAAI,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC,cAAc,IAAI,UAAS,MAAM,EAAE,YAAY;YAClF,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;gBAC/D,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC;YAC9B,CAAC;YACD,OAAO,SAAS,CAAA;QACpB,CAAC,CAAC;QAEJ,OAAO,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,E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AC,CAAC,CAAC,EAAE,CAAC;cACzN,0IAA0I,CAAC;IACjJ,CAAC,EAAC,YAAY,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AgentKind } from '@cat-factory/kernel';
|
|
2
|
+
import type { AgentRunContext } from '@cat-factory/kernel';
|
|
3
|
+
/** The four standard phases of building out a solution. */
|
|
4
|
+
export type StandardPhase = 'design' | 'build' | 'review' | 'test';
|
|
5
|
+
export declare const STANDARD_PHASES: readonly StandardPhase[];
|
|
6
|
+
/**
|
|
7
|
+
* Maps the built-in agent kinds to the standard phase they perform. Other agent
|
|
8
|
+
* kinds (researcher, documenter, integrator, custom ids) are not standard phases
|
|
9
|
+
* and keep their own role prompts in the agent catalog.
|
|
10
|
+
*/
|
|
11
|
+
export declare const STANDARD_PHASE_BY_KIND: Readonly<Record<string, StandardPhase>>;
|
|
12
|
+
/** The standard phase an agent kind performs, or `undefined` if it isn't one. */
|
|
13
|
+
export declare function phaseForKind(kind: AgentKind): StandardPhase | undefined;
|
|
14
|
+
/** The built-out system (role) prompt for a standard phase. */
|
|
15
|
+
export declare function standardSystemPrompt(phase: StandardPhase): string;
|
|
16
|
+
/**
|
|
17
|
+
* Render the "ephemeral environment under test" section from the run context, or
|
|
18
|
+
* an empty string when no environment is attached. The auth scheme is described
|
|
19
|
+
* so the agent knows how to reach the env, but the raw access token/password is
|
|
20
|
+
* deliberately NOT placed in the prompt — it must not be sent to the LLM
|
|
21
|
+
* provider; programmatic consumers read it from `context.environment.access`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function environmentSection(context: AgentRunContext): string;
|
|
24
|
+
/**
|
|
25
|
+
* Render the linked extra-context section — documents (requirements / RFCs /
|
|
26
|
+
* PRDs) and tracker issues attached to the block — or an empty string when none
|
|
27
|
+
* are linked. Shared by every agent kind (standard phases and the generic roles
|
|
28
|
+
* alike) so the same context the engine resolves for a step (see
|
|
29
|
+
* `ExecutionService.buildAgentContext`) reaches whichever agent runs it. The
|
|
30
|
+
* leading blank lines separate it from the preceding prompt content;
|
|
31
|
+
* `renderStandardUserPrompt` collapses any runs of blank lines it produces.
|
|
32
|
+
*/
|
|
33
|
+
export declare function linkedContextSection(context: AgentRunContext): string;
|
|
34
|
+
/** Render the built-out user prompt for a standard phase from the run context. */
|
|
35
|
+
export declare function renderStandardUserPrompt(phase: StandardPhase, context: AgentRunContext): string;
|
|
36
|
+
//# sourceMappingURL=standard-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-prompts.d.ts","sourceRoot":"","sources":["../../src/agents/standard-prompts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAqB1D,2DAA2D;AAC3D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAElE,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAA0C,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAQ1E,CAAA;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAEvE;AA2ED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAEjE;AAoDD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAoBnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAYrE;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAO/F"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// Runtime VALUE from the codegen-free runtime build (Workers forbid runtime code
|
|
2
|
+
// generation); its Node-ESM specifier needs the explicit `.js`. The TYPE is sourced
|
|
3
|
+
// from the full package (the runtime subpath's types omit `create`), type-only so the
|
|
4
|
+
// compiler is not pulled into the bundle.
|
|
5
|
+
import HandlebarsRuntime from 'handlebars/runtime.js';
|
|
6
|
+
import { renderTaskContext } from '@cat-factory/kernel';
|
|
7
|
+
import { PLATFORM_DELIVERY_CONTRACT } from './ci-gate.js';
|
|
8
|
+
import { STANDARDS_FOOTER } from './prompt-shared.js';
|
|
9
|
+
import * as templateSpecs from './standard-prompt-templates.generated.js';
|
|
10
|
+
const Handlebars = HandlebarsRuntime;
|
|
11
|
+
export const STANDARD_PHASES = ['design', 'build', 'review', 'test'];
|
|
12
|
+
/**
|
|
13
|
+
* Maps the built-in agent kinds to the standard phase they perform. Other agent
|
|
14
|
+
* kinds (researcher, documenter, integrator, custom ids) are not standard phases
|
|
15
|
+
* and keep their own role prompts in the agent catalog.
|
|
16
|
+
*/
|
|
17
|
+
export const STANDARD_PHASE_BY_KIND = {
|
|
18
|
+
architect: 'design',
|
|
19
|
+
coder: 'build',
|
|
20
|
+
reviewer: 'review',
|
|
21
|
+
// `tester` is no longer a one-shot strategy phase: it is a container agent that
|
|
22
|
+
// actually runs the tests and returns a structured report (see ./test-prompts),
|
|
23
|
+
// looped with the `fixer` by the engine. It therefore routes through its own
|
|
24
|
+
// prompt, not the generic `test` phase.
|
|
25
|
+
};
|
|
26
|
+
/** The standard phase an agent kind performs, or `undefined` if it isn't one. */
|
|
27
|
+
export function phaseForKind(kind) {
|
|
28
|
+
return STANDARD_PHASE_BY_KIND[kind];
|
|
29
|
+
}
|
|
30
|
+
// --- System prompts -------------------------------------------------------
|
|
31
|
+
// Static role + approach guidance per phase. Each closes by deferring to the
|
|
32
|
+
// best-practice standards that `composeSystemPrompt` appends below it.
|
|
33
|
+
// The build phase runs in a container on a real checkout and ships its code through
|
|
34
|
+
// a pull request — but the PUSH and the PR are the platform's job, not the agent's
|
|
35
|
+
// (it has no push credentials). "Done" here means a complete implementation that
|
|
36
|
+
// builds and passes its relevant tests locally; the platform then pushes, opens the
|
|
37
|
+
// PR and drives CI (dispatching a CI-fixer if a check fails). The shared
|
|
38
|
+
// PLATFORM_DELIVERY_CONTRACT spells out that boundary so the agent commits its own
|
|
39
|
+
// work, never chases credentials, and bounds its effort.
|
|
40
|
+
const BUILD_DELIVERY_GATE = [
|
|
41
|
+
'Definition of done: a focused, complete implementation that builds and passes its relevant tests locally.',
|
|
42
|
+
PLATFORM_DELIVERY_CONTRACT,
|
|
43
|
+
].join('\n');
|
|
44
|
+
const SYSTEM_PROMPTS = {
|
|
45
|
+
design: [
|
|
46
|
+
'You are a senior software architect owning the DESIGN of a building block.',
|
|
47
|
+
'Turn the block intent into a clear, buildable solution design.',
|
|
48
|
+
'',
|
|
49
|
+
'Approach:',
|
|
50
|
+
'- Restate the problem and the hard constraints in one or two sentences.',
|
|
51
|
+
'- Identify the main components, their responsibilities, and the data/contracts that flow between them.',
|
|
52
|
+
'- Surface the key decisions and trade-offs; where a choice is genuinely open, raise it as a decision rather than guessing.',
|
|
53
|
+
'- Call out risks, edge cases and non-functional needs (performance, security, failure modes).',
|
|
54
|
+
'- End with a short, ordered list of concrete implementation steps.',
|
|
55
|
+
'',
|
|
56
|
+
STANDARDS_FOOTER,
|
|
57
|
+
].join('\n'),
|
|
58
|
+
build: [
|
|
59
|
+
'You are a senior engineer owning the BUILD of a building block.',
|
|
60
|
+
'Produce a focused, faithful implementation of the agreed design.',
|
|
61
|
+
'',
|
|
62
|
+
'Approach:',
|
|
63
|
+
'- Honour the design and any resolved decisions and prior work given to you; do not redesign silently.',
|
|
64
|
+
'- Lay out the key modules, functions and data shapes, and the wiring between them.',
|
|
65
|
+
'- Handle errors and edge cases explicitly; validate input at the boundary.',
|
|
66
|
+
'- Keep the implementation cohesive and minimal — no speculative abstraction.',
|
|
67
|
+
'- Note any follow-ups or assumptions you had to make.',
|
|
68
|
+
'',
|
|
69
|
+
BUILD_DELIVERY_GATE,
|
|
70
|
+
'',
|
|
71
|
+
STANDARDS_FOOTER,
|
|
72
|
+
].join('\n'),
|
|
73
|
+
review: [
|
|
74
|
+
'You are a meticulous code reviewer owning the REVIEW of a building block.',
|
|
75
|
+
'Assess the proposed work for correctness, quality, security and risk.',
|
|
76
|
+
'',
|
|
77
|
+
'Approach:',
|
|
78
|
+
'- Check the work against the stated intent, the design, and the required standards.',
|
|
79
|
+
'- Look for correctness bugs, missing edge cases, security issues and unwarranted complexity.',
|
|
80
|
+
'- List concrete, actionable findings ordered by severity (blocker → nit); reference the specific part each concerns.',
|
|
81
|
+
'- Distinguish must-fix issues from optional suggestions.',
|
|
82
|
+
'- If the work is sound, say so explicitly rather than inventing problems.',
|
|
83
|
+
'',
|
|
84
|
+
STANDARDS_FOOTER,
|
|
85
|
+
].join('\n'),
|
|
86
|
+
test: [
|
|
87
|
+
'You are a pragmatic test engineer owning the TESTING of a building block.',
|
|
88
|
+
'Define the tests that give the most confidence for the least effort.',
|
|
89
|
+
'',
|
|
90
|
+
'Approach:',
|
|
91
|
+
'- Identify the key behaviours, the boundaries and the failure modes worth covering.',
|
|
92
|
+
'- Prioritise: list the highest-value tests to write first, and why.',
|
|
93
|
+
'- Cover the happy path, important edge cases and error handling; note any that need integration- or end-to-end-level coverage.',
|
|
94
|
+
'- Keep tests deterministic and independent; call out fixtures or test data needed.',
|
|
95
|
+
'- Flag anything that is hard to test and how the design could change to fix that.',
|
|
96
|
+
'',
|
|
97
|
+
STANDARDS_FOOTER,
|
|
98
|
+
].join('\n'),
|
|
99
|
+
};
|
|
100
|
+
/** The built-out system (role) prompt for a standard phase. */
|
|
101
|
+
export function standardSystemPrompt(phase) {
|
|
102
|
+
return SYSTEM_PROMPTS[phase];
|
|
103
|
+
}
|
|
104
|
+
// --- User prompts ---------------------------------------------------------
|
|
105
|
+
// The run context is dynamic (features, decisions, prior outputs), so the user
|
|
106
|
+
// prompt is rendered from a Handlebars template. Cloudflare Workers forbid
|
|
107
|
+
// runtime code generation, so we cannot compile templates from source there;
|
|
108
|
+
// instead the templates are *precompiled* (see scripts/precompile-prompts.mjs)
|
|
109
|
+
// into ./standard-prompt-templates.generated and executed by the codegen-free
|
|
110
|
+
// Handlebars runtime. We use an isolated environment so the registered helper
|
|
111
|
+
// and partial never touch global state.
|
|
112
|
+
const hbs = Handlebars.create();
|
|
113
|
+
hbs.registerHelper('join', (value, separator) => Array.isArray(value) ? value.join(typeof separator === 'string' ? separator : ', ') : '');
|
|
114
|
+
// The shared context preamble is a precompiled template registered as a partial,
|
|
115
|
+
// so each phase template can pull it in via {{> blockContext}}.
|
|
116
|
+
hbs.registerPartial('blockContext', hbs.template(templateSpecs.blockContext));
|
|
117
|
+
const USER_TEMPLATES = {
|
|
118
|
+
design: hbs.template(templateSpecs.design),
|
|
119
|
+
build: hbs.template(templateSpecs.build),
|
|
120
|
+
review: hbs.template(templateSpecs.review),
|
|
121
|
+
test: hbs.template(templateSpecs.test),
|
|
122
|
+
};
|
|
123
|
+
function toView(context) {
|
|
124
|
+
// A just-resolved decision counts as resolved context for this step.
|
|
125
|
+
const decisions = context.resolvedDecision
|
|
126
|
+
? [...context.decisions, context.resolvedDecision]
|
|
127
|
+
: context.decisions;
|
|
128
|
+
return {
|
|
129
|
+
pipelineName: context.pipelineName,
|
|
130
|
+
block: {
|
|
131
|
+
title: context.block.title,
|
|
132
|
+
type: context.block.type,
|
|
133
|
+
description: context.block.description,
|
|
134
|
+
},
|
|
135
|
+
decisions,
|
|
136
|
+
priorOutputs: context.priorOutputs,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Render the "ephemeral environment under test" section from the run context, or
|
|
141
|
+
* an empty string when no environment is attached. The auth scheme is described
|
|
142
|
+
* so the agent knows how to reach the env, but the raw access token/password is
|
|
143
|
+
* deliberately NOT placed in the prompt — it must not be sent to the LLM
|
|
144
|
+
* provider; programmatic consumers read it from `context.environment.access`.
|
|
145
|
+
*/
|
|
146
|
+
export function environmentSection(context) {
|
|
147
|
+
const env = context.environment;
|
|
148
|
+
if (!env)
|
|
149
|
+
return '';
|
|
150
|
+
const lines = [
|
|
151
|
+
'',
|
|
152
|
+
'Ephemeral environment under test:',
|
|
153
|
+
`- URL: ${env.url ?? '(pending)'}`,
|
|
154
|
+
`- Status: ${env.status}`,
|
|
155
|
+
];
|
|
156
|
+
const access = env.access;
|
|
157
|
+
if (access && access.scheme !== 'none') {
|
|
158
|
+
if (access.scheme === 'bearer') {
|
|
159
|
+
lines.push('- Auth: Bearer token (provided to the test harness out of band)');
|
|
160
|
+
}
|
|
161
|
+
else if (access.scheme === 'basic') {
|
|
162
|
+
lines.push('- Auth: HTTP Basic credentials (provided to the test harness out of band)');
|
|
163
|
+
}
|
|
164
|
+
else if (access.scheme === 'custom_header' && access.headerName) {
|
|
165
|
+
lines.push(`- Auth: \`${access.headerName}\` header (value provided out of band)`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return lines.join('\n');
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Render the linked extra-context section — documents (requirements / RFCs /
|
|
172
|
+
* PRDs) and tracker issues attached to the block — or an empty string when none
|
|
173
|
+
* are linked. Shared by every agent kind (standard phases and the generic roles
|
|
174
|
+
* alike) so the same context the engine resolves for a step (see
|
|
175
|
+
* `ExecutionService.buildAgentContext`) reaches whichever agent runs it. The
|
|
176
|
+
* leading blank lines separate it from the preceding prompt content;
|
|
177
|
+
* `renderStandardUserPrompt` collapses any runs of blank lines it produces.
|
|
178
|
+
*/
|
|
179
|
+
export function linkedContextSection(context) {
|
|
180
|
+
const { contextDocs, contextTasks } = context.block;
|
|
181
|
+
const lines = [];
|
|
182
|
+
if (contextDocs?.length) {
|
|
183
|
+
lines.push('', 'Linked context documents (requirements / RFCs / PRDs):');
|
|
184
|
+
for (const doc of contextDocs)
|
|
185
|
+
lines.push(`### ${doc.title} (${doc.url})`, doc.excerpt);
|
|
186
|
+
}
|
|
187
|
+
if (contextTasks?.length) {
|
|
188
|
+
lines.push('', 'Linked tracker issues (extra context):');
|
|
189
|
+
for (const task of contextTasks)
|
|
190
|
+
lines.push(renderTaskContext(task));
|
|
191
|
+
}
|
|
192
|
+
return lines.length ? `\n${lines.join('\n')}` : '';
|
|
193
|
+
}
|
|
194
|
+
/** Render the built-out user prompt for a standard phase from the run context. */
|
|
195
|
+
export function renderStandardUserPrompt(phase, context) {
|
|
196
|
+
const rendered = USER_TEMPLATES[phase](toView(context)) +
|
|
197
|
+
linkedContextSection(context) +
|
|
198
|
+
environmentSection(context);
|
|
199
|
+
// Collapse the blank lines that conditionals leave behind, then trim.
|
|
200
|
+
return rendered.replace(/\n{3,}/g, '\n\n').trim();
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=standard-prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-prompts.js","sourceRoot":"","sources":["../../src/agents/standard-prompts.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,oFAAoF;AACpF,sFAAsF;AACtF,0CAA0C;AAC1C,OAAO,iBAAiB,MAAM,uBAAuB,CAAA;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,0CAA0C,CAAA;AAEzE,MAAM,UAAU,GAAG,iBAA2D,CAAA;AAkB9E,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AAE9F;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA4C;IAC7E,SAAS,EAAE,QAA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+
import type { AgentKind, AgentRunContext } from '@cat-factory/kernel';
|
|
2
|
+
/** True when the kind is part of the Tester/Fixer track. */
|
|
3
|
+
export declare function isTestingKind(kind: AgentKind): boolean;
|
|
4
|
+
/** The built-out system prompt for a Tester/Fixer kind, or undefined otherwise. */
|
|
5
|
+
export declare function testingSystemPrompt(kind: AgentKind): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* The "which environment to run in" section for a Tester step, rendered from the
|
|
8
|
+
* block's contributed `tester.environment` config value. Empty for non-tester kinds
|
|
9
|
+
* or when nothing is set, so callers can append it unconditionally.
|
|
10
|
+
*/
|
|
11
|
+
export declare function testerEnvironmentSection(context: AgentRunContext): string;
|
|
12
|
+
//# sourceMappingURL=test-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-prompts.d.ts","sourceRoot":"","sources":["../../src/agents/test-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAqErE,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAEtD;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAIvE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAUzE"}
|