generated from coulomb/repo-seed
Some checks failed
ci / validate-registry (push) Has been cancelled
llm-connect came up locally (mock provider, 127.0.0.1:8080), unblocking this task. reuse_surface/plan_check.py: build_rerank_prompt/request_rerank/apply_rerank, reusing llm_bridge.execute_prompt/extract_json_object (same pattern as maintain_llm.py's request_maintain_patches). New schema schemas/plan-check-rerank.schema.json rejects malformed responses (missing fields, non-JSON, invented candidate ids outside the input set) rather than guessing. Per design principle 3 (deterministic matches always rank first), apply_rerank appends LLM-scored entries after the deterministic list (kind: 'llm') instead of reordering it -- the trusted base result is identical with or without the rerank pass. Graceful skip via a 'notes' field when LLM_CONNECT_URL is unset or the response is malformed, mirroring maintain.py's no_llm/skip pattern. New --llm-url/--no-llm CLI flags. Also extended plan-check-result.schema.json for 'notes' and the (pre-existing, previously unschema'd) 'filed_capability_request' field. 9 new pytest cases; 89 total pass. Live-verified against the running llm-connect instance: it correctly rejected the mock provider's non-JSON response and surfaced the skip note, with the deterministic verdict and match order completely unaffected. REUSE-WP-0018 is now fully done (T01-T06). Updated docs/IntentScopeGapAnalysis.md priority 29 to Closed and the workplan's own frontmatter status to finished. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
60 lines
1.8 KiB
JSON
60 lines
1.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://reuse-surface.local/schemas/plan-check-result.schema.json",
|
|
"title": "PlanCheckResult",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["query", "verdict", "top_score", "matches"],
|
|
"properties": {
|
|
"query": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["source", "text"],
|
|
"properties": {
|
|
"source": {"type": "string", "enum": ["workplan", "intent"]},
|
|
"text": {"type": "string", "minLength": 1},
|
|
"workplan_id": {"type": ["string", "null"]},
|
|
"workplan_path": {"type": ["string", "null"]}
|
|
}
|
|
},
|
|
"verdict": {
|
|
"type": "string",
|
|
"enum": ["reuse", "extend", "new"]
|
|
},
|
|
"top_score": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1
|
|
},
|
|
"matches": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "score", "kind"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^capability\\.[a-z0-9]+(\\.[a-z0-9-]+)+$"
|
|
},
|
|
"score": {"type": "number", "minimum": 0, "maximum": 1},
|
|
"vector": {"type": ["string", "null"]},
|
|
"owner": {"type": ["string", "null"]},
|
|
"summary": {"type": ["string", "null"]},
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": ["deterministic", "llm", "related"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"federated_index_updated": {"type": ["string", "null"]},
|
|
"federated_index_stale_warning": {"type": ["string", "null"]},
|
|
"notes": {
|
|
"type": "array",
|
|
"items": {"type": "string"}
|
|
},
|
|
"filed_capability_request": {"type": ["object", "null"]}
|
|
}
|
|
}
|