@buildaharness/aielia 0.3.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/README.md +832 -0
- package/dist/action-approval-service.d.ts +52 -0
- package/dist/action-snapshot.d.ts +173 -0
- package/dist/action-tools.d.ts +38 -0
- package/dist/agent-loop.d.ts +372 -0
- package/dist/answer-claim.d.ts +51 -0
- package/dist/ask-clarification-service.d.ts +70 -0
- package/dist/ask-mode-flag.d.ts +25 -0
- package/dist/ask-response-format.d.ts +8 -0
- package/dist/assistant-session.d.ts +267 -0
- package/dist/assistant-source.d.ts +14 -0
- package/dist/assistant-types.d.ts +158 -0
- package/dist/assistant.d.ts +419 -0
- package/dist/batch-list-detector.d.ts +15 -0
- package/dist/batch-research-fixtures.d.ts +50 -0
- package/dist/benchmark-injected-failure.d.ts +27 -0
- package/dist/claude-cli-llm-client.d.ts +139 -0
- package/dist/claude-cli-prompt.d.ts +86 -0
- package/dist/cli-config.d.ts +27 -0
- package/dist/cli-session-D0uLdT2A.js +7863 -0
- package/dist/cli-session-D0uLdT2A.js.map +1 -0
- package/dist/cli-session.d.ts +63 -0
- package/dist/cli.d.ts +65 -0
- package/dist/cli.js +1693 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +175 -0
- package/dist/contradiction-checker.d.ts +27 -0
- package/dist/debug-log.d.ts +16 -0
- package/dist/decomposition-classifier.d.ts +38 -0
- package/dist/doctor-checks.d.ts +8 -0
- package/dist/email-smtp.d.ts +19 -0
- package/dist/email.d.ts +60 -0
- package/dist/error-classifier.d.ts +13 -0
- package/dist/execution-mode.d.ts +85 -0
- package/dist/fact-extraction.d.ts +143 -0
- package/dist/failure-mode-matcher.d.ts +32 -0
- package/dist/file-tools-mcp-server.mjs +1027 -0
- package/dist/file-tools.d.ts +179 -0
- package/dist/first-run.d.ts +22 -0
- package/dist/harness-bridge.d.ts +103 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +212 -0
- package/dist/index.js.map +1 -0
- package/dist/ink-test-render.d.ts +24 -0
- package/dist/lexical/patterns/batch-list-markers.json +8 -0
- package/dist/lexical/patterns/batch-list-markers.json.d.ts +11 -0
- package/dist/lexical/patterns/coding-fact-markers.json +8 -0
- package/dist/lexical/patterns/coding-fact-markers.json.d.ts +11 -0
- package/dist/lexical/patterns/enumeration-markers.json +20 -0
- package/dist/lexical/patterns/enumeration-markers.json.d.ts +23 -0
- package/dist/lexical/patterns/fact-markers.json +16 -0
- package/dist/lexical/patterns/fact-markers.json.d.ts +19 -0
- package/dist/lexical/patterns/injection-patterns.json +20 -0
- package/dist/lexical/patterns/injection-patterns.json.d.ts +23 -0
- package/dist/lexical/patterns/plan-mode-markers.json +10 -0
- package/dist/lexical/patterns/plan-mode-markers.json.d.ts +13 -0
- package/dist/lexical/patterns/risk-patterns.json +122 -0
- package/dist/lexical/patterns/risk-patterns.json.d.ts +125 -0
- package/dist/lexical/patterns/task-cancel-markers.json +22 -0
- package/dist/lexical/patterns/task-cancel-markers.json.d.ts +25 -0
- package/dist/lexical/patterns/template-keywords.json +20 -0
- package/dist/lexical/patterns/template-keywords.json.d.ts +23 -0
- package/dist/lexical/patterns/tool-yield-markers.json +22 -0
- package/dist/lexical/patterns/tool-yield-markers.json.d.ts +25 -0
- package/dist/lexical/patterns.d.ts +64 -0
- package/dist/memory-service.d.ts +219 -0
- package/dist/model-pricing.d.ts +19 -0
- package/dist/network-containment.d.ts +21 -0
- package/dist/node-config-store.d.ts +29 -0
- package/dist/node-display-names.d.ts +26 -0
- package/dist/node-fs-backend.d.ts +8 -0
- package/dist/non-interactive-mode.d.ts +22 -0
- package/dist/one-loop-flag.d.ts +38 -0
- package/dist/plan-approval-service.d.ts +62 -0
- package/dist/plan-builder.d.ts +32 -0
- package/dist/plan-drafting-service.d.ts +87 -0
- package/dist/plan-drafting.d.ts +58 -0
- package/dist/plan-mode-flag.d.ts +34 -0
- package/dist/plan-service.d.ts +61 -0
- package/dist/plan-sketch-service.d.ts +24 -0
- package/dist/plan-sketch.d.ts +20 -0
- package/dist/plan-store.d.ts +232 -0
- package/dist/plan-templates/data/content_creation.json.d.ts +75 -0
- package/dist/plan-templates/data/decision_making.json.d.ts +66 -0
- package/dist/plan-templates/data/problem_solving.json.d.ts +75 -0
- package/dist/plan-templates/data/process_improvement.json.d.ts +57 -0
- package/dist/plan-templates/data/project_planning.json.d.ts +66 -0
- package/dist/plan-templates/data/research_analysis.json.d.ts +66 -0
- package/dist/plan-templates/data/trip_planning.json.d.ts +66 -0
- package/dist/plan-templates/index.d.ts +33 -0
- package/dist/plan-verification.d.ts +31 -0
- package/dist/reminder-tools.d.ts +13 -0
- package/dist/response-service.d.ts +73 -0
- package/dist/review-checker.d.ts +22 -0
- package/dist/risk-classifier.d.ts +7 -0
- package/dist/scripted-llm-client.d.ts +37 -0
- package/dist/semantic-criterion-coverage.d.ts +30 -0
- package/dist/shell-executor.d.ts +14 -0
- package/dist/shell-tools.d.ts +84 -0
- package/dist/spend-cap.d.ts +41 -0
- package/dist/spike.d.ts +1 -0
- package/dist/spike.js +18 -0
- package/dist/spike.js.map +1 -0
- package/dist/supervisor-decider.d.ts +3 -0
- package/dist/system-prompt.d.ts +8 -0
- package/dist/task-mapping.d.ts +42 -0
- package/dist/tool-control-plane.d.ts +67 -0
- package/dist/tool-policy.d.ts +45 -0
- package/dist/tool-step.d.ts +23 -0
- package/dist/tool-yield-classifier.d.ts +7 -0
- package/dist/trace-events.d.ts +126 -0
- package/dist/transcript-compaction.d.ts +13 -0
- package/dist/trust-tagging.d.ts +38 -0
- package/dist/tui-app-DxLPSGh2.js +481 -0
- package/dist/tui-app-DxLPSGh2.js.map +1 -0
- package/dist/tui-app.d.ts +125 -0
- package/dist/tui-input.d.ts +51 -0
- package/dist/tui-mode-flag.d.ts +36 -0
- package/dist/tui-output-capture.d.ts +30 -0
- package/dist/tui-spike.d.ts +1 -0
- package/dist/turn-intent-classifier.d.ts +96 -0
- package/dist/turn-interpreter.d.ts +71 -0
- package/dist/turn-policy.d.ts +45 -0
- package/dist/web-fetch-core.d.ts +65 -0
- package/dist/web-search-provider.d.ts +12 -0
- package/dist/web-tools.d.ts +26 -0
- package/package.json +69 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "decision_making",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"success_criteria": "A decision is made, documented with full rationale, and communicated to stakeholders.",
|
|
5
|
+
"tags": ["decision", "evaluation", "criteria"],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "define_criteria",
|
|
9
|
+
"title": "Define decision criteria",
|
|
10
|
+
"description": "List the criteria that will govern the decision. Assign relative weights. Confirm with decision owners.",
|
|
11
|
+
"depends_on": [],
|
|
12
|
+
"risk_level": "MEDIUM",
|
|
13
|
+
"abstraction_level": 0,
|
|
14
|
+
"parallel_write_domains": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "identify_options",
|
|
18
|
+
"title": "Identify options",
|
|
19
|
+
"description": "Generate a complete list of candidate options. Include at least one 'do nothing' option for baseline.",
|
|
20
|
+
"depends_on": ["define_criteria"],
|
|
21
|
+
"risk_level": "LOW",
|
|
22
|
+
"abstraction_level": 1,
|
|
23
|
+
"parallel_write_domains": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "evaluate_options",
|
|
27
|
+
"title": "Evaluate options",
|
|
28
|
+
"description": "Score each option against the weighted criteria. Document evidence for each score.",
|
|
29
|
+
"depends_on": ["identify_options"],
|
|
30
|
+
"risk_level": "MEDIUM",
|
|
31
|
+
"abstraction_level": 1,
|
|
32
|
+
"parallel_write_domains": ["evaluation"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "stakeholder_check",
|
|
36
|
+
"title": "Stakeholder check",
|
|
37
|
+
"description": "Validate options against stakeholder constraints and political considerations not captured in criteria.",
|
|
38
|
+
"depends_on": ["identify_options"],
|
|
39
|
+
"risk_level": "MEDIUM",
|
|
40
|
+
"abstraction_level": 1,
|
|
41
|
+
"parallel_write_domains": ["stakeholders"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "select",
|
|
45
|
+
"title": "Select",
|
|
46
|
+
"description": "Choose the winning option based on evaluation scores and stakeholder input. Record the final decision.",
|
|
47
|
+
"depends_on": ["evaluate_options", "stakeholder_check"],
|
|
48
|
+
"risk_level": "HIGH",
|
|
49
|
+
"abstraction_level": 0,
|
|
50
|
+
"parallel_write_domains": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "document_rationale",
|
|
54
|
+
"title": "Document rationale",
|
|
55
|
+
"description": "Write a decision record: what was decided, why, what was rejected and why, and who approved.",
|
|
56
|
+
"depends_on": ["select"],
|
|
57
|
+
"risk_level": "LOW",
|
|
58
|
+
"abstraction_level": 0,
|
|
59
|
+
"parallel_write_domains": []
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"metadata": { "author": "buildaharness", "created": "2026-06-22" }
|
|
63
|
+
}
|
|
64
|
+
;
|
|
65
|
+
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "problem_solving",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"success_criteria": "The problem is resolved, the chosen approach has been validated, and the rationale is documented.",
|
|
5
|
+
"tags": ["generic", "analysis", "decision"],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "clarify_problem",
|
|
9
|
+
"title": "Clarify the problem",
|
|
10
|
+
"description": "Restate the problem in concrete terms, identify stakeholders, and confirm scope.",
|
|
11
|
+
"depends_on": [],
|
|
12
|
+
"risk_level": "LOW",
|
|
13
|
+
"abstraction_level": 0,
|
|
14
|
+
"parallel_write_domains": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "root_cause_analysis",
|
|
18
|
+
"title": "Root cause analysis",
|
|
19
|
+
"description": "Identify underlying causes rather than surface symptoms. Use evidence from available sources.",
|
|
20
|
+
"depends_on": ["clarify_problem"],
|
|
21
|
+
"risk_level": "MEDIUM",
|
|
22
|
+
"abstraction_level": 1,
|
|
23
|
+
"parallel_write_domains": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "generate_options",
|
|
27
|
+
"title": "Generate solution options",
|
|
28
|
+
"description": "Brainstorm at least three distinct approaches. Document trade-offs for each.",
|
|
29
|
+
"depends_on": ["root_cause_analysis"],
|
|
30
|
+
"risk_level": "LOW",
|
|
31
|
+
"abstraction_level": 1,
|
|
32
|
+
"parallel_write_domains": ["options"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "assess_constraints",
|
|
36
|
+
"title": "Assess constraints",
|
|
37
|
+
"description": "Identify time, resource, and stakeholder constraints that narrow the solution space.",
|
|
38
|
+
"depends_on": ["root_cause_analysis"],
|
|
39
|
+
"risk_level": "LOW",
|
|
40
|
+
"abstraction_level": 1,
|
|
41
|
+
"parallel_write_domains": ["constraints"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "select_approach",
|
|
45
|
+
"title": "Select approach",
|
|
46
|
+
"description": "Choose the best option given the constraints. Document the decision rationale.",
|
|
47
|
+
"depends_on": ["generate_options", "assess_constraints"],
|
|
48
|
+
"risk_level": "HIGH",
|
|
49
|
+
"abstraction_level": 0,
|
|
50
|
+
"parallel_write_domains": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "implement",
|
|
54
|
+
"title": "Implement",
|
|
55
|
+
"description": "Execute the chosen approach. Track progress against the plan.",
|
|
56
|
+
"depends_on": ["select_approach"],
|
|
57
|
+
"risk_level": "MEDIUM",
|
|
58
|
+
"abstraction_level": 1,
|
|
59
|
+
"parallel_write_domains": []
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "validate",
|
|
63
|
+
"title": "Validate outcome",
|
|
64
|
+
"description": "Confirm the problem is resolved. Measure against the original success criteria.",
|
|
65
|
+
"depends_on": ["implement"],
|
|
66
|
+
"risk_level": "HIGH",
|
|
67
|
+
"abstraction_level": 0,
|
|
68
|
+
"parallel_write_domains": []
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"metadata": { "author": "buildaharness", "created": "2026-06-22" }
|
|
72
|
+
}
|
|
73
|
+
;
|
|
74
|
+
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "process_improvement",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"success_criteria": "Identified gaps are addressed via a piloted improvement that shows measurable positive outcomes.",
|
|
5
|
+
"tags": ["process", "improvement", "operations"],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "map_current_state",
|
|
9
|
+
"title": "Map current state",
|
|
10
|
+
"description": "Document the existing process end-to-end: steps, owners, inputs, outputs, cycle time, and pain points.",
|
|
11
|
+
"depends_on": [],
|
|
12
|
+
"risk_level": "LOW",
|
|
13
|
+
"abstraction_level": 0,
|
|
14
|
+
"parallel_write_domains": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "identify_gaps",
|
|
18
|
+
"title": "Identify gaps",
|
|
19
|
+
"description": "Analyse the current state map for inefficiencies, bottlenecks, errors, and unmet needs.",
|
|
20
|
+
"depends_on": ["map_current_state"],
|
|
21
|
+
"risk_level": "MEDIUM",
|
|
22
|
+
"abstraction_level": 1,
|
|
23
|
+
"parallel_write_domains": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "design_improvements",
|
|
27
|
+
"title": "Design improvements",
|
|
28
|
+
"description": "Propose process changes that address the identified gaps. Design the future-state process map.",
|
|
29
|
+
"depends_on": ["identify_gaps"],
|
|
30
|
+
"risk_level": "MEDIUM",
|
|
31
|
+
"abstraction_level": 1,
|
|
32
|
+
"parallel_write_domains": []
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "pilot",
|
|
36
|
+
"title": "Pilot",
|
|
37
|
+
"description": "Run the improved process in a controlled environment. Monitor for unintended side-effects.",
|
|
38
|
+
"depends_on": ["design_improvements"],
|
|
39
|
+
"risk_level": "HIGH",
|
|
40
|
+
"abstraction_level": 1,
|
|
41
|
+
"parallel_write_domains": []
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "measure_outcomes",
|
|
45
|
+
"title": "Measure outcomes",
|
|
46
|
+
"description": "Collect metrics from the pilot. Compare against the baseline. Decide: adopt, adjust, or abandon.",
|
|
47
|
+
"depends_on": ["pilot"],
|
|
48
|
+
"risk_level": "MEDIUM",
|
|
49
|
+
"abstraction_level": 0,
|
|
50
|
+
"parallel_write_domains": []
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"metadata": { "author": "buildaharness", "created": "2026-06-22" }
|
|
54
|
+
}
|
|
55
|
+
;
|
|
56
|
+
|
|
57
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "project_planning",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"success_criteria": "The project scope is defined, resources are allocated, risks are assessed, and a schedule with a kickoff milestone is ready.",
|
|
5
|
+
"tags": ["project", "planning", "management"],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "scope_definition",
|
|
9
|
+
"title": "Define project scope",
|
|
10
|
+
"description": "Document project goals, deliverables, boundaries, and acceptance criteria. Align with stakeholders.",
|
|
11
|
+
"depends_on": [],
|
|
12
|
+
"risk_level": "MEDIUM",
|
|
13
|
+
"abstraction_level": 0,
|
|
14
|
+
"parallel_write_domains": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "work_breakdown",
|
|
18
|
+
"title": "Work breakdown structure",
|
|
19
|
+
"description": "Decompose deliverables into discrete tasks. Estimate effort and identify dependencies.",
|
|
20
|
+
"depends_on": ["scope_definition"],
|
|
21
|
+
"risk_level": "MEDIUM",
|
|
22
|
+
"abstraction_level": 1,
|
|
23
|
+
"parallel_write_domains": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "resource_planning",
|
|
27
|
+
"title": "Resource planning",
|
|
28
|
+
"description": "Identify required team members, tools, and budget. Confirm availability and assign owners.",
|
|
29
|
+
"depends_on": ["work_breakdown"],
|
|
30
|
+
"risk_level": "MEDIUM",
|
|
31
|
+
"abstraction_level": 1,
|
|
32
|
+
"parallel_write_domains": ["resources"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "risk_assessment",
|
|
36
|
+
"title": "Risk assessment",
|
|
37
|
+
"description": "Identify project risks, assess likelihood and impact, and define mitigation actions.",
|
|
38
|
+
"depends_on": ["work_breakdown"],
|
|
39
|
+
"risk_level": "HIGH",
|
|
40
|
+
"abstraction_level": 1,
|
|
41
|
+
"parallel_write_domains": ["risks"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "schedule",
|
|
45
|
+
"title": "Build schedule",
|
|
46
|
+
"description": "Produce a timeline with milestones. Incorporate resource constraints and risk buffers.",
|
|
47
|
+
"depends_on": ["resource_planning", "risk_assessment"],
|
|
48
|
+
"risk_level": "MEDIUM",
|
|
49
|
+
"abstraction_level": 0,
|
|
50
|
+
"parallel_write_domains": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "kickoff",
|
|
54
|
+
"title": "Kickoff",
|
|
55
|
+
"description": "Run the project kickoff. Distribute the plan, confirm roles, and establish communication cadence.",
|
|
56
|
+
"depends_on": ["schedule"],
|
|
57
|
+
"risk_level": "LOW",
|
|
58
|
+
"abstraction_level": 0,
|
|
59
|
+
"parallel_write_domains": []
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"metadata": { "author": "buildaharness", "created": "2026-06-22" }
|
|
63
|
+
}
|
|
64
|
+
;
|
|
65
|
+
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "research_analysis",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"success_criteria": "Research questions are answered with synthesised evidence from multiple sources, and a clear report is produced.",
|
|
5
|
+
"tags": ["research", "analysis", "evidence"],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "define_questions",
|
|
9
|
+
"title": "Define research questions",
|
|
10
|
+
"description": "State the primary and secondary research questions. Define scope and success criteria for the inquiry.",
|
|
11
|
+
"depends_on": [],
|
|
12
|
+
"risk_level": "LOW",
|
|
13
|
+
"abstraction_level": 0,
|
|
14
|
+
"parallel_write_domains": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "gather_sources",
|
|
18
|
+
"title": "Gather sources",
|
|
19
|
+
"description": "Identify and collect relevant data sources, documents, and stakeholder inputs. Assess source quality.",
|
|
20
|
+
"depends_on": ["define_questions"],
|
|
21
|
+
"risk_level": "LOW",
|
|
22
|
+
"abstraction_level": 1,
|
|
23
|
+
"parallel_write_domains": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "extract_insights",
|
|
27
|
+
"title": "Extract insights",
|
|
28
|
+
"description": "Read and analyse each source. Extract key findings, data points, and quotes that bear on the research questions.",
|
|
29
|
+
"depends_on": ["gather_sources"],
|
|
30
|
+
"risk_level": "MEDIUM",
|
|
31
|
+
"abstraction_level": 1,
|
|
32
|
+
"parallel_write_domains": []
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "cross_reference",
|
|
36
|
+
"title": "Cross-reference findings",
|
|
37
|
+
"description": "Identify agreements, contradictions, and gaps across sources. Flag conflicting evidence for resolution.",
|
|
38
|
+
"depends_on": ["extract_insights"],
|
|
39
|
+
"risk_level": "MEDIUM",
|
|
40
|
+
"abstraction_level": 1,
|
|
41
|
+
"parallel_write_domains": []
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "synthesise",
|
|
45
|
+
"title": "Synthesise",
|
|
46
|
+
"description": "Combine verified findings into a coherent narrative that directly answers the research questions.",
|
|
47
|
+
"depends_on": ["cross_reference"],
|
|
48
|
+
"risk_level": "MEDIUM",
|
|
49
|
+
"abstraction_level": 0,
|
|
50
|
+
"parallel_write_domains": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "report",
|
|
54
|
+
"title": "Write report",
|
|
55
|
+
"description": "Produce a structured report: executive summary, findings, evidence, recommendations, and limitations.",
|
|
56
|
+
"depends_on": ["synthesise"],
|
|
57
|
+
"risk_level": "LOW",
|
|
58
|
+
"abstraction_level": 0,
|
|
59
|
+
"parallel_write_domains": []
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"metadata": { "author": "buildaharness", "created": "2026-06-22" }
|
|
63
|
+
}
|
|
64
|
+
;
|
|
65
|
+
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "trip_planning",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"success_criteria": "The destination is researched, transport and lodging are booked, an itinerary exists, and travel-document/packing logistics are confirmed ahead of departure.",
|
|
5
|
+
"tags": ["trip", "travel", "planning"],
|
|
6
|
+
"tasks": [
|
|
7
|
+
{
|
|
8
|
+
"id": "destination_research",
|
|
9
|
+
"title": "Research the destination",
|
|
10
|
+
"description": "Research weather, entry/visa requirements, must-see highlights, and local customs for the destination and travel dates.",
|
|
11
|
+
"depends_on": [],
|
|
12
|
+
"risk_level": "LOW",
|
|
13
|
+
"abstraction_level": 0,
|
|
14
|
+
"parallel_write_domains": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "book_transport",
|
|
18
|
+
"title": "Book transport",
|
|
19
|
+
"description": "Book flights or other transport to and from the destination for the planned dates.",
|
|
20
|
+
"depends_on": ["destination_research"],
|
|
21
|
+
"risk_level": "HIGH",
|
|
22
|
+
"abstraction_level": 1,
|
|
23
|
+
"parallel_write_domains": ["bookings"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "book_lodging",
|
|
27
|
+
"title": "Book lodging",
|
|
28
|
+
"description": "Book accommodations for each leg of the trip, matching the transport dates.",
|
|
29
|
+
"depends_on": ["destination_research"],
|
|
30
|
+
"risk_level": "HIGH",
|
|
31
|
+
"abstraction_level": 1,
|
|
32
|
+
"parallel_write_domains": ["bookings"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "itinerary_planning",
|
|
36
|
+
"title": "Plan the itinerary",
|
|
37
|
+
"description": "Draft a day-by-day itinerary balancing travel time, rest, and key activities, confirmed against the transport and lodging dates.",
|
|
38
|
+
"depends_on": ["book_transport", "book_lodging"],
|
|
39
|
+
"risk_level": "MEDIUM",
|
|
40
|
+
"abstraction_level": 0,
|
|
41
|
+
"parallel_write_domains": []
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "logistics_prep",
|
|
45
|
+
"title": "Prepare travel logistics",
|
|
46
|
+
"description": "Confirm passport/visa validity, arrange travel insurance, and build a packing list based on the itinerary and destination.",
|
|
47
|
+
"depends_on": ["itinerary_planning"],
|
|
48
|
+
"risk_level": "MEDIUM",
|
|
49
|
+
"abstraction_level": 0,
|
|
50
|
+
"parallel_write_domains": []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "final_check",
|
|
54
|
+
"title": "Final pre-departure check",
|
|
55
|
+
"description": "Confirm all bookings, travel documents, and packing are ready ahead of departure.",
|
|
56
|
+
"depends_on": ["logistics_prep"],
|
|
57
|
+
"risk_level": "LOW",
|
|
58
|
+
"abstraction_level": 0,
|
|
59
|
+
"parallel_write_domains": []
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"metadata": { "author": "buildaharness", "created": "2026-07-10" }
|
|
63
|
+
}
|
|
64
|
+
;
|
|
65
|
+
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface PlanTask {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
depends_on: string[];
|
|
6
|
+
risk_level: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
7
|
+
abstraction_level: number;
|
|
8
|
+
parallel_write_domains: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface PlanTemplate {
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
success_criteria: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
tasks: PlanTask[];
|
|
16
|
+
metadata: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export declare function loadTemplate(name: string): PlanTemplate;
|
|
19
|
+
export declare function listTemplateNames(): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Heuristic: match description keywords to a template name. Always returns a
|
|
22
|
+
* template — falls back to 'problem_solving' on zero keyword hits, exactly like
|
|
23
|
+
* agents/planner/utils.py's pick_template_for_task. Used by buildPlanFromTemplate
|
|
24
|
+
* once a template has already been chosen some other way (e.g. matchTemplateIfConfident).
|
|
25
|
+
*/
|
|
26
|
+
export declare function pickTemplateForTask(description: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Stricter variant for the planning gate (planning-classifier.ts): returns null on
|
|
29
|
+
* zero keyword hits instead of defaulting to problem_solving. The gate needs "no
|
|
30
|
+
* real match" to be distinguishable from "weakly matched problem_solving" — an
|
|
31
|
+
* always-a-fallback heuristic can't express that distinction.
|
|
32
|
+
*/
|
|
33
|
+
export declare function matchTemplateIfConfident(description: string): string | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ILLMClient, TokenUsage } from '@buildaharness/runtime';
|
|
2
|
+
import { PlanTaskRecord } from './plan-store.js';
|
|
3
|
+
/**
|
|
4
|
+
* P6 of plans/ask_question_and_plan_mode_plan.html — runs between drafting (P1/P3) and staging
|
|
5
|
+
* for approval (P2). Two independent checks, deliberately ordered cheapest-and-most-certain
|
|
6
|
+
* first: (1) dependency-graph validity (pure, synchronous, no LLM call — the same three checks
|
|
7
|
+
* `adapter/harness/task_graph.py`'s `validate_task_graph` runs Python-side: orphaned `depends_on`
|
|
8
|
+
* references and cycle detection via the identical iterative-DFS WHITE/GRAY/BLACK algorithm, plus
|
|
9
|
+
* a duplicate-task-id check this phase's Scope calls for that the Python original doesn't need
|
|
10
|
+
* because `TaskGraph` construction already dedupes by id), then (2) one bounded LLM call for the
|
|
11
|
+
* harder judgment — a lighter, narrower version of `reviewer.py`'s three-lens shape, specifically
|
|
12
|
+
* the adversarial lens's question. A graph error is a fails-fast condition (the plan must not
|
|
13
|
+
* reach `awaiting_approval` with an invalid structure); an LLM-lens failure is not — it just means
|
|
14
|
+
* the plan proceeds to approval without `reviewNotes` (Validation section, LLM-failure fallback).
|
|
15
|
+
*/
|
|
16
|
+
export declare function validatePlanTaskGraph(tasks: PlanTaskRecord[]): string[];
|
|
17
|
+
export type PlanVerificationOutcome = {
|
|
18
|
+
kind: 'graph_invalid';
|
|
19
|
+
errors: string[];
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'verified';
|
|
22
|
+
reviewNotes: string[];
|
|
23
|
+
verifiedAt: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Deterministic checks first (fails fast on a structural problem — the caller must not stage a
|
|
27
|
+
* plan whose graph is invalid), then the bounded adversarial-completeness LLM call. Called from
|
|
28
|
+
* `PlanDraftingService.draftTurn` right before handing a `readyForApproval` draft to
|
|
29
|
+
* `PlanApprovalService.stageAndRespond`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function verifyPlanDraft(llmClient: ILLMClient, tasks: PlanTaskRecord[], successCriteria: string, rationale: string, model?: string, onUsage?: (usage: TokenUsage) => void): Promise<PlanVerificationOutcome>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ToolDefinition, ReminderStore } from '@buildaharness/runtime';
|
|
2
|
+
export declare const CREATE_REMINDER_TOOL: ToolDefinition;
|
|
3
|
+
export declare const LIST_REMINDERS_TOOL: ToolDefinition;
|
|
4
|
+
export declare const REMINDER_TOOLS: ToolDefinition[];
|
|
5
|
+
/**
|
|
6
|
+
* `sourceUserMessage` is the current turn's raw user message — used only for the fact-shaped
|
|
7
|
+
* guard below, never stored. Checking it (not just the tool call's own `text` argument) matters
|
|
8
|
+
* because the model routinely rewords/normalizes text before calling a tool (e.g. "I'm allergic
|
|
9
|
+
* to peanuts, please remember that" → "User is allergic to peanuts" as the `text` argument),
|
|
10
|
+
* which would otherwise dodge a check against `text` alone even though the turn is clearly
|
|
11
|
+
* fact-shaped.
|
|
12
|
+
*/
|
|
13
|
+
export declare function executeReminderTool(store: ReminderStore, toolName: string, input: Record<string, unknown>, sourceUserMessage?: string): Promise<string>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { EscalationHalt, HarnessCheckpoint, VerificationResult, LayerActivityEvent, HarnessRunResult } from '@buildaharness/harness';
|
|
2
|
+
import { TokenUsage } from '@buildaharness/runtime';
|
|
3
|
+
import { TurnIntentClassification } from './turn-intent-classifier.js';
|
|
4
|
+
import { PlanRecord } from './plan-store.js';
|
|
5
|
+
import { PlanService } from './plan-service.js';
|
|
6
|
+
import { AssistantSession } from './assistant-session.js';
|
|
7
|
+
import { MemoryService } from './memory-service.js';
|
|
8
|
+
import { AssistantSource } from './assistant-source.js';
|
|
9
|
+
import { BatchBudgetTrace } from './agent-loop.js';
|
|
10
|
+
import { AssistantTurnResult } from './assistant-types.js';
|
|
11
|
+
import { TraceEvent } from './trace-events.js';
|
|
12
|
+
/**
|
|
13
|
+
* AssistantTurnResult assembly for every return path — the triviality fast path, the
|
|
14
|
+
* plan-pacing pause, the harness success path, and the EscalationHalt-caught path — split out of
|
|
15
|
+
* runTurn in Phase 4d of the architecture remediation plan. Each method persists whatever this
|
|
16
|
+
* path needs to persist (transcript, facts, plan) and returns the final result, so the sequencer
|
|
17
|
+
* (assistant.ts) never has to duplicate per-path assembly logic.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ResponseService {
|
|
20
|
+
private readonly memoryService;
|
|
21
|
+
private readonly session;
|
|
22
|
+
private readonly planService;
|
|
23
|
+
private readonly onTrace;
|
|
24
|
+
constructor(memoryService: MemoryService, session: AssistantSession, planService: PlanService, onTrace: ((event: TraceEvent) => void) | undefined);
|
|
25
|
+
buildTrivialResult(params: {
|
|
26
|
+
sessionId: string;
|
|
27
|
+
transcriptKey: string;
|
|
28
|
+
userMessage: string;
|
|
29
|
+
draftReply: string;
|
|
30
|
+
classification: TurnIntentClassification;
|
|
31
|
+
sources: AssistantSource[] | undefined;
|
|
32
|
+
batchBudgetTrace: BatchBudgetTrace | undefined;
|
|
33
|
+
usageTotal: TokenUsage | undefined;
|
|
34
|
+
onUsage?: (usage: TokenUsage) => void;
|
|
35
|
+
}): Promise<AssistantTurnResult>;
|
|
36
|
+
buildPausedResult(params: {
|
|
37
|
+
sessionId: string;
|
|
38
|
+
transcriptKey: string;
|
|
39
|
+
userMessage: string;
|
|
40
|
+
draftReply: string;
|
|
41
|
+
classification: TurnIntentClassification;
|
|
42
|
+
activePlan: PlanRecord | null;
|
|
43
|
+
checkpoint: HarnessCheckpoint;
|
|
44
|
+
lastVerification: VerificationResult | null;
|
|
45
|
+
layerActivity: LayerActivityEvent[];
|
|
46
|
+
sources: AssistantSource[] | undefined;
|
|
47
|
+
batchBudgetTrace: BatchBudgetTrace | undefined;
|
|
48
|
+
usageTotal: TokenUsage | undefined;
|
|
49
|
+
onUsage?: (usage: TokenUsage) => void;
|
|
50
|
+
}): Promise<AssistantTurnResult>;
|
|
51
|
+
buildSuccessResult(params: {
|
|
52
|
+
sessionId: string;
|
|
53
|
+
transcriptKey: string;
|
|
54
|
+
userMessage: string;
|
|
55
|
+
draftReply: string;
|
|
56
|
+
classification: TurnIntentClassification;
|
|
57
|
+
activePlan: PlanRecord | null;
|
|
58
|
+
result: HarnessRunResult;
|
|
59
|
+
lastVerification: VerificationResult | null;
|
|
60
|
+
layerActivity: LayerActivityEvent[];
|
|
61
|
+
sources: AssistantSource[] | undefined;
|
|
62
|
+
batchBudgetTrace: BatchBudgetTrace | undefined;
|
|
63
|
+
usageTotal: TokenUsage | undefined;
|
|
64
|
+
onUsage?: (usage: TokenUsage) => void;
|
|
65
|
+
}): Promise<AssistantTurnResult>;
|
|
66
|
+
buildEscalatedResult(params: {
|
|
67
|
+
sessionId: string;
|
|
68
|
+
transcriptKey: string;
|
|
69
|
+
userMessage: string;
|
|
70
|
+
err: EscalationHalt;
|
|
71
|
+
classification: TurnIntentClassification;
|
|
72
|
+
}): Promise<AssistantTurnResult>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ILLMClient, TokenUsage } from '@buildaharness/runtime';
|
|
2
|
+
import { BeliefCandidate } from './contradiction-checker.js';
|
|
3
|
+
/**
|
|
4
|
+
* One LLM call checking a proposed change against everything relevant at once (never one call
|
|
5
|
+
* per belief/prediction) — layered on top of review-proposed-change.ts's lexical `isNegation`
|
|
6
|
+
* check, which only catches an explicit phrase like "not X"/"removes X"/"no longer X". That check
|
|
7
|
+
* also requires the change description and the belief it's compared against to share a concrete
|
|
8
|
+
* subject before it fires (see looksLikeCodingFact's doc comment in contradiction-checker.ts) —
|
|
9
|
+
* which is why decomposition-classifier.ts and plan-builder.ts prompt task descriptions to lead
|
|
10
|
+
* with their subject. A
|
|
11
|
+
* paraphrased conflict ("we're dropping the login feature" vs. a belief that login is required)
|
|
12
|
+
* slips past that phrase list entirely. Skipped when the change description itself reads like a
|
|
13
|
+
* structured/technical (coding) action — see looksLikeCodingFact's doc comment for why that's
|
|
14
|
+
* exactly the domain the lexical check already handles reasonably well; this is worth spending a
|
|
15
|
+
* call on for a natural-language-shaped change instead. Falls back to "no conflict" on any parse
|
|
16
|
+
* failure or LLM error, matching this codebase's other LLM-backed classifiers — a missed conflict
|
|
17
|
+
* costs nothing worse than the lexical-only behavior this is layered on top of.
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkSemanticReviewConflict(changeDescription: string, highConfidenceBeliefs: BeliefCandidate[], hypothesisPredictions: string[], llmClient: ILLMClient, model?: string, onUsage?: (usage: TokenUsage) => void): Promise<{
|
|
20
|
+
conflict: boolean;
|
|
21
|
+
reason?: string;
|
|
22
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ILLMClient, LLMStructuredResponse } from '@buildaharness/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* A deterministic, network-free {@link ILLMClient} for tests and demos — the one publicly
|
|
4
|
+
* supported way to drive a real `PersonalAssistant` turn end to end without a proxy, an API key,
|
|
5
|
+
* or a live model. Built for plans/chat_ui_browser_e2e_plan.html phase B1 (the browser-e2e lane
|
|
6
|
+
* that unblocks the `ASSISTANT_ONE_LOOP` default-flip), and reusable by chat-ui's `demo-seed.ts`.
|
|
7
|
+
*
|
|
8
|
+
* It mirrors the shape of the internal `ScriptedToolLLMClient` that `assistant.test.ts` has used
|
|
9
|
+
* for a long time: every turn spends exactly one mandatory `classifyTurnIntent` call up front,
|
|
10
|
+
* which this client recognises (by a distinctive phrase from that classifier's system prompt) and
|
|
11
|
+
* answers on its own from a lightweight, deterministic default — so `responses` only has to
|
|
12
|
+
* script the *tool loop / one-loop proposer's* own calls, not that bookkeeping call.
|
|
13
|
+
*
|
|
14
|
+
* `responses` entries are consumed in order, one per non-classifier `callChatStructured` call:
|
|
15
|
+
* - a plain `string` → `{ content: string }` (a final answer, no tool calls)
|
|
16
|
+
* - an `LLMStructuredResponse` → use as-is (set `toolCalls` to simulate the model calling a tool)
|
|
17
|
+
*
|
|
18
|
+
* `callChat`/`callChatSync` (the no-tools reply path, and post-approval synthesis) stream
|
|
19
|
+
* `streamChunks` (default: `['']`).
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptedLLMClientScript {
|
|
22
|
+
/** Ordered structured responses for the tool loop / one-loop proposer. A bare string is shorthand for a final answer with no tool calls. */
|
|
23
|
+
responses?: Array<string | LLMStructuredResponse>;
|
|
24
|
+
/** Chunks streamed from `callChat`/`callChatSync`. Defaults to `['']`. */
|
|
25
|
+
streamChunks?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Per-user-message override of the auto-answered `classifyTurnIntent` JSON fields (e.g.
|
|
28
|
+
* `{ isTrivial: true }`, `{ riskLevel: 'HIGH' }`, `{ decomposedTasks: [...] }`). Return
|
|
29
|
+
* `undefined` to keep the derived default for that message.
|
|
30
|
+
*/
|
|
31
|
+
classify?: (userMessage: string) => Record<string, unknown> | undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Builds a scripted {@link ILLMClient}. See {@link ScriptedLLMClientScript}. The returned value
|
|
35
|
+
* is a plain `ILLMClient` — pass it straight to `PersonalAssistant.create({ llmClient })`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createScriptedLLMClient(script?: ScriptedLLMClientScript): ILLMClient;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ILLMClient, TokenUsage } from '@buildaharness/runtime';
|
|
2
|
+
import { Belief } from '@buildaharness/harness';
|
|
3
|
+
/**
|
|
4
|
+
* assistant.ts's single ad hoc/single-task turn always passes this exact sentence as its harness
|
|
5
|
+
* run's successCriteria — a meta-instruction ("respond helpfully"), not a factual claim a belief
|
|
6
|
+
* could ever state or paraphrase. Every other one of HarnessRuntime's semantic hooks has its own
|
|
7
|
+
* cheap, no-LLM-call skip for the domain it knows doesn't need escalation (looksLikeCodingFact for
|
|
8
|
+
* contradictionChecker/semanticChangeReviewer, empty symptoms/patterns for semanticFailureMatcher);
|
|
9
|
+
* this is that skip for criterion coverage. Without it, any ad hoc turn with at least one recorded
|
|
10
|
+
* belief would spend a real LLM call every single time, forever, on a criterion that structurally
|
|
11
|
+
* can never be "covered" by a belief in the first place — found by running the existing test suite
|
|
12
|
+
* against a freshly-built @buildaharness/harness dist (see this plan's Phase 5 corrections) rather
|
|
13
|
+
* than by design; a durable plan's own successCriteria (real, task-specific text like "the login
|
|
14
|
+
* tests pass" — see plan-store.ts's PlanRecord) is exactly the case this hook exists for and is
|
|
15
|
+
* NOT skipped.
|
|
16
|
+
*/
|
|
17
|
+
export declare const NON_CHECKABLE_DEFAULT_CRITERION = "Respond helpfully, accurately, and safely to the user request.";
|
|
18
|
+
/**
|
|
19
|
+
* One LLM call per uncovered criterion, checking it against the whole belief set at once — layered
|
|
20
|
+
* on top of reviewerPass's implementerLens (packages/harness/src/nodes/reviewer-pass.ts), which
|
|
21
|
+
* otherwise only checks success-criterion coverage via a plain `.includes()` substring match.
|
|
22
|
+
* Called only for a criterion that substring check already found no coverage for (see
|
|
23
|
+
* SemanticCriterionCoverage's own doc comment) — a criterion the cheap check already covers never
|
|
24
|
+
* reaches this call. Falls back to "not covered" (the substring check's own verdict stands) on any
|
|
25
|
+
* parse failure or LLM error, matching this codebase's other LLM-backed classifiers
|
|
26
|
+
* (checkForContradictions, checkSemanticReviewConflict, checkSemanticFailureMatch) — a missed
|
|
27
|
+
* coverage costs nothing worse than the substring-only behavior this is layered on top of, since it
|
|
28
|
+
* only ever adds coverage, never removes it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function checkSemanticCriterionCoverage(criterion: string, beliefs: Belief[], llmClient: ILLMClient, model?: string, onUsage?: (usage: TokenUsage) => void): Promise<boolean>;
|