@eir-labs/coltrane 0.4.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/LICENSE +201 -0
- package/README.md +85 -0
- package/agents/anticipation-mapper.json +34 -0
- package/agents/claim-amender.json +34 -0
- package/agents/claim-architect.json +34 -0
- package/agents/claim-rewriter.json +32 -0
- package/agents/delivery-finalizer.json +40 -0
- package/agents/diamond-cutter.json +33 -0
- package/agents/disclosure-analyst.json +26 -0
- package/agents/domain-explorer.json +37 -0
- package/agents/e2e-runner.json +34 -0
- package/agents/e2e-suite-judge.json +26 -0
- package/agents/event-clusterer.json +29 -0
- package/agents/novelty-searcher.json +40 -0
- package/agents/patent-browser-scout.json +49 -0
- package/agents/patent-examiner.json +36 -0
- package/agents/phase_agents/claim-rewriter.md +44 -0
- package/agents/phase_agents/delivery-finalizer.md +30 -0
- package/agents/phase_agents/diamond-cutter.md +47 -0
- package/agents/phase_agents/domain-explorer.md +27 -0
- package/agents/phase_agents/novelty-searcher.md +50 -0
- package/agents/phase_agents/problem-definer.md +32 -0
- package/agents/phase_agents/solution-developer.md +26 -0
- package/agents/phase_agents/verdict-judger.md +70 -0
- package/agents/players/audience-modeler.md +40 -0
- package/agents/players/chain-audit-keeper.md +41 -0
- package/agents/players/illumination-reviewer.md +42 -0
- package/agents/players/methodology-cadence-keeper.md +42 -0
- package/agents/players/substrate-edge-keeper.md +45 -0
- package/agents/prior-art-scout.json +45 -0
- package/agents/problem-definer.json +35 -0
- package/agents/seeds/steve_seed_a.json +12 -0
- package/agents/seeds/steve_seed_b.json +12 -0
- package/agents/seeds/steve_seed_c.json +12 -0
- package/agents/seeds/steve_seed_d.json +12 -0
- package/agents/sensor.json +22 -0
- package/agents/solution-developer.json +35 -0
- package/agents/source-walker.json +38 -0
- package/agents/spec-drafter.json +31 -0
- package/agents/sub_thread_soft_judge.json +26 -0
- package/agents/sub_thread_trace_sensor.json +22 -0
- package/agents/summarizer.json +25 -0
- package/agents/synthesis-writer.json +29 -0
- package/agents/triage-judge.json +39 -0
- package/agents/user_flow_judge.json +26 -0
- package/agents/user_flow_sensor.json +22 -0
- package/agents/verdict-judger.json +39 -0
- package/core_types/artifact.json +17 -0
- package/core_types/interpretation.json +16 -0
- package/core_types/judgment.json +16 -0
- package/core_types/plan.json +16 -0
- package/core_types/signal.json +16 -0
- package/core_types/verdict.json +27 -0
- package/dist/src/access_grant.d.ts +46 -0
- package/dist/src/access_grant.js +76 -0
- package/dist/src/access_grant.js.map +1 -0
- package/dist/src/acoustics.d.ts +9 -0
- package/dist/src/acoustics.js +65 -0
- package/dist/src/acoustics.js.map +1 -0
- package/dist/src/agent_profile.d.ts +36 -0
- package/dist/src/agent_profile.js +57 -0
- package/dist/src/agent_profile.js.map +1 -0
- package/dist/src/bifrost_invoker.d.ts +33 -0
- package/dist/src/bifrost_invoker.js +85 -0
- package/dist/src/bifrost_invoker.js.map +1 -0
- package/dist/src/canonical_core_types.d.ts +2 -0
- package/dist/src/canonical_core_types.js +111 -0
- package/dist/src/canonical_core_types.js.map +1 -0
- package/dist/src/canonical_form.d.ts +55 -0
- package/dist/src/canonical_form.js +93 -0
- package/dist/src/canonical_form.js.map +1 -0
- package/dist/src/charter.d.ts +37 -0
- package/dist/src/charter.js +86 -0
- package/dist/src/charter.js.map +1 -0
- package/dist/src/circle_of_fifths.d.ts +27 -0
- package/dist/src/circle_of_fifths.js +78 -0
- package/dist/src/circle_of_fifths.js.map +1 -0
- package/dist/src/claude_invoker.d.ts +102 -0
- package/dist/src/claude_invoker.js +760 -0
- package/dist/src/claude_invoker.js.map +1 -0
- package/dist/src/coltrane_profile.d.ts +87 -0
- package/dist/src/coltrane_profile.js +132 -0
- package/dist/src/coltrane_profile.js.map +1 -0
- package/dist/src/composition.d.ts +57 -0
- package/dist/src/composition.js +447 -0
- package/dist/src/composition.js.map +1 -0
- package/dist/src/core_types.d.ts +6 -0
- package/dist/src/core_types.js +25 -0
- package/dist/src/core_types.js.map +1 -0
- package/dist/src/document_factory.d.ts +89 -0
- package/dist/src/document_factory.js +176 -0
- package/dist/src/document_factory.js.map +1 -0
- package/dist/src/genome_schema.d.ts +512 -0
- package/dist/src/genome_schema.js +168 -0
- package/dist/src/genome_schema.js.map +1 -0
- package/dist/src/genome_writer.d.ts +67 -0
- package/dist/src/genome_writer.js +179 -0
- package/dist/src/genome_writer.js.map +1 -0
- package/dist/src/gig_song.d.ts +29 -0
- package/dist/src/gig_song.js +56 -0
- package/dist/src/gig_song.js.map +1 -0
- package/dist/src/gig_tracker.d.ts +54 -0
- package/dist/src/gig_tracker.js +109 -0
- package/dist/src/gig_tracker.js.map +1 -0
- package/dist/src/harmonic_validation.d.ts +11 -0
- package/dist/src/harmonic_validation.js +35 -0
- package/dist/src/harmonic_validation.js.map +1 -0
- package/dist/src/hooks.d.ts +27 -0
- package/dist/src/hooks.js +2 -0
- package/dist/src/hooks.js.map +1 -0
- package/dist/src/index.d.ts +36 -0
- package/dist/src/index.js +37 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/jsong.d.ts +47 -0
- package/dist/src/jsong.js +130 -0
- package/dist/src/jsong.js.map +1 -0
- package/dist/src/judges/user_flow_judge.d.ts +89 -0
- package/dist/src/judges/user_flow_judge.js +200 -0
- package/dist/src/judges/user_flow_judge.js.map +1 -0
- package/dist/src/learner.d.ts +37 -0
- package/dist/src/learner.js +30 -0
- package/dist/src/learner.js.map +1 -0
- package/dist/src/ledger.d.ts +225 -0
- package/dist/src/ledger.js +306 -0
- package/dist/src/ledger.js.map +1 -0
- package/dist/src/loader.d.ts +87 -0
- package/dist/src/loader.js +504 -0
- package/dist/src/loader.js.map +1 -0
- package/dist/src/mcp.d.ts +23 -0
- package/dist/src/mcp.js +125 -0
- package/dist/src/mcp.js.map +1 -0
- package/dist/src/modulation_path.d.ts +42 -0
- package/dist/src/modulation_path.js +60 -0
- package/dist/src/modulation_path.js.map +1 -0
- package/dist/src/output_validation.d.ts +19 -0
- package/dist/src/output_validation.js +51 -0
- package/dist/src/output_validation.js.map +1 -0
- package/dist/src/outputs.d.ts +125 -0
- package/dist/src/outputs.js +452 -0
- package/dist/src/outputs.js.map +1 -0
- package/dist/src/overtones.d.ts +42 -0
- package/dist/src/overtones.js +98 -0
- package/dist/src/overtones.js.map +1 -0
- package/dist/src/player_to_claude_code.d.ts +17 -0
- package/dist/src/player_to_claude_code.js +141 -0
- package/dist/src/player_to_claude_code.js.map +1 -0
- package/dist/src/playwright_cage.d.ts +28 -0
- package/dist/src/playwright_cage.js +47 -0
- package/dist/src/playwright_cage.js.map +1 -0
- package/dist/src/polyphony.d.ts +46 -0
- package/dist/src/polyphony.js +91 -0
- package/dist/src/polyphony.js.map +1 -0
- package/dist/src/portfolio.d.ts +52 -0
- package/dist/src/portfolio.js +186 -0
- package/dist/src/portfolio.js.map +1 -0
- package/dist/src/pricing.d.ts +23 -0
- package/dist/src/pricing.js +16 -0
- package/dist/src/pricing.js.map +1 -0
- package/dist/src/registry.d.ts +46 -0
- package/dist/src/registry.js +199 -0
- package/dist/src/registry.js.map +1 -0
- package/dist/src/runtime.d.ts +304 -0
- package/dist/src/runtime.js +1099 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/server.d.ts +88 -0
- package/dist/src/server.js +1692 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/server_entry.d.ts +2 -0
- package/dist/src/server_entry.js +40 -0
- package/dist/src/server_entry.js.map +1 -0
- package/dist/src/server_relay.d.ts +82 -0
- package/dist/src/server_relay.js +341 -0
- package/dist/src/server_relay.js.map +1 -0
- package/dist/src/simulate.d.ts +60 -0
- package/dist/src/simulate.js +72 -0
- package/dist/src/simulate.js.map +1 -0
- package/dist/src/skill_runner.mjs +34 -0
- package/dist/src/skill_subprocess.d.ts +65 -0
- package/dist/src/skill_subprocess.js +132 -0
- package/dist/src/skill_subprocess.js.map +1 -0
- package/dist/src/skills.d.ts +85 -0
- package/dist/src/skills.js +258 -0
- package/dist/src/skills.js.map +1 -0
- package/dist/src/subthread_recorder.d.ts +68 -0
- package/dist/src/subthread_recorder.js +166 -0
- package/dist/src/subthread_recorder.js.map +1 -0
- package/dist/src/tensor_read.d.ts +38 -0
- package/dist/src/tensor_read.js +60 -0
- package/dist/src/tensor_read.js.map +1 -0
- package/dist/src/test_honest_broker.d.ts +34 -0
- package/dist/src/test_honest_broker.js +155 -0
- package/dist/src/test_honest_broker.js.map +1 -0
- package/dist/src/test_topology.d.ts +22 -0
- package/dist/src/test_topology.js +137 -0
- package/dist/src/test_topology.js.map +1 -0
- package/dist/src/tones.d.ts +20 -0
- package/dist/src/tones.js +81 -0
- package/dist/src/tones.js.map +1 -0
- package/dist/src/tool_providers.d.ts +45 -0
- package/dist/src/tool_providers.js +104 -0
- package/dist/src/tool_providers.js.map +1 -0
- package/dist/src/type_versioning.d.ts +23 -0
- package/dist/src/type_versioning.js +31 -0
- package/dist/src/type_versioning.js.map +1 -0
- package/dist/src/version.d.ts +28 -0
- package/dist/src/version.js +86 -0
- package/dist/src/version.js.map +1 -0
- package/domain_types/claim-draft.json +34 -0
- package/domain_types/coverage-report.json +31 -0
- package/domain_types/draft-agent-profile.json +31 -0
- package/domain_types/draft-domain-type.json +28 -0
- package/domain_types/draft-standard.json +46 -0
- package/domain_types/e2e-observation.json +32 -0
- package/domain_types/e2e-report.json +30 -0
- package/domain_types/e2e-target.json +26 -0
- package/domain_types/e2e-verdict.json +26 -0
- package/domain_types/examine-round-record.json +40 -0
- package/domain_types/examiner-rejection.json +28 -0
- package/domain_types/failure-modes.json +31 -0
- package/domain_types/invention-analysis.json +34 -0
- package/domain_types/invention-spec.json +34 -0
- package/domain_types/novelty-analysis.json +28 -0
- package/domain_types/novelty-verdict.json +35 -0
- package/domain_types/parsed-conversation-trace.json +38 -0
- package/domain_types/pattern-extraction.json +62 -0
- package/domain_types/prior-art-hit.json +50 -0
- package/domain_types/project-charter.json +71 -0
- package/domain_types/provisional-draft.json +34 -0
- package/domain_types/raw-note.json +19 -0
- package/domain_types/repo-survey.json +28 -0
- package/domain_types/seeding-verdict.json +70 -0
- package/domain_types/soft-verdict.json +55 -0
- package/domain_types/summary.json +19 -0
- package/domain_types/triage-verdict.json +59 -0
- package/domain_types/user-flow-transcript.json +43 -0
- package/domain_types/user-flow-verdict.json +60 -0
- package/domain_types/verdict-record.json +39 -0
- package/package.json +82 -0
- package/skills/citation-verify/fixtures/basic.json +14 -0
- package/skills/citation-verify/meta.json +10 -0
- package/skills/citation-verify/skill.mjs +26 -0
- package/skills/claim-element-decompose/fixtures/basic.json +11 -0
- package/skills/claim-element-decompose/meta.json +10 -0
- package/skills/claim-element-decompose/skill.mjs +14 -0
- package/skills/diamond-cutting-discipline/fixtures/basic.json +13 -0
- package/skills/diamond-cutting-discipline/meta.json +19 -0
- package/skills/diamond-cutting-discipline/skill.md +46 -0
- package/skills/element-mapping-matrix/fixtures/basic.json +13 -0
- package/skills/element-mapping-matrix/meta.json +10 -0
- package/skills/element-mapping-matrix/skill.mjs +20 -0
- package/skills/number-adder/fixtures/basic.json +9 -0
- package/skills/number-adder/meta.json +10 -0
- package/skills/number-adder/skill.mjs +12 -0
- package/skills/patent-fetch/fixtures/parse.json +18 -0
- package/skills/patent-fetch/meta.json +11 -0
- package/skills/patent-fetch/skill.mjs +34 -0
- package/skills/query-expand/fixtures/basic.json +14 -0
- package/skills/query-expand/meta.json +10 -0
- package/skills/query-expand/skill.mjs +29 -0
- package/skills/run-vitest-band/fixtures/basic.json +9 -0
- package/skills/run-vitest-band/meta.json +18 -0
- package/skills/run-vitest-band/skill.mjs +22 -0
- package/skills/statutory-checklist/fixtures/basic.json +16 -0
- package/skills/statutory-checklist/meta.json +10 -0
- package/skills/statutory-checklist/skill.mjs +25 -0
- package/skills/summarize-tight/fixtures/basic.json +13 -0
- package/skills/summarize-tight/meta.json +20 -0
- package/skills/summarize-tight/skill.md +1 -0
- package/skills/verdict-gate/fixtures/basic.json +9 -0
- package/skills/verdict-gate/meta.json +10 -0
- package/skills/verdict-gate/skill.mjs +82 -0
- package/standards/e2e-suite-v0.json +44 -0
- package/standards/patent-triage-v0.json +98 -0
- package/standards/patent-triage-v1.json +84 -0
- package/standards/seed-from-local-repos-v0.json +115 -0
- package/standards/sub_thread_invocation.json +50 -0
- package/standards/summarize.json +40 -0
- package/standards/synthesis-walk-v0.json +108 -0
- package/standards/user_flow_correctness.json +57 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "user-flow-verdict",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"extends": "Interpretation",
|
|
5
|
+
"domain": "self_judge",
|
|
6
|
+
"status": "active",
|
|
7
|
+
"schema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"criteria": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"tool_pick_appropriate": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"score": { "type": ["number", "null"] },
|
|
17
|
+
"rationale": { "type": "string" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"response_faithful": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"score": { "type": ["number", "null"] },
|
|
24
|
+
"rationale": { "type": "string" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"genome_state_valid": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"score": { "type": ["number", "null"] },
|
|
31
|
+
"rationale": { "type": "string" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"typed_error_on_malformed": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"score": { "type": ["number", "null"] },
|
|
38
|
+
"rationale": { "type": "string" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"multi_turn_continuity": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"score": { "type": ["number", "null"] },
|
|
45
|
+
"rationale": { "type": "string" }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"overall_score": { "type": ["number", "null"] },
|
|
51
|
+
"overall_pass": { "type": "boolean" },
|
|
52
|
+
"top_finding": { "type": "string" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required_fields": [
|
|
56
|
+
"criteria",
|
|
57
|
+
"overall_pass",
|
|
58
|
+
"claims"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "verdict-record",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"extends": "Verdict",
|
|
5
|
+
"domain": "patent-triage",
|
|
6
|
+
"status": "active",
|
|
7
|
+
"schema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"recommended": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"FILEABLE",
|
|
14
|
+
"REFINE-FIRST",
|
|
15
|
+
"NOT-FILEABLE",
|
|
16
|
+
"INSUFFICIENT-EVIDENCE"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"disclosure_input_sha": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"coverage_report_sha": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"examine_round_record_sha": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"caveat": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required_fields": [
|
|
34
|
+
"disclosure_input_sha",
|
|
35
|
+
"coverage_report_sha",
|
|
36
|
+
"examine_round_record_sha",
|
|
37
|
+
"checks"
|
|
38
|
+
]
|
|
39
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eir-labs/coltrane",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "A methodology engine — a typed substrate for defining agents, composing multi-phase standards, dispatching gigs, and sealing every output to a content-addressed ledger. Ships as an MCP server.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": "Eir",
|
|
8
|
+
"homepage": "https://github.com/eir-dev/coltrane#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/eir-dev/coltrane.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/eir-dev/coltrane/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"model-context-protocol",
|
|
19
|
+
"claude",
|
|
20
|
+
"agents",
|
|
21
|
+
"methodology",
|
|
22
|
+
"workflow-engine"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"coltrane-server": "./dist/src/server_entry.js"
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/src/index.js",
|
|
31
|
+
"types": "./dist/src/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/src/index.d.ts",
|
|
35
|
+
"import": "./dist/src/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist/src",
|
|
41
|
+
"agents",
|
|
42
|
+
"standards",
|
|
43
|
+
"skills",
|
|
44
|
+
"domain_types",
|
|
45
|
+
"core_types",
|
|
46
|
+
"README.md",
|
|
47
|
+
"LICENSE"
|
|
48
|
+
],
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc && cp src/skill_runner.mjs dist/src/ && chmod +x dist/src/server_entry.js dist/src/server_relay.js",
|
|
54
|
+
"dev": "tsc --watch",
|
|
55
|
+
"prepare": "npm run build",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:watch": "vitest",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"verify": "tsc --noEmit && vitest run && npm run test:failure-modes && npm run test:honest-broker && npm run test:security && npm run e2e:offline",
|
|
60
|
+
"e2e": "npm run build && vitest run --config tests/e2e/vitest.config.ts",
|
|
61
|
+
"e2e:offline": "npm run build && vitest run --config tests/e2e/vitest.offline.config.ts",
|
|
62
|
+
"test:failure-modes": "vitest run --config tests/failure_modes/vitest.config.ts",
|
|
63
|
+
"test:honest-broker": "vitest run --config tests/honest_broker/vitest.config.ts",
|
|
64
|
+
"test:security": "vitest run --config tests/security/vitest.config.ts",
|
|
65
|
+
"lint:imports": "git ls-files 'src/**/*.ts' 'src/**/*.tsx' 'src/**/*.js' 'src/**/*.mjs' 'src/**/*.cjs' 'tests/**/*.ts' 'tests/**/*.tsx' 'tests/**/*.js' 'tests/**/*.mjs' 'tests/**/*.cjs' | bash scripts/check_imports.sh"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
69
|
+
"@slack/socket-mode": "^2.0.7",
|
|
70
|
+
"@slack/web-api": "^7.16.0",
|
|
71
|
+
"ajv": "^8.17.0",
|
|
72
|
+
"ajv-formats": "^3.0.0",
|
|
73
|
+
"zod": "^3.23.0"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@types/node": "^22.0.0",
|
|
77
|
+
"@vitest/coverage-v8": "^3.2.6",
|
|
78
|
+
"tsx": "^4.19.0",
|
|
79
|
+
"typescript": "^5.6.0",
|
|
80
|
+
"vitest": "^3.0.0"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "grounded",
|
|
3
|
+
"description": "a claim whose terms appear in the fetched text is verified via fetch",
|
|
4
|
+
"input": {
|
|
5
|
+
"claim": "Deno enforces permissions through runtime interception",
|
|
6
|
+
"fetched_text": "The security model is enforced by the Deno runtime through interception of permission-bearing operations, and is not dependent on the underlying operating system.",
|
|
7
|
+
"method": "fetch"
|
|
8
|
+
},
|
|
9
|
+
"assertions": [
|
|
10
|
+
{ "path": "verified", "op": "is_boolean" },
|
|
11
|
+
{ "path": "method", "op": "equals", "value": "fetch" },
|
|
12
|
+
{ "path": "coverage", "op": "is_number" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "citation-verify",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "verification",
|
|
5
|
+
"input_type": "citation-claim",
|
|
6
|
+
"output_type": "citation-verdict",
|
|
7
|
+
"determinism_ratio": 1.0,
|
|
8
|
+
"permission": { "tier": 0 },
|
|
9
|
+
"description": "Ground a claim about a source against the source's FETCHED text: returns verified + the supporting quote, or unverified. Codifies retrieved-not-recalled — a claim is verified only when its key terms actually appear in the fetched text, never from a snippet or memory."
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// citation-verify — is a claim about a source actually grounded in that source's FETCHED text?
|
|
2
|
+
// Pure/deterministic given { claim, fetched_text }: a claim is verified only when enough of its
|
|
3
|
+
// content terms appear in the fetched text, and the method is recorded as 'fetch' (vs 'snippet').
|
|
4
|
+
// This is the retrieved-not-recalled gate: no fetched_text -> unverified, never a guess.
|
|
5
|
+
const STOP = new Set(["a","an","the","of","to","for","and","or","with","is","in","on","by","at","from","as","that","it","its","this","these","those","not","does","do"]);
|
|
6
|
+
|
|
7
|
+
function terms(text) {
|
|
8
|
+
return String(text).toLowerCase().replace(/[^a-z0-9 ]/g, " ").split(/\s+/).filter((w) => w.length > 3 && !STOP.has(w));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function run(input) {
|
|
12
|
+
const claim = input && input.claim ? String(input.claim) : "";
|
|
13
|
+
const fetched = input && typeof input.fetched_text === "string" ? input.fetched_text : null;
|
|
14
|
+
const method = input && input.method === "snippet" ? "snippet" : "fetch";
|
|
15
|
+
if (fetched === null) {
|
|
16
|
+
return { verified: false, method, reason: "no fetched_text — cannot ground a claim without retrieving the source", matched_terms: [] };
|
|
17
|
+
}
|
|
18
|
+
const hay = fetched.toLowerCase();
|
|
19
|
+
const t = terms(claim);
|
|
20
|
+
const matched = t.filter((w) => hay.includes(w));
|
|
21
|
+
const ratio = t.length ? matched.length / t.length : 0;
|
|
22
|
+
// a claim is grounded only when most of its content terms are present in the fetched text,
|
|
23
|
+
// and only fetched (not snippet) provenance can support an anticipation finding.
|
|
24
|
+
const verified = method === "fetch" && ratio >= 0.6;
|
|
25
|
+
return { verified, method, coverage: ratio, matched_terms: matched };
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "three-elements",
|
|
3
|
+
"description": "a comprising-claim with two clauses + a wherein splits into elements",
|
|
4
|
+
"input": {
|
|
5
|
+
"claim_text": "A method comprising: spawning a process with permission flags from a declared grant; verifying a content hash of the code unit, wherein a mismatch substitutes a model-reasoning resolution."
|
|
6
|
+
},
|
|
7
|
+
"assertions": [
|
|
8
|
+
{ "path": "elements", "op": "exists" },
|
|
9
|
+
{ "path": "elements.0", "op": "is_string" }
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "claim-element-decompose",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "extraction",
|
|
5
|
+
"input_type": "claim-text",
|
|
6
|
+
"output_type": "claim-elements",
|
|
7
|
+
"determinism_ratio": 1.0,
|
|
8
|
+
"permission": { "tier": 0 },
|
|
9
|
+
"description": "Split an independent claim into its functional elements on 'comprising' / ';' / 'wherein'. Pure/deterministic — the element list feeds prior-art search and the element-mapping matrix."
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// claim-element-decompose — independent claim text -> functional elements. Pure/deterministic.
|
|
2
|
+
// Splits on the preamble 'comprising:' then on ';' (the standard element separators), with
|
|
3
|
+
// 'wherein' clauses kept as their own elements. Same claim -> same elements.
|
|
4
|
+
export default function run(input) {
|
|
5
|
+
const text = input && input.claim_text ? String(input.claim_text) : "";
|
|
6
|
+
const afterPreamble = text.split(/comprising:?/i).slice(1).join("comprising") || text;
|
|
7
|
+
const raw = afterPreamble
|
|
8
|
+
.split(/;|\bwherein\b/i)
|
|
9
|
+
.map((s) => s.replace(/\s+/g, " ").trim())
|
|
10
|
+
.filter((s) => s.length > 0);
|
|
11
|
+
// drop a trailing bare period fragment
|
|
12
|
+
const elements = raw.filter((s) => s.replace(/[.\s]/g, "").length > 2);
|
|
13
|
+
return { elements };
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "basic",
|
|
3
|
+
"description": "contract: produces the typed output. Runs once the reasoning half is resolved in eval mode — see skills open questions.",
|
|
4
|
+
"input": {
|
|
5
|
+
"idea": "a method that cleaves prior art along a single named plane"
|
|
6
|
+
},
|
|
7
|
+
"assertions": [
|
|
8
|
+
{
|
|
9
|
+
"path": "verdict",
|
|
10
|
+
"op": "is_string"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "diamond-cutting-discipline",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "analysis",
|
|
5
|
+
"permission": {
|
|
6
|
+
"tier": 0
|
|
7
|
+
},
|
|
8
|
+
"output_schema": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"verdict": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": [
|
|
16
|
+
"verdict"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## The diamond-cutting discipline
|
|
2
|
+
|
|
3
|
+
The principle the patent-triage pipeline runs on. Every phase grounds in this distinction.
|
|
4
|
+
|
|
5
|
+
### Empty vs invariant
|
|
6
|
+
|
|
7
|
+
- The **empty** part of an idea is its *representation*: the vocabulary, the file format, the programming language, the library, the vendor, the specific implementation. Empty does not mean unimportant — it means re-statable without loss.
|
|
8
|
+
- The **invariant** part is the *territory*: the single plane the idea splits the world along — what may be practiced freely and what is excluded.
|
|
9
|
+
|
|
10
|
+
Claims are vehicles. What an inventor owns is not the claim's words; it is the territory the words exclude from public practice. Many phrasings would bound the same territory with the same fidelity. The words are a surveyor's stake; the land is what gets enforced.
|
|
11
|
+
|
|
12
|
+
### The two errors
|
|
13
|
+
|
|
14
|
+
- **Welding to the representation.** A claim welded to a specific hash function, library, or vendor looks precise but shatters when the representation ages out, while the territory it was meant to hold never moved. Hard is not tough.
|
|
15
|
+
- **Drifting from the invariant.** Treating the territory as something to restate loosely. The stake still stands but no longer marks land anyone would fight over. Broad enough to read onto prior art, or so narrow a competitor walks around it.
|
|
16
|
+
|
|
17
|
+
The ideal is the narrow band of scope at which the cleave clears the prior art and stays enabled — the broadest reach that still bounds.
|
|
18
|
+
|
|
19
|
+
### The four cuts (run in order, before drafting any claim language)
|
|
20
|
+
|
|
21
|
+
1. **Name the cleave in one sentence,** in plain language, stripped of any specific format, library, vendor, or programming language. If the sentence will not form, there is no invention yet — only an implementation description. (The point of novelty.)
|
|
22
|
+
2. **Name three to five things this is** *not.* Each is a piece of prior art that comes close but bounds a different space. These are sharper boundary markers than the cleave-description alone. (Distinguishing the art; negative limitations.)
|
|
23
|
+
3. **Name three ways the cleave could fail.** Where does the territory actually end? The abstractness objection, the enablement gap, the over-broad reading — the validity attack surface (§101 / §112). Naming them is the only way to know what you hold.
|
|
24
|
+
4. **Re-state the cleave in different representations.** Plain English, sketch, another language, pitch to a non-engineer. If a phrasing breaks it, that phrasing was load-bearing — refine until the cleave survives re-description. This is the doctrine of equivalents (*Graver Tank*) run in reverse: stress-test your own cleave against the very test a court would later use against an infringer.
|
|
25
|
+
|
|
26
|
+
Only after the four cuts do you write the claim.
|
|
27
|
+
|
|
28
|
+
### Cleave-grade vocabulary
|
|
29
|
+
|
|
30
|
+
- **TIGHT** — single sentence, one independent claim, ≤3 functional elements joined by `comprising`, every word load-bearing, an explicit distancing limitation when prior art names a close hit.
|
|
31
|
+
- **LOOSE** — survives re-statement but still carries representation-level load (a library name, a format, a vendor) that should be stripped. Drives REFINE-FIRST.
|
|
32
|
+
- **UNBOUNDED** — no single plane named; the claim reads broadly enough to anticipate or be anticipated. Drives REFINE-FIRST or NOT-FILEABLE depending on novelty.
|
|
33
|
+
|
|
34
|
+
### Triage verdict vocabulary
|
|
35
|
+
|
|
36
|
+
- **FILEABLE** — cleave is TIGHT, novelty PASS, ≥3 failure modes named with bounds, ≥5 what-this-is-NOT distinctions. A provisional-draft skeleton accompanies the verdict.
|
|
37
|
+
- **REFINE-FIRST** — one or more axes are marginal. The verdict names the axis (novelty / scope / clarity / enablement) and the refinement direction.
|
|
38
|
+
- **NOT-FILEABLE** — prior art anticipates, or no single-sentence claim can be drawn. The verdict cites the prior art (or the missing plane) in plain English.
|
|
39
|
+
|
|
40
|
+
### What this discipline excludes
|
|
41
|
+
|
|
42
|
+
- Vocabulary lock-in. Each phase's output must survive translation into a different representation. If swapping the library or vendor name breaks the claim, the claim was welded to the representation.
|
|
43
|
+
- Drafting before reading. The four cuts come before any claim language. A pipeline that drafts before reading is sawing across the grain.
|
|
44
|
+
- Verdicts without named axes. Every REFINE-FIRST names the axis; every NOT-FILEABLE cites the anticipating art or the missing plane; every FILEABLE attaches the draft skeleton.
|
|
45
|
+
|
|
46
|
+
*Know the empty from the invariant. Read before you cut. Name the plane, name what it is not, name where it breaks, restate it until it survives restating. Then strike once, cleanly, and let the words be only the stake.*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "coverage",
|
|
3
|
+
"description": "2 elements x 1 ref with one present cell -> matrix + coverage_fraction 0.5",
|
|
4
|
+
"input": {
|
|
5
|
+
"elements": ["spawn with declared grant", "hash-mismatch to model reasoning"],
|
|
6
|
+
"references": ["NodeShield"],
|
|
7
|
+
"cells": { "0:0": "present", "1:0": "absent" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": [
|
|
10
|
+
{ "path": "coverage_fraction", "op": "equals", "value": 0.5 },
|
|
11
|
+
{ "path": "matrix.0.cells.0.status", "op": "equals", "value": "present" }
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "element-mapping-matrix",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "analysis",
|
|
5
|
+
"input_type": "elements-and-refs",
|
|
6
|
+
"output_type": "anticipation-matrix",
|
|
7
|
+
"determinism_ratio": 1.0,
|
|
8
|
+
"permission": { "tier": 0 },
|
|
9
|
+
"description": "Scaffold the element x reference anticipation matrix (rows = claim elements, cols = prior-art refs, cells default 'unmapped') and compute coverage_fraction from any filled cells. The deterministic structure the model then fills cell-by-cell — replaces a hand-typed confidence with a recomputable measure."
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// element-mapping-matrix — scaffold the element x reference anticipation grid + a recomputable
|
|
2
|
+
// coverage_fraction. Pure/deterministic. Rows = claim elements, cols = prior-art references;
|
|
3
|
+
// each cell defaults 'unmapped' unless a status is supplied in input.cells (keyed
|
|
4
|
+
// "<elementIndex>:<refIndex>" -> "present"|"absent"|"partial"). coverage_fraction is the share
|
|
5
|
+
// of (element x ref) cells judged present|partial — a derived number, not a hand-typed score.
|
|
6
|
+
const FILLED = new Set(["present", "partial"]);
|
|
7
|
+
export default function run(input) {
|
|
8
|
+
const elements = Array.isArray(input.elements) ? input.elements : [];
|
|
9
|
+
const references = Array.isArray(input.references) ? input.references : [];
|
|
10
|
+
const cells = (input && typeof input.cells === "object" && input.cells) || {};
|
|
11
|
+
const matrix = elements.map((el, i) => ({
|
|
12
|
+
element: el,
|
|
13
|
+
cells: references.map((ref, j) => ({ reference: ref, status: cells[`${i}:${j}`] ?? "unmapped" })),
|
|
14
|
+
}));
|
|
15
|
+
const total = elements.length * references.length;
|
|
16
|
+
let filled = 0;
|
|
17
|
+
for (const row of matrix) for (const c of row.cells) if (FILLED.has(c.status)) filled++;
|
|
18
|
+
const coverage_fraction = total > 0 ? filled / total : 0;
|
|
19
|
+
return { matrix, coverage_fraction, element_count: elements.length, reference_count: references.length };
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "number-adder",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "extraction",
|
|
5
|
+
"input_type": "addends",
|
|
6
|
+
"output_type": "sum-result",
|
|
7
|
+
"determinism_ratio": 1.0,
|
|
8
|
+
"permission": { "tier": 0 },
|
|
9
|
+
"description": "Add two numbers. Pure, deterministic — the smallest skill that proves the package + fixtures + determinism loop."
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// number-adder — the execution half. Pure: input in, output out, no I/O, no LLM.
|
|
2
|
+
// determinism_ratio 1.0 (the code resolves the entire output; the residual is empty).
|
|
3
|
+
//
|
|
4
|
+
// `source` is the skill's own identity. A skill-backed chair seals the skill's return value
|
|
5
|
+
// verbatim, so when that chair is Signal-cored the skill is the only thing that can answer
|
|
6
|
+
// "where did this come from" — and the #227 ruling makes that answer mandatory on every
|
|
7
|
+
// Signal, bare or subtyped. It is a constant, so the skill stays pure and every field still
|
|
8
|
+
// originates in code (determinism_ratio 1.0 is unchanged).
|
|
9
|
+
export default function run(input) {
|
|
10
|
+
const { a, b } = input;
|
|
11
|
+
return { sum: a + b, source: "skill://number-adder@1" };
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "parse",
|
|
3
|
+
"description": "parses a PatentsView payload into structured hits, corpus tagged patentsview",
|
|
4
|
+
"input": {
|
|
5
|
+
"query": "permission tier subprocess sandbox",
|
|
6
|
+
"mock_response": {
|
|
7
|
+
"patents": [
|
|
8
|
+
{ "patent_id": "US10000000", "patent_title": "Sandboxed execution of untrusted code", "patent_date": "2018-06-19", "patent_abstract": "A method for executing untrusted code in a permission-scoped subprocess." }
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"assertions": [
|
|
13
|
+
{ "path": "corpus", "op": "equals", "value": "patentsview" },
|
|
14
|
+
{ "path": "hits", "op": "exists" },
|
|
15
|
+
{ "path": "hits.0.title", "op": "is_string" },
|
|
16
|
+
{ "path": "hits.0.patent_number", "op": "equals", "value": "US10000000" }
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "patent-fetch",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "extraction",
|
|
5
|
+
"input_type": "patent-query",
|
|
6
|
+
"output_type": "patent-hits",
|
|
7
|
+
"corpus": "patentsview",
|
|
8
|
+
"determinism_ratio": 1.0,
|
|
9
|
+
"permission": { "tier": 0 },
|
|
10
|
+
"description": "Query the USPTO PatentsView corpus for prior art. Deterministic core is the parser (mock_response -> structured hits); the live path fetches when given a query. corpus is always 'patentsview' so coverage-report can attest which corpus was searched."
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// patent-fetch — query USPTO PatentsView for prior art.
|
|
2
|
+
//
|
|
3
|
+
// The deterministic core is the PARSER: given input.mock_response (a PatentsView payload),
|
|
4
|
+
// it maps patents -> structured hits with zero I/O (this is what the fixture exercises, so
|
|
5
|
+
// determinism_ratio is 1.0). The live path fetches when given input.query; if the cage
|
|
6
|
+
// blocks the network, it degrades to { hits: [], error } and the agent's own WebFetch grant
|
|
7
|
+
// is the retrieval path. corpus is always 'patentsview' — coverage-report attests it.
|
|
8
|
+
function parse(resp) {
|
|
9
|
+
const patents = resp && Array.isArray(resp.patents) ? resp.patents : [];
|
|
10
|
+
return patents.map((p) => ({
|
|
11
|
+
source: "USPTO PatentsView",
|
|
12
|
+
patent_number: p.patent_id ?? p.patent_number ?? "",
|
|
13
|
+
title: p.patent_title ?? p.title ?? "",
|
|
14
|
+
date: p.patent_date ?? p.date ?? "",
|
|
15
|
+
abstract: p.patent_abstract ?? p.abstract ?? "",
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default async function run(input) {
|
|
20
|
+
const query = input && input.query ? String(input.query) : "";
|
|
21
|
+
if (input && input.mock_response) {
|
|
22
|
+
return { corpus: "patentsview", query, hits: parse(input.mock_response) };
|
|
23
|
+
}
|
|
24
|
+
const q = JSON.stringify({ _text_any: { patent_title: query } });
|
|
25
|
+
const f = JSON.stringify(["patent_id", "patent_title", "patent_date", "patent_abstract"]);
|
|
26
|
+
const url = `https://search.patentsview.org/api/v1/patent/?q=${encodeURIComponent(q)}&f=${encodeURIComponent(f)}`;
|
|
27
|
+
try {
|
|
28
|
+
const res = await fetch(url);
|
|
29
|
+
const json = await res.json();
|
|
30
|
+
return { corpus: "patentsview", query, hits: parse({ patents: json.patents ?? [] }) };
|
|
31
|
+
} catch (e) {
|
|
32
|
+
return { corpus: "patentsview", query, hits: [], error: String((e && e.message) || e) };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "basic",
|
|
3
|
+
"description": "two claim elements expand to per-element keyword queries plus a combined query",
|
|
4
|
+
"input": {
|
|
5
|
+
"elements": [
|
|
6
|
+
"spawning a process with operating-system permission flags from a declared grant",
|
|
7
|
+
"content-hash verification of the code unit before execution"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"assertions": [
|
|
11
|
+
{ "path": "queries", "op": "exists" },
|
|
12
|
+
{ "path": "queries.0", "op": "is_string" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "query-expand",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "extraction",
|
|
5
|
+
"input_type": "claim-elements",
|
|
6
|
+
"output_type": "search-queries",
|
|
7
|
+
"determinism_ratio": 1.0,
|
|
8
|
+
"permission": { "tier": 0 },
|
|
9
|
+
"description": "Turn a claim's functional elements into a deterministic set of prior-art search queries (keyword sets, stopwords stripped). Pure — no I/O, no model."
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// query-expand — claim elements -> prior-art search queries. Pure/deterministic.
|
|
2
|
+
// Per element, strip patent boilerplate + stopwords to a keyword query; then a cross-element
|
|
3
|
+
// query from the most frequent keywords. Same input -> same queries (determinism_ratio 1.0).
|
|
4
|
+
const STOP = new Set([
|
|
5
|
+
"a", "an", "the", "of", "to", "for", "and", "or", "with", "is", "in", "on", "by", "at",
|
|
6
|
+
"from", "as", "that", "such", "said", "wherein", "comprising", "method", "system", "apparatus",
|
|
7
|
+
]);
|
|
8
|
+
|
|
9
|
+
function keywords(text) {
|
|
10
|
+
return String(text)
|
|
11
|
+
.toLowerCase()
|
|
12
|
+
.replace(/[^a-z0-9 ]/g, " ")
|
|
13
|
+
.split(/\s+/)
|
|
14
|
+
.filter((w) => w.length > 2 && !STOP.has(w));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function run(input) {
|
|
18
|
+
const elements = Array.isArray(input.elements) ? input.elements : [];
|
|
19
|
+
const queries = [];
|
|
20
|
+
const freq = {};
|
|
21
|
+
for (const el of elements) {
|
|
22
|
+
const kws = keywords(el);
|
|
23
|
+
if (kws.length) queries.push(kws.slice(0, 6).join(" "));
|
|
24
|
+
for (const w of kws) freq[w] = (freq[w] || 0) + 1;
|
|
25
|
+
}
|
|
26
|
+
const top = Object.keys(freq).sort((x, y) => freq[y] - freq[x] || (x < y ? -1 : 1)).slice(0, 8);
|
|
27
|
+
if (top.length) queries.push(top.join(" "));
|
|
28
|
+
return { queries };
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "basic",
|
|
3
|
+
"description": "contract: the verdict is a {passed, total} pair of numbers. (Not auto-run at load — it spawns the test command; the verdict shape is the contract.)",
|
|
4
|
+
"input": { "target": "tests/example_hello_band.test.ts" },
|
|
5
|
+
"assertions": [
|
|
6
|
+
{ "path": "passed", "op": "is_number" },
|
|
7
|
+
{ "path": "total", "op": "is_number" }
|
|
8
|
+
]
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "run-vitest-band",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"skill_type": "orchestration",
|
|
5
|
+
"permission": { "tier": 2 },
|
|
6
|
+
"determinism_ratio": 1.0,
|
|
7
|
+
"input_type": "test-target",
|
|
8
|
+
"output_type": "test-verdict",
|
|
9
|
+
"output_schema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"passed": { "type": "number" },
|
|
13
|
+
"total": { "type": "number" },
|
|
14
|
+
"failures": { "type": "array" }
|
|
15
|
+
},
|
|
16
|
+
"required": ["passed", "total"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Pure-code product skill (determinism 1.0): run the deterministic test command and parse
|
|
2
|
+
// the verdict. This is the proper fix for "an LLM should not babysit a deterministic
|
|
3
|
+
// command" — the command IS the answer; no model resolves any field. Tier 2 (spawns vitest).
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
|
|
6
|
+
export default function run(input) {
|
|
7
|
+
const target = input && input.target ? String(input.target) : "";
|
|
8
|
+
const args = ["vitest", "run", "--reporter=json", ...(target ? [target] : [])];
|
|
9
|
+
const r = spawnSync("npx", args, { encoding: "utf-8", maxBuffer: 128 * 1024 * 1024 });
|
|
10
|
+
const out = r.stdout || "";
|
|
11
|
+
let report = null;
|
|
12
|
+
try {
|
|
13
|
+
report = JSON.parse(out.slice(out.indexOf("{")));
|
|
14
|
+
} catch {
|
|
15
|
+
return { passed: 0, total: 0, failures: ["could not parse vitest json report"] };
|
|
16
|
+
}
|
|
17
|
+
const total = report.numTotalTests ?? 0;
|
|
18
|
+
const passed = report.numPassedTests ?? 0;
|
|
19
|
+
const failures = (report.testResults ?? [])
|
|
20
|
+
.flatMap((f) => (f.assertionResults ?? []).filter((a) => a.status === "failed").map((a) => a.fullName ?? a.title));
|
|
21
|
+
return { passed, total, failures };
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "one-open-statute",
|
|
3
|
+
"description": "all four statutes present; an unaddressed §112 keeps all_cleared false",
|
|
4
|
+
"input": {
|
|
5
|
+
"assessments": {
|
|
6
|
+
"§101": { "cleared": true },
|
|
7
|
+
"§102": { "cleared": true },
|
|
8
|
+
"§103": { "cleared": true }
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"assertions": [
|
|
12
|
+
{ "path": "all_cleared", "op": "equals", "value": false },
|
|
13
|
+
{ "path": "statutes_checked", "op": "exists" },
|
|
14
|
+
{ "path": "checklist.3.cleared", "op": "equals", "value": false }
|
|
15
|
+
]
|
|
16
|
+
}
|