ndrstnd 0.1.0 → 0.1.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.
@@ -188,7 +188,7 @@ function validateStepPlan(document, input, meaningfulEvidence) {
188
188
  }
189
189
  export function analysisPrompt(input, conversation) {
190
190
  const reviewInput = buildPromptReviewInput(input, conversation);
191
- return `You are ndrstnd, a comprehension assistant. Explain a branch without critiquing it or proposing changes. Prioritize the implementation story and behavior changes. Return compact minified JSON only with this shape: {s,c:[[id,title,kind,synopsis,before|null,after|null,confidence,attention,riskCategories,evidenceIds]],t:[[id,title,goal,youNowHave,[[concern,resolvedByStepId|null]],dependsOn,forwardRefs,advancesChapterIds,evidenceIds]],o:[[title,reason,evidenceIds]],u:[evidenceId],f:{evidenceId:[[startLine,endLine]]},x:[[command,outcome,summary,source]]}. Allowed kind values are exactly feature, decision, behavior, non_functional, risk, test, other. Confidence is high, medium, or low. Attention is low, contained, elevated, high, or critical. Risk categories are formatting, refactor, behavior, performance, security. Use only listed evidence IDs. Every meaningful evidence ID must appear exactly once in c, o, or u, and exactly once in t. Group every low-signal evidence ID into an omitted group in o with a concise reason such as lockfile churn or generated output; u is a last resort for evidence that truly cannot be classified. f drives the Evidence zoom excerpts: for every evidence ID used in c, list 1-3 [startLine,endLine] ranges of new-file line numbers marking the exact lines a reviewer must read first - the load-bearing statements, not whole hunks, imports, or boilerplate. Each range must fall inside that hunk's new-file lines; inspect the patch to choose them precisely. x reports test or build runs that were actually observed: when the conversation or repository shows a command and its result, add [command,outcome,summary,source] with outcome passed, failed, mixed, or unknown and source conversation or repository. Omit x entirely when no run was observed - never invent execution evidence.
191
+ return `You are ndrstnd, a comprehension assistant. Explain a branch without critiquing it or proposing changes. Prioritize the implementation story and behavior changes. Return compact minified JSON only with this shape: {s,c:[[id,title,kind,synopsis,before|null,after|null,confidence,attention,riskCategories,evidenceIds]],t:[[id,title,goal,youNowHave,[[concern,resolvedByStepId|null]],dependsOn,forwardRefs,advancesChapterIds,evidenceIds]],o:[[title,reason,evidenceIds]],u:[evidenceId],f:{evidenceId:[[startLine,endLine]]},x:[[command,outcome,summary,source]]}. In each c tuple, position 3 is kind and may be exactly feature, decision, behavior, non_functional, risk, test, or other; position 9 is riskCategories and may contain only formatting, refactor, behavior, performance, or security. Confidence is high, medium, or low. Attention is low, contained, elevated, high, or critical. Use only listed evidence IDs. Every meaningful evidence ID must appear exactly once in c, o, or u, and exactly once in t. Group every low-signal evidence ID into an omitted group in o with a concise reason such as lockfile churn or generated output; u is a last resort for evidence that truly cannot be classified. f drives the Evidence zoom excerpts: for every evidence ID used in c, list 1-3 [startLine,endLine] ranges of new-file line numbers marking the exact lines a reviewer must read first - the load-bearing statements, not whole hunks, imports, or boilerplate. Each range must fall inside that hunk's new-file lines; inspect the patch to choose them precisely. x reports test or build runs that were actually observed: when the conversation or repository shows a command and its result, add [command,outcome,summary,source] with outcome passed, failed, mixed, or unknown and source conversation or repository. Omit x entirely when no run was observed - never invent execution evidence.
192
192
 
193
193
  Prose depth is validated and out-of-range fields are rejected, so hit these word counts: summary ${PROSE_WORD_RANGES.summary.min}-${PROSE_WORD_RANGES.summary.max} words; each synopsis ${PROSE_WORD_RANGES.synopsis.min}-${PROSE_WORD_RANGES.synopsis.max} words across two or three sentences explaining what changed, how it works, and why it matters; before and after ${PROSE_WORD_RANGES.beforeAfter.min}-${PROSE_WORD_RANGES.beforeAfter.max} words each describing concrete observable behavior; each step goal ${PROSE_WORD_RANGES.goal.min}-${PROSE_WORD_RANGES.goal.max} words stating the intent and mechanism; each youNowHave ${PROSE_WORD_RANGES.youNowHave.min}-${PROSE_WORD_RANGES.youNowHave.max} words stating the capability that now exists. Titles stay under 10 words. Name the actual functions, types, and files involved. Never answer with a single vague sentence, and never pad - every sentence must add information a reviewer can act on.
194
194
 
@@ -51,5 +51,52 @@ export declare function analyzeWithAgent(agent: ReviewAgent, input: CollectedRev
51
51
  source: "conversation" | "repository";
52
52
  }[] | undefined;
53
53
  }>;
54
+ /** Parses one complete agent response while retaining which boundary failed for repair and CLI diagnostics. */
55
+ export declare function parseAnalysisResponse(response: string, input: CollectedReviewInput, focus?: "require" | "salvage"): {
56
+ summary: string;
57
+ chapters: {
58
+ id: string;
59
+ title: string;
60
+ kind: "behavior" | "feature" | "decision" | "non_functional" | "risk" | "test" | "other";
61
+ synopsis: string;
62
+ confidence: "low" | "high" | "medium";
63
+ attention: "low" | "contained" | "elevated" | "high" | "critical";
64
+ riskCategories: ("formatting" | "refactor" | "behavior" | "performance" | "security")[];
65
+ evidenceIds: string[];
66
+ before?: string | undefined;
67
+ after?: string | undefined;
68
+ }[];
69
+ steps: {
70
+ id: string;
71
+ title: string;
72
+ evidenceIds: string[];
73
+ goal: string;
74
+ youNowHave: string;
75
+ deferred: {
76
+ concern: string;
77
+ resolvedByStepId?: string | undefined;
78
+ }[];
79
+ dependsOn: string[];
80
+ forwardRefs: Record<string, string>;
81
+ advancesChapterIds: string[];
82
+ }[];
83
+ omittedGroups: {
84
+ reason: string;
85
+ title: string;
86
+ evidenceIds: string[];
87
+ }[];
88
+ unclassifiedEvidenceIds: string[];
89
+ focus?: Record<string, {
90
+ end: number;
91
+ start: number;
92
+ }[]> | undefined;
93
+ testExecution?: {
94
+ command: string;
95
+ outcome: "unknown" | "passed" | "failed" | "mixed";
96
+ summary: string;
97
+ source: "conversation" | "repository";
98
+ }[] | undefined;
99
+ };
100
+ export declare function analysisRepairPrompt(problem: string): string;
54
101
  /** One reviewer-facing liveness line, printed on an interval so a long quiet analysis is never mistaken for a hang. */
55
102
  export declare function formatAnalysisHeartbeat(agentName: string, elapsedMs: number, activity: TurnActivity | undefined, sinceActivityMs?: number): string;
@@ -10,14 +10,14 @@ export async function analyzeWithAgent(agent, input, conversation, progress) {
10
10
  let lastError = "";
11
11
  for (let attempt = 0; attempt <= REPAIR_ATTEMPTS; attempt += 1) {
12
12
  try {
13
- return parseAnalysisDocument(JSON.parse(extractJson(response)), input, { focus: attempt === REPAIR_ATTEMPTS ? "salvage" : "require" });
13
+ return parseAnalysisResponse(response, input, attempt === REPAIR_ATTEMPTS ? "salvage" : "require");
14
14
  }
15
15
  catch (error) {
16
16
  lastError = error instanceof Error ? error.message : String(error);
17
17
  if (attempt === REPAIR_ATTEMPTS)
18
18
  break;
19
19
  progress?.onRepair?.(attempt + 1, REPAIR_ATTEMPTS, lastError);
20
- response = await thread.send(`Your prior response failed validation: ${lastError} Return only the corrected JSON document, with every other field kept as it was.`, progress?.onActivity);
20
+ response = await thread.send(analysisRepairPrompt(lastError), progress?.onActivity);
21
21
  }
22
22
  }
23
23
  throw new Error(`${agent.name} produced an analysis that still failed validation after ${REPAIR_ATTEMPTS} repair turns: ${lastError}`);
@@ -27,6 +27,41 @@ export async function analyzeWithAgent(agent, input, conversation, progress) {
27
27
  }
28
28
  });
29
29
  }
30
+ /** Parses one complete agent response while retaining which boundary failed for repair and CLI diagnostics. */
31
+ export function parseAnalysisResponse(response, input, focus = "require") {
32
+ const extracted = extractJson(response);
33
+ let value;
34
+ try {
35
+ value = JSON.parse(extracted);
36
+ }
37
+ catch (error) {
38
+ throw new Error(`JSON parsing failed: ${jsonParseDiagnostic(error)} Response metadata: ${responseMetadata(response, extracted)}.`);
39
+ }
40
+ try {
41
+ return parseAnalysisDocument(value, input, { focus });
42
+ }
43
+ catch (error) {
44
+ const reason = error instanceof Error ? error.message : String(error);
45
+ const phase = reason.startsWith("Analysis document did not match") ? "wire document validation" : "review invariant validation";
46
+ throw new Error(`${phase} failed: ${reason} Response metadata: ${responseMetadata(response, extracted)}.`);
47
+ }
48
+ }
49
+ export function analysisRepairPrompt(problem) {
50
+ return `Your prior response failed during analysis document validation. Fix the specific problem below and return only one valid minified JSON object; do not return Markdown, commentary, or a partial document.
51
+
52
+ Problem: ${problem}
53
+
54
+ The compact shape is {s,c:[[id,title,kind,synopsis,before|null,after|null,confidence,attention,riskCategories,evidenceIds]],t:[[id,title,goal,youNowHave,[[concern,resolvedByStepId|null]],dependsOn,forwardRefs,advancesChapterIds,evidenceIds]],o:[[title,reason,evidenceIds]],u:[evidenceId],f:{evidenceId:[[startLine,endLine]]},x:[[command,outcome,summary,source]]}. In c, position 3 is kind and may be feature, decision, behavior, non_functional, risk, test, or other; position 9 is riskCategories and may contain only formatting, refactor, behavior, performance, or security. Use only evidence IDs from the original review input manifest, preserve valid fields, and correct every issue named above.`;
55
+ }
56
+ function responseMetadata(response, extracted) {
57
+ return `response ${response.length} characters; extracted candidate ${extracted.length} characters; fenced=${response.includes("```")}; candidateStartsWithObject=${extracted.trimStart().startsWith("{")}`;
58
+ }
59
+ function jsonParseDiagnostic(error) {
60
+ const message = error instanceof Error ? error.message : String(error);
61
+ const token = message.match(/Unexpected token[^,]*/)?.[0];
62
+ const position = message.match(/at position \d+/)?.[0];
63
+ return [token, position].filter((part) => part !== undefined).join(" ") || "invalid JSON document";
64
+ }
30
65
  /** One reviewer-facing liveness line, printed on an interval so a long quiet analysis is never mistaken for a hang. */
31
66
  export function formatAnalysisHeartbeat(agentName, elapsedMs, activity, sinceActivityMs) {
32
67
  if (activity === undefined)
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/server/analyze.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEnG,MAAM,eAAe,GAAG,CAAC,CAAC;AAO1B,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,KAAkB,EAAE,KAA2B,EAAE,YAAkC,EAAE,QAA2B;IACrJ,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACnD,OAAO,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAClD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CA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;QACvG,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,EAAE,CAAC;QACzB,CAAC;QAAC,OAAO,UAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,uCAAuC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC;QACvJ,CAAC;IACH,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ndrstnd",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -16,7 +16,9 @@
16
16
  "build": "tsc -p tsconfig.json",
17
17
  "typecheck": "tsc -p tsconfig.json --noEmit",
18
18
  "test": "vitest run --dir test",
19
+ "pretest": "npm run rebuild:native",
19
20
  "test:watch": "vitest --dir test",
21
+ "rebuild:native": "npm rebuild better-sqlite3",
20
22
  "lint": "npm run typecheck",
21
23
  "prepublishOnly": "npm run lint && npm test && npm run build",
22
24
  "preview:fixture": "tsx src/server/preview-fixture.ts"