@richjava/req0 0.7.0 → 0.8.1

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.
@@ -1,2 +1,85 @@
1
+ import type { LoadedStandards } from "./standards.js";
1
2
  import type { JevPack, SpecAst } from "./types.js";
2
- export declare function emitJevPack(spec: SpecAst): JevPack;
3
+ export type JevPackContext = {
4
+ markdown?: string;
5
+ contextFiles?: string[];
6
+ standards?: LoadedStandards | null;
7
+ };
8
+ export declare const STD_DOCUMENT_QUESTIONS: readonly [{
9
+ readonly id: "std.document.title-names-problem";
10
+ readonly instructions: "Does the title name the problem or capability rather than the solution?";
11
+ readonly pass: "The # title is a problem or capability. It does not prescribe a solution or say 'the system shall'.";
12
+ readonly fail: "The title names a solution, a stack, or a system-shall statement.";
13
+ }, {
14
+ readonly id: "std.document.overview-intent";
15
+ readonly instructions: "Is Overview two to four sentences of actor, capability, and outcome — not a numbered rule list?";
16
+ readonly pass: "Overview states who, what, and the outcome. Numbered rules live under Business Rules.";
17
+ readonly fail: "Overview is missing, or it lists rules, IDs, or implementation steps instead of intent.";
18
+ }, {
19
+ readonly id: "std.document.definitions-glossary";
20
+ readonly instructions: "If Definitions exist, are they glossary only — not hidden business rules?";
21
+ readonly pass: "Definitions (if present) name terms. Behaviour is in BR- rules. Missing Definitions is fine when no glossary is needed.";
22
+ readonly fail: "Definitions contain obligations, permissions, or exceptions that belong in Business Rules.";
23
+ }, {
24
+ readonly id: "std.document.data-not-behaviour";
25
+ readonly instructions: "If Data Definition exists, does it describe data rather than behaviour?";
26
+ readonly pass: "Data Definition (if present) covers records, uniqueness, or derived fields. Behaviour is a rule or use case. Missing Data Definition is fine when data is obvious.";
27
+ readonly fail: "Data Definition hides workflow, permissions, or observables that belong in BR- or UC- entries.";
28
+ }, {
29
+ readonly id: "std.document.rules-atomic-observable";
30
+ readonly instructions: "Is each business rule one atomic obligation with a noticeable Observable, and are exceptions sibling BR- rules?";
31
+ readonly pass: "Each BR-NNN is one rule. Statement plus Observable make association (user, record, role) noticeable. Exceptions are separate IDs.";
32
+ readonly fail: "A rule bundles multiple obligations, lacks a noticeable Observable, or buries exceptions in prose.";
33
+ }, {
34
+ readonly id: "std.document.usecases-complete";
35
+ readonly instructions: "Does each use case have actor, intent-named title, numbered steps, observable Outcome, and deny/empty/error paths that matter?";
36
+ readonly pass: "UC- entries use frozen step verbs, Outcomes a person can see, and cover allow plus material deny or empty paths.";
37
+ readonly fail: "A use case is UI-pixel named, missing Outcome, or omits a deny/empty/error path the rules imply.";
38
+ }, {
39
+ readonly id: "std.document.matrix-allow-deny";
40
+ readonly instructions: "Is the roles matrix complete with allow/deny only and consistent with the business rules?";
41
+ readonly pass: "Every role and action the spec talks about appears. Cells are allow or deny. An allow cell plus a rule that hides a control is consistent.";
42
+ readonly fail: "The matrix omits a role or action, uses other cell values, or contradicts the rules without a Look-for use case.";
43
+ }, {
44
+ readonly id: "std.document.no-hidden-acceptance";
45
+ readonly instructions: "Do Implementation Notes and UI notes avoid hidden acceptance criteria?";
46
+ readonly pass: "Notes are builder hints. Anything a test would fail on lives in a business rule or use case. Missing notes is fine.";
47
+ readonly fail: "Implementation Notes, UI notes, or similar prose is the only place an acceptance criterion appears.";
48
+ }, {
49
+ readonly id: "std.document.related-not-restated";
50
+ readonly instructions: "If Related Requirements exist, are they pointers rather than a restatement of this pack's rules?";
51
+ readonly pass: "Related Requirements (if present) name other packs. This pack's obligations stay in its BR- and UC- entries.";
52
+ readonly fail: "Related Requirements copy or replace this pack's rules.";
53
+ }];
54
+ export declare const STD_PACK_QUESTIONS: readonly [{
55
+ readonly id: "std.pack.screenshots-not-spec";
56
+ readonly instructions: "Is requirement.md the canonical spec, with screenshots only illustrating stated behaviour?";
57
+ readonly pass: "Every behaviour a screenshot shows is also in a business rule or use case. Images do not introduce unstated behaviour.";
58
+ readonly fail: "A screenshot or mock is the only place a behaviour is specified.";
59
+ }, {
60
+ readonly id: "std.pack.artifacts-named-referenced";
61
+ readonly instructions: "Are context/ files named {UC-id}__{purpose}.ext and referenced from the matching use case?";
62
+ readonly pass: "Existing context files follow UC-001__purpose.ext (or are pack-level and mentioned in Overview). Each is referenced. Empty context/ is fine.";
63
+ readonly fail: "A context file exists but is unnamed, unreferenced, or uses a layout other than this pack's context/ folder.";
64
+ }, {
65
+ readonly id: "std.pack.artifacts-current";
66
+ readonly instructions: "Do referenced context/ files still match the use cases they illustrate?";
67
+ readonly pass: "Filenames and mentions line up with current UC- IDs. Empty context/ is fine.";
68
+ readonly fail: "A screenshot name or caption points at a use case that no longer exists or was renamed.";
69
+ }, {
70
+ readonly id: "std.pack.association-observable";
71
+ readonly instructions: "Is the association between actor, record, and permission noticeable in rules or outcomes?";
72
+ readonly pass: "A person or test can tell which user, which record, and which role apply from Observables and Outcomes.";
73
+ readonly fail: "Association is implied ('the right user sees the right record') without a noticeable Observable.";
74
+ }, {
75
+ readonly id: "std.pack.verification-coverage";
76
+ readonly instructions: "Is every BR- and UC- exercisable through use cases or verification scenarios — not only implementation notes?";
77
+ readonly pass: "Each ID can be checked from a use case or Verification Scenarios. Notes are not the only coverage.";
78
+ readonly fail: "A rule or use case has no path a person could follow, or coverage lives only in Implementation Notes.";
79
+ }, {
80
+ readonly id: "std.pack.completeness";
81
+ readonly instructions: "Does the pack have roles, business rules, use cases, a consistent matrix, and referenced artifacts when files exist?";
82
+ readonly pass: "The pack is complete enough that an agent would not invent roles, rules, or screenshot-only behaviour.";
83
+ readonly fail: "A required piece is missing in substance, or artifacts exist without being part of the spec.";
84
+ }];
85
+ export declare function emitJevPack(spec: SpecAst, context?: JevPackContext): JevPack;
package/dist/jev-pack.js CHANGED
@@ -1,6 +1,107 @@
1
1
  import { JEV_CATALOG, SECTION_SCORE_LEVELS } from "./gates.js";
2
- export function emitJevPack(spec) {
2
+ const JEV_STATE_CLIP = 8_000;
3
+ export const STD_DOCUMENT_QUESTIONS = [
4
+ {
5
+ id: "std.document.title-names-problem",
6
+ instructions: "Does the title name the problem or capability rather than the solution?",
7
+ pass: "The # title is a problem or capability. It does not prescribe a solution or say 'the system shall'.",
8
+ fail: "The title names a solution, a stack, or a system-shall statement.",
9
+ },
10
+ {
11
+ id: "std.document.overview-intent",
12
+ instructions: "Is Overview two to four sentences of actor, capability, and outcome — not a numbered rule list?",
13
+ pass: "Overview states who, what, and the outcome. Numbered rules live under Business Rules.",
14
+ fail: "Overview is missing, or it lists rules, IDs, or implementation steps instead of intent.",
15
+ },
16
+ {
17
+ id: "std.document.definitions-glossary",
18
+ instructions: "If Definitions exist, are they glossary only — not hidden business rules?",
19
+ pass: "Definitions (if present) name terms. Behaviour is in BR- rules. Missing Definitions is fine when no glossary is needed.",
20
+ fail: "Definitions contain obligations, permissions, or exceptions that belong in Business Rules.",
21
+ },
22
+ {
23
+ id: "std.document.data-not-behaviour",
24
+ instructions: "If Data Definition exists, does it describe data rather than behaviour?",
25
+ pass: "Data Definition (if present) covers records, uniqueness, or derived fields. Behaviour is a rule or use case. Missing Data Definition is fine when data is obvious.",
26
+ fail: "Data Definition hides workflow, permissions, or observables that belong in BR- or UC- entries.",
27
+ },
28
+ {
29
+ id: "std.document.rules-atomic-observable",
30
+ instructions: "Is each business rule one atomic obligation with a noticeable Observable, and are exceptions sibling BR- rules?",
31
+ pass: "Each BR-NNN is one rule. Statement plus Observable make association (user, record, role) noticeable. Exceptions are separate IDs.",
32
+ fail: "A rule bundles multiple obligations, lacks a noticeable Observable, or buries exceptions in prose.",
33
+ },
34
+ {
35
+ id: "std.document.usecases-complete",
36
+ instructions: "Does each use case have actor, intent-named title, numbered steps, observable Outcome, and deny/empty/error paths that matter?",
37
+ pass: "UC- entries use frozen step verbs, Outcomes a person can see, and cover allow plus material deny or empty paths.",
38
+ fail: "A use case is UI-pixel named, missing Outcome, or omits a deny/empty/error path the rules imply.",
39
+ },
40
+ {
41
+ id: "std.document.matrix-allow-deny",
42
+ instructions: "Is the roles matrix complete with allow/deny only and consistent with the business rules?",
43
+ pass: "Every role and action the spec talks about appears. Cells are allow or deny. An allow cell plus a rule that hides a control is consistent.",
44
+ fail: "The matrix omits a role or action, uses other cell values, or contradicts the rules without a Look-for use case.",
45
+ },
46
+ {
47
+ id: "std.document.no-hidden-acceptance",
48
+ instructions: "Do Implementation Notes and UI notes avoid hidden acceptance criteria?",
49
+ pass: "Notes are builder hints. Anything a test would fail on lives in a business rule or use case. Missing notes is fine.",
50
+ fail: "Implementation Notes, UI notes, or similar prose is the only place an acceptance criterion appears.",
51
+ },
52
+ {
53
+ id: "std.document.related-not-restated",
54
+ instructions: "If Related Requirements exist, are they pointers rather than a restatement of this pack's rules?",
55
+ pass: "Related Requirements (if present) name other packs. This pack's obligations stay in its BR- and UC- entries.",
56
+ fail: "Related Requirements copy or replace this pack's rules.",
57
+ },
58
+ ];
59
+ export const STD_PACK_QUESTIONS = [
60
+ {
61
+ id: "std.pack.screenshots-not-spec",
62
+ instructions: "Is requirement.md the canonical spec, with screenshots only illustrating stated behaviour?",
63
+ pass: "Every behaviour a screenshot shows is also in a business rule or use case. Images do not introduce unstated behaviour.",
64
+ fail: "A screenshot or mock is the only place a behaviour is specified.",
65
+ },
66
+ {
67
+ id: "std.pack.artifacts-named-referenced",
68
+ instructions: "Are context/ files named {UC-id}__{purpose}.ext and referenced from the matching use case?",
69
+ pass: "Existing context files follow UC-001__purpose.ext (or are pack-level and mentioned in Overview). Each is referenced. Empty context/ is fine.",
70
+ fail: "A context file exists but is unnamed, unreferenced, or uses a layout other than this pack's context/ folder.",
71
+ },
72
+ {
73
+ id: "std.pack.artifacts-current",
74
+ instructions: "Do referenced context/ files still match the use cases they illustrate?",
75
+ pass: "Filenames and mentions line up with current UC- IDs. Empty context/ is fine.",
76
+ fail: "A screenshot name or caption points at a use case that no longer exists or was renamed.",
77
+ },
78
+ {
79
+ id: "std.pack.association-observable",
80
+ instructions: "Is the association between actor, record, and permission noticeable in rules or outcomes?",
81
+ pass: "A person or test can tell which user, which record, and which role apply from Observables and Outcomes.",
82
+ fail: "Association is implied ('the right user sees the right record') without a noticeable Observable.",
83
+ },
84
+ {
85
+ id: "std.pack.verification-coverage",
86
+ instructions: "Is every BR- and UC- exercisable through use cases or verification scenarios — not only implementation notes?",
87
+ pass: "Each ID can be checked from a use case or Verification Scenarios. Notes are not the only coverage.",
88
+ fail: "A rule or use case has no path a person could follow, or coverage lives only in Implementation Notes.",
89
+ },
90
+ {
91
+ id: "std.pack.completeness",
92
+ instructions: "Does the pack have roles, business rules, use cases, a consistent matrix, and referenced artifacts when files exist?",
93
+ pass: "The pack is complete enough that an agent would not invent roles, rules, or screenshot-only behaviour.",
94
+ fail: "A required piece is missing in substance, or artifacts exist without being part of the spec.",
95
+ },
96
+ ];
97
+ export function emitJevPack(spec, context = {}) {
3
98
  const questions = [];
99
+ const contextFiles = context.contextFiles ?? [];
100
+ const packStandard = clip(context.standards?.pack.text ?? "", JEV_STATE_CLIP);
101
+ const documentStandard = clip(context.standards?.document.text ?? "", JEV_STATE_CLIP);
102
+ const optionalPresent = Object.entries(spec.optional)
103
+ .filter(([, body]) => body?.trim())
104
+ .map(([name]) => name);
4
105
  for (const rule of spec.businessRules) {
5
106
  questions.push({
6
107
  id: `rule.observable.${rule.id}`,
@@ -86,21 +187,59 @@ export function emitJevPack(spec) {
86
187
  type: "noul",
87
188
  instructions: "Is this pack safe to hand to a coding agent?",
88
189
  criteria: {
89
- true: "Rules are testable, use cases match the matrix, and an agent would not have to invent behavior.",
90
- false: "An agent would have to guess, or the pack still contradicts itself.",
190
+ true: "Rules are testable, use cases match the matrix, house standards are met in substance, and an agent would not have to invent behavior.",
191
+ false: "An agent would have to guess, the pack still contradicts itself, or it ignores the house pack/document standards.",
91
192
  },
92
193
  state: {
93
194
  ruleIds: spec.businessRules.map((rule) => rule.id),
94
195
  useCaseIds: spec.useCases.map((useCase) => useCase.id),
95
196
  roles: spec.matrix.roles,
197
+ optionalPresent,
198
+ contextFiles,
199
+ markdown: clip(context.markdown ?? "", JEV_STATE_CLIP),
200
+ housePackStandard: packStandard,
201
+ houseDocumentStandard: documentStandard,
202
+ housePackPath: context.standards?.pack.path ?? "",
203
+ houseDocumentPath: context.standards?.document.path ?? "",
96
204
  },
97
205
  });
206
+ const stdState = {
207
+ title: spec.title,
208
+ ruleIds: spec.businessRules.map((rule) => rule.id),
209
+ useCaseIds: spec.useCases.map((useCase) => useCase.id),
210
+ roles: spec.matrix.roles,
211
+ optionalPresent,
212
+ contextFiles,
213
+ };
214
+ for (const item of STD_DOCUMENT_QUESTIONS) {
215
+ questions.push({
216
+ id: item.id,
217
+ type: "noul",
218
+ instructions: item.instructions,
219
+ criteria: { true: item.pass, false: item.fail },
220
+ state: stdState,
221
+ });
222
+ }
223
+ for (const item of STD_PACK_QUESTIONS) {
224
+ questions.push({
225
+ id: item.id,
226
+ type: "noul",
227
+ instructions: item.instructions,
228
+ criteria: { true: item.pass, false: item.fail },
229
+ state: stdState,
230
+ });
231
+ }
98
232
  return {
99
233
  requirementId: spec.requirementId,
100
234
  catalog: JEV_CATALOG,
101
235
  questions,
102
236
  };
103
237
  }
238
+ function clip(text, max) {
239
+ if (text.length <= max)
240
+ return text;
241
+ return `${text.slice(0, max)}\n…[truncated]`;
242
+ }
104
243
  function sectionScore(section, body) {
105
244
  const slug = section.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
106
245
  return {
package/dist/jev.d.ts CHANGED
@@ -20,4 +20,13 @@ export declare function createMockJevClient(overrides?: {
20
20
  choice?: string;
21
21
  score?: Record<string, number>;
22
22
  }): JevClient;
23
+ /** Jev default is 64k tokens per request / 32k per question. Over this, send the long-context header. */
24
+ export declare const TYPESAFE_LONG_CONTEXT_CHARS = 80000;
25
+ export declare function buildTypeSafeRequest(pack: JevPack): {
26
+ model: string;
27
+ state: Record<string, unknown>;
28
+ questions: Record<string, Record<string, unknown>>;
29
+ };
30
+ export declare function typeSafeRequestHeaders(apiKey: string, bodyLength: number): Record<string, string>;
31
+ export declare function typeSafeErrorMessage(raw: Record<string, unknown>, status: number): string;
23
32
  export declare function createTypeSafeJevClient(apiKey: string, fetchImpl?: typeof fetch): JevClient;
package/dist/jev.js CHANGED
@@ -72,30 +72,100 @@ function noulByPrefix(map, id) {
72
72
  const hit = Object.keys(map).find((key) => id.startsWith(key));
73
73
  return hit ? map[hit] : undefined;
74
74
  }
75
+ /** Jev default is 64k tokens per request / 32k per question. Over this, send the long-context header. */
76
+ export const TYPESAFE_LONG_CONTEXT_CHARS = 80_000;
77
+ const SHARED_STATE_KEYS = ["markdown", "housePackStandard", "houseDocumentStandard"];
78
+ export function buildTypeSafeRequest(pack) {
79
+ const questions = {};
80
+ const items = {};
81
+ const shared = {};
82
+ for (const question of pack.questions) {
83
+ questions[question.id] = {
84
+ type: question.type,
85
+ instructions: question.instructions,
86
+ ...(question.criteria !== undefined ? { criteria: question.criteria } : {}),
87
+ };
88
+ const item = { ...question.state };
89
+ for (const key of SHARED_STATE_KEYS) {
90
+ const value = item[key];
91
+ if (typeof value === "string" && value.length > 0) {
92
+ if (typeof shared[key] !== "string")
93
+ shared[key] = value;
94
+ delete item[key];
95
+ }
96
+ }
97
+ items[question.id] = item;
98
+ }
99
+ return {
100
+ model: JEV_MODEL,
101
+ state: {
102
+ catalog: pack.catalog,
103
+ requirementId: pack.requirementId,
104
+ ...shared,
105
+ items,
106
+ },
107
+ questions,
108
+ };
109
+ }
110
+ export function typeSafeRequestHeaders(apiKey, bodyLength) {
111
+ const headers = {
112
+ Authorization: `Bearer ${apiKey}`,
113
+ "Content-Type": "application/json",
114
+ };
115
+ if (bodyLength >= TYPESAFE_LONG_CONTEXT_CHARS) {
116
+ headers["TypeSafe-Danger-Zone-Long-Context"] = "true";
117
+ }
118
+ return headers;
119
+ }
120
+ export function typeSafeErrorMessage(raw, status) {
121
+ const formatted = formatTypeSafeDetail(raw.detail) ?? formatTypeSafeDetail(raw.error);
122
+ if (!formatted)
123
+ return `TypeSafe System One returned HTTP ${status}.`;
124
+ return formatted.startsWith("TypeSafe ") ? formatted : `TypeSafe System One: ${formatted}`;
125
+ }
126
+ function formatTypeSafeDetail(detail) {
127
+ if (typeof detail === "string" && detail.trim())
128
+ return detail.trim();
129
+ if (Array.isArray(detail)) {
130
+ const parts = detail
131
+ .map((entry) => {
132
+ if (typeof entry === "string")
133
+ return entry.trim();
134
+ if (!entry || typeof entry !== "object")
135
+ return "";
136
+ const row = entry;
137
+ const msg = typeof row.msg === "string" ? row.msg : typeof row.message === "string" ? row.message : "";
138
+ const loc = Array.isArray(row.loc)
139
+ ? row.loc.filter((part) => typeof part === "string" || typeof part === "number").join(".")
140
+ : "";
141
+ if (loc && msg)
142
+ return `${loc}: ${msg}`;
143
+ return msg.trim();
144
+ })
145
+ .filter(Boolean);
146
+ if (parts.length)
147
+ return parts.join("; ");
148
+ }
149
+ if (detail && typeof detail === "object") {
150
+ const body = detail;
151
+ if (typeof body.message === "string" && body.message.trim())
152
+ return body.message.trim();
153
+ if (typeof body.detail === "string" && body.detail.trim())
154
+ return body.detail.trim();
155
+ if (typeof body.error === "string" && body.error.trim())
156
+ return body.error.trim();
157
+ }
158
+ return undefined;
159
+ }
75
160
  export function createTypeSafeJevClient(apiKey, fetchImpl = fetch) {
76
161
  return {
77
162
  async judge(pack) {
78
- const questions = {};
79
- const combinedState = {};
80
- for (const question of pack.questions) {
81
- questions[question.id] = {
82
- type: question.type,
83
- instructions: question.instructions,
84
- ...(question.criteria !== undefined ? { criteria: question.criteria } : {}),
85
- };
86
- combinedState[question.id] = question.state;
87
- }
163
+ const payload = buildTypeSafeRequest(pack);
164
+ const body = JSON.stringify(payload);
88
165
  const response = await fetchImpl(JEV_ENDPOINT, {
89
166
  method: "POST",
90
- headers: {
91
- Authorization: `Bearer ${apiKey}`,
92
- "Content-Type": "application/json",
93
- },
94
- body: JSON.stringify({
95
- model: JEV_MODEL,
96
- state: { catalog: pack.catalog, requirementId: pack.requirementId, items: combinedState },
97
- questions,
98
- }),
167
+ headers: typeSafeRequestHeaders(apiKey, body.length),
168
+ body,
99
169
  });
100
170
  const text = await response.text();
101
171
  let raw = {};
@@ -108,13 +178,7 @@ export function createTypeSafeJevClient(apiKey, fetchImpl = fetch) {
108
178
  }
109
179
  }
110
180
  if (!response.ok) {
111
- const nested = raw.error;
112
- const message = typeof nested === "string"
113
- ? nested
114
- : nested && typeof nested === "object" && typeof nested.message === "string"
115
- ? nested.message
116
- : `TypeSafe System One returned HTTP ${response.status}.`;
117
- throw new JevRequestError(message, response.status);
181
+ throw new JevRequestError(typeSafeErrorMessage(raw, response.status), response.status);
118
182
  }
119
183
  const answers = extractAnswers(raw);
120
184
  return pack.questions.map((question) => normalizeAnswer(question.id, question.type, answers[question.id]));
package/dist/pack.d.ts CHANGED
@@ -34,6 +34,10 @@ export type PackPaths = {
34
34
  context: string;
35
35
  authorBrief: string;
36
36
  authorRun: string;
37
+ implementPlan: string;
38
+ implementPlanState: string;
39
+ implementPlanBrief: string;
40
+ implementPlans: string;
37
41
  };
38
42
  export declare function packPaths(root: string): PackPaths;
39
43
  export declare function withRememberedAnswers(paths: PackPaths, prompt: string): Promise<string>;
@@ -53,14 +57,17 @@ export declare function persistDerived(paths: PackPaths, result: CompileResult):
53
57
  export declare function createPack(root: string): Promise<PackPaths>;
54
58
  export declare function deletePack(paths: PackPaths): Promise<void>;
55
59
  export declare function writeRuntimeStubIfMissing(paths: PackPaths): Promise<boolean>;
56
- export declare function implementPack(paths: PackPaths, options?: {
60
+ type ImplementLaunchOptions = {
57
61
  adapter?: AdapterId;
58
62
  stack?: string;
59
63
  fromProof?: boolean;
60
64
  onLogLine?: (line: string) => void;
61
65
  extraPrompt?: string;
62
66
  resume?: boolean;
63
- }): Promise<{
67
+ /** Resume the coding agent after implement-channel questions. */
68
+ code?: boolean;
69
+ };
70
+ export declare function implementPack(paths: PackPaths, options?: ImplementLaunchOptions): Promise<{
64
71
  result: CompileResult;
65
72
  message: string;
66
73
  launch?: LaunchAdapterResult;
@@ -68,6 +75,7 @@ export declare function implementPack(paths: PackPaths, options?: {
68
75
  export declare function finishImplement(paths: PackPaths, launch: LaunchAdapterResult, adapter: AdapterId): Promise<{
69
76
  result: CompileResult;
70
77
  message: string;
78
+ launch?: LaunchAdapterResult;
71
79
  }>;
72
80
  export declare class StopImplementLockedError extends Error {
73
81
  readonly code = "stop_implement_gate";
@@ -134,13 +142,13 @@ export declare function answerAgentQuestions(paths: PackPaths, answers: Record<s
134
142
  }): Promise<{
135
143
  result: CompileResult;
136
144
  message: string;
137
- channel: "author" | "improve" | "implement";
145
+ channel: "author" | "improve" | "implement" | "plan";
138
146
  launch?: LaunchAdapterResult;
139
147
  }>;
140
148
  export declare function discardAgentQuestions(paths: PackPaths, launch: LaunchAdapterResult | null): Promise<{
141
149
  result: CompileResult;
142
150
  message: string;
143
- channel: "author" | "improve" | "implement";
151
+ channel: "author" | "improve" | "implement" | "plan";
144
152
  }>;
145
153
  export declare function improvePack(paths: PackPaths, options?: {
146
154
  adapter?: AdapterId;