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 +1 -1
- package/dist/orchestration/quick-analysis.js +24 -4
- package/dist/schemas/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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
|
|
13
|
-
|
|
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);
|
package/dist/schemas/index.js
CHANGED
|
@@ -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