aiki-cli 0.3.3 → 0.3.5

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/README.md CHANGED
@@ -199,7 +199,7 @@ Upgrade an existing installation:
199
199
 
200
200
  ```bash
201
201
  npm install -g aiki-cli@latest
202
- aiki --version # 0.3.3
202
+ aiki --version # 0.3.4
203
203
  ```
204
204
 
205
205
  From source:
@@ -1,4 +1,4 @@
1
- import { ActionPlan, JudgeReport, QuickDecisionModel, readerBriefIssues, } from '../schemas/index.js';
1
+ import { ActionPlan, JudgeReport, QuickDecisionModel, readerBriefIssues, salvageIdeaRoleOutputModel, } from '../schemas/index.js';
2
2
  import { jsonCall } from './jsonStage.js';
3
3
  const QUICK_PROMPT = `ROLE: Single decision analyst. This is explicit QUICK mode, not a multi-model
4
4
  council. Give one strong structured analysis and do not claim independent consensus or verification.{{SKILL}}
@@ -9,8 +9,23 @@ EVIDENCE PACK MANIFEST: {{EVIDENCE_PACK_JSON}}
9
9
 
10
10
  Output ONLY JSON:
11
11
  {
12
- "analysis": <the idea analyst object: task_echo, strongest_version, positions, evidence,
13
- calculations, coverage, decision_questions, deliverable_proposals>,
12
+ "analysis": <the idea analyst object with EXACTLY these fields:
13
+ task_echo: restate the task in ≤2 sentences.
14
+ strongest_version: the best honest version of this idea in ≤150 words.
15
+ positions: [{local_id, proposition, dimension_id, stance SUPPORT|OPPOSE|MIXED|UNKNOWN,
16
+ basis EVIDENCE|INFERENCE|ASSUMPTION, nature FACTUAL|JUDGMENT, load_bearing,
17
+ if_false STOP|PIVOT|CONDITION|MINOR, reasoning, evidence_ids, depends_on}]
18
+ evidence: [{id, claim_supported, source_kind USER|PRIMARY|SECONDARY|MODEL_KNOWLEDGE (exact token),
19
+ support SUPPORTS|CONTRADICTS|CONTEXT_ONLY, freshness CURRENT|DATED|UNKNOWN (exact token),
20
+ locator/url, accessed_at for current external sources}]. MODEL_KNOWLEDGE freshness is UNKNOWN.
21
+ calculations: [] or per derived numeric claim {id, claim_id, inputs: [{id,name,value,unit,evidence_ids}],
22
+ steps: [{id,operation ADD|SUBTRACT|MULTIPLY|DIVIDE,left,right,result,unit}], result_step}
23
+ coverage: one entry per rubric dimension {dimension_id, status COVERED|NOT_APPLICABLE,
24
+ position_ids ([] when none), rationale (required for NOT_APPLICABLE)} — no other keys.
25
+ decision_questions: [{question, claim_ids}]
26
+ deliverable_proposals: [] unless requested_outputs asks for FEATURE_BACKLOG or IMPLEMENTATION_PLAN,
27
+ then [{output FEATURE_BACKLOG|IMPLEMENTATION_PLAN, title, detail, user_value, why_distinctive, evidence_ids}].
28
+ Use ONLY these field names — no extra or renamed keys anywhere in analysis.>,
14
29
  "verdict": "<2-5 sentence decision and core reason>",
15
30
  "recommendation": "PROCEED|PROCEED_WITH_CONDITIONS|PIVOT|STOP",
16
31
  "conditions": ["<only for PROCEED_WITH_CONDITIONS>"],
@@ -44,7 +59,12 @@ export function buildAdaptivePrompt(contract, inputPath, evidencePack, skill) {
44
59
  }
45
60
  export async function s4QuickAnalyze(ctx, prompt, opts = {}) {
46
61
  const provider = ctx.roles.judge;
47
- const decision = await jsonCall(ctx, ctx.handle(provider), opts.stage ?? 'Q1', prompt, QuickDecisionModel);
62
+ const decision = await jsonCall(ctx, ctx.handle(provider), opts.stage ?? 'Q1', prompt, QuickDecisionModel, {
63
+ // Same deterministic last resort as council S4, applied to the nested analysis object.
64
+ salvage: (json) => (json && typeof json === 'object' && !Array.isArray(json)
65
+ ? { ...json, analysis: salvageIdeaRoleOutputModel(json.analysis) }
66
+ : json),
67
+ });
48
68
  const output = { workflow: 'idea-refinement', ...decision.analysis };
49
69
  if (opts.persist !== false)
50
70
  await ctx.writer.writeRoleOutput(provider, output);
@@ -481,6 +481,7 @@ function canonicalizeIdeaRoleOutputModel(input) {
481
481
  const evidence = item;
482
482
  return {
483
483
  ...evidence,
484
+ source_kind: canonicalEnum(evidence.source_kind, ['USER', 'PRIMARY', 'SECONDARY', 'MODEL_KNOWLEDGE'], { USER_MATERIAL: 'USER' }), // observed live in a Q1 quick run
484
485
  support: canonicalEnumLeadingToken(evidence.support, ['SUPPORTS', 'CONTRADICTS', 'CONTEXT_ONLY'], { SUPPORT: 'SUPPORTS', OPPOSES: 'CONTRADICTS', OPPOSE: 'CONTRADICTS' }),
485
486
  freshness: canonicalEnum(evidence.freshness, ['CURRENT', 'DATED', 'UNKNOWN']),
486
487
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiki-cli",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Local-first AI model council for code review and idea stress-testing using Claude Code, Codex, and Gemini/Antigravity CLIs. No API keys.",
5
5
  "type": "module",
6
6
  "license": "MIT",