Conflicts in mesh-knowledge: main.go Verbs and manifest_test.go, A6's draft verbs and #610's close, both kept in the manifest's order; review.go reviewOne, A6 judges a version in parts and #610 judges a closing on its closing alone: a closing version is one part (ClosingPart) asked ClosingQuestion. Joined: close.go's asks import by the rewrite map, and its rules probe names its overview section "Overview", since A6's section-form rule refuses a file-named section (close's test failed on it). Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
395 lines
13 KiB
JSON
395 lines
13 KiB
JSON
{
|
|
"module": "mesh-knowledge",
|
|
"version": "1",
|
|
"slug": "knowledge",
|
|
"requires": [
|
|
"postgres-database",
|
|
"route",
|
|
{
|
|
"name": "records", "storage": "ledger", "template": "ledger", "options": {"max-mib": 1024},
|
|
"types": [
|
|
{
|
|
"name": "decision",
|
|
"schema": {
|
|
"kind": {"type": "string"},
|
|
"number": {"type": "integer"},
|
|
"entry": {"type": "object"},
|
|
"version": {"type": "object"},
|
|
"pending-sections": {"type": "object"},
|
|
"title": {"type": "string"},
|
|
"text": {"type": "string"},
|
|
"digest": {"type": "string", "digest-of": "text"},
|
|
"why": {"type": "string"},
|
|
"reason": {"type": "string"}
|
|
},
|
|
"operations": [
|
|
{"name": "reserve", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "propose", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "write-section", "effect": "set-entry", "into": "pending-sections", "key": "title", "fields": ["title", "digest"], "sequence": true, "author": true},
|
|
{"name": "submit", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "drop", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "import", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "form", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "take-over", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "review", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "ask", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "warrant", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "accept", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "withdraw", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "retract", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "draft", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true}
|
|
]
|
|
},
|
|
{
|
|
"name": "research",
|
|
"schema": {
|
|
"kind": {"type": "string"},
|
|
"number": {"type": "integer"},
|
|
"entry": {"type": "object"},
|
|
"version": {"type": "object"},
|
|
"pending-sections": {"type": "object"},
|
|
"title": {"type": "string"},
|
|
"text": {"type": "string"},
|
|
"digest": {"type": "string", "digest-of": "text"},
|
|
"why": {"type": "string"},
|
|
"reason": {"type": "string"}
|
|
},
|
|
"operations": [
|
|
{"name": "reserve", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "propose", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "write-section", "effect": "set-entry", "into": "pending-sections", "key": "title", "fields": ["title", "digest"], "sequence": true, "author": true},
|
|
{"name": "submit", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "drop", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "import", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "form", "effect": "set-fields", "fields": ["kind", "number", "entry", "pending-sections"], "sequence": true, "author": true},
|
|
{"name": "take-over", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "review", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "ask", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "warrant", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "accept", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "withdraw", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "retract", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true},
|
|
{"name": "draft", "effect": "set-fields", "fields": ["kind", "number", "entry"], "sequence": true, "author": true}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{"name": "drafts", "storage": "key-value", "template": "state", "options": {"key-ttl": true}},
|
|
{"name": "asked", "storage": "key-value", "template": "state"},
|
|
{"name": "findings", "storage": "key-value", "template": "state"},
|
|
{"name": "sent", "storage": "key-value", "template": "state"},
|
|
{"name": "reviews", "storage": "stream", "configuration": {"when-full": "refuse", "max-mib": 512, "max-age-days": "none", "grant": "readers", "events": ["part-reviewed"]}}
|
|
],
|
|
"contributes": {
|
|
"postgres-database": {
|
|
"name": "knowledge"
|
|
},
|
|
"route": {
|
|
"label": "knowledge",
|
|
"endpoint": "overview"
|
|
}
|
|
},
|
|
"binds": {
|
|
"postgres-database": "${dir:state}/database.json",
|
|
"route": "${dir:state}/route.json"
|
|
},
|
|
"listens": [
|
|
{
|
|
"name": "overview",
|
|
"port": 8480,
|
|
"protocol": "tcp",
|
|
"from": "machine",
|
|
"why": "the overview page, read-only: only a process on this machine reaches it, and the operator through the route proxy (novox/hq ADR 0616 §4)"
|
|
}
|
|
],
|
|
"secrets": {
|
|
"postgres-database": "${dir:state}/database.secret"
|
|
},
|
|
"seats": [
|
|
{
|
|
"name": "knowledge-base",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"ask",
|
|
"get",
|
|
"list",
|
|
"findings",
|
|
"holds",
|
|
"links",
|
|
"history",
|
|
"reserve",
|
|
"propose",
|
|
"open",
|
|
"write",
|
|
"remove",
|
|
"order",
|
|
"submit",
|
|
"drop",
|
|
"take-over",
|
|
"import",
|
|
"return",
|
|
"withdraw",
|
|
"close",
|
|
"retract",
|
|
"progress"
|
|
]
|
|
}
|
|
],
|
|
"claims": [
|
|
{
|
|
"name": "knowledge-base",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"ask",
|
|
"get",
|
|
"list",
|
|
"findings",
|
|
"holds",
|
|
"links",
|
|
"history",
|
|
"reserve",
|
|
"propose",
|
|
"open",
|
|
"write",
|
|
"remove",
|
|
"order",
|
|
"submit",
|
|
"drop",
|
|
"take-over",
|
|
"import",
|
|
"return",
|
|
"withdraw",
|
|
"close",
|
|
"retract",
|
|
"progress"
|
|
]
|
|
}
|
|
],
|
|
"tools": [
|
|
"knowledge_health",
|
|
"knowledge_highest",
|
|
"knowledge_marks",
|
|
"knowledge_head",
|
|
"knowledge_operations",
|
|
"knowledge_section",
|
|
"knowledge_draft",
|
|
"knowledge_parts",
|
|
"knowledge_asked",
|
|
"knowledge_fill",
|
|
"knowledge_rebuild_index",
|
|
"knowledge_review_again",
|
|
"knowledge_integrity",
|
|
"knowledge_form_only",
|
|
"knowledge_move",
|
|
"knowledge_move_check",
|
|
"knowledge_overview",
|
|
"knowledge_overview_reread"
|
|
],
|
|
"emits": [
|
|
"reserved",
|
|
"proposed",
|
|
"reviewed",
|
|
"accepted",
|
|
"changed",
|
|
"imported",
|
|
"drafted",
|
|
"confirmed",
|
|
"returned",
|
|
"opened",
|
|
"written",
|
|
"removed",
|
|
"ordered",
|
|
"submitted",
|
|
"dropped",
|
|
"taken-over",
|
|
"part-reviewed",
|
|
"moved",
|
|
"checked",
|
|
"formed"
|
|
],
|
|
"consumes": [
|
|
"claude-code.judged",
|
|
"mesh-issues.opened",
|
|
"mesh-issues.moved",
|
|
"mesh-issues.milestone-set",
|
|
"mesh-issues.milestone-moved",
|
|
"mesh-delivery-gate.group",
|
|
"mesh-delivery-gate.transition",
|
|
"mesh-delivery-gate.merged",
|
|
"messenger.offered",
|
|
"messenger.closed"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"invokes": [
|
|
"seat:issue-tracker.reserve",
|
|
"claude-code.claude_code_judge",
|
|
"records.records_status",
|
|
"records.records_list",
|
|
"records.records_read",
|
|
"seat:operator-channel.notify",
|
|
"seat:issue-tracker.list",
|
|
"seat:issue-tracker.get",
|
|
"seat:issue-tracker.milestones",
|
|
"seat:issue-tracker.changes",
|
|
"seat:mesh-delivery.deliveries",
|
|
"seat:mesh-delivery.show",
|
|
"seat:mesh-delivery.groups",
|
|
"seat:operator-channel.asks",
|
|
"seat:mesh-hand-acts.hand-act"
|
|
],
|
|
"config": {
|
|
"readers": {
|
|
"type": "object",
|
|
"description": "The modules heard on the reviews of records (the stream of each part's verdict), by name, each with why; empty grants none. Set only at the controller's terminal or on the operator's Approve.",
|
|
"default": {}
|
|
},
|
|
"judge-model": {
|
|
"type": "string",
|
|
"description": "The model the knowledge base's drafting and confirming judgements ask, by the agent's name for it, such as sonnet; empty is sonnet.",
|
|
"default": "sonnet"
|
|
},
|
|
"drafting": {
|
|
"type": "string",
|
|
"description": "Whether the knowledge base drafts and confirms clauses itself: off stops it, anything else is on.",
|
|
"default": "on"
|
|
},
|
|
"reserved-for": {
|
|
"type": "string",
|
|
"description": "How long a reserved number waits for its proposal before it is withdrawn, as a duration such as 168h; empty is the knowledge base's own default.",
|
|
"pattern": "|[0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h)([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))*",
|
|
"default": "168h"
|
|
},
|
|
"research-active-at-most": {
|
|
"type": "number",
|
|
"description": "The most research efforts that may be active at once; propose refuses a further one, which is parked as an idea instead. 0 or empty is 3.",
|
|
"minimum": 0,
|
|
"default": 3
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "database-url",
|
|
"type": "file",
|
|
"path": "${dir:state}/database.url",
|
|
"mode": "0600",
|
|
"template": "files/database.url"
|
|
},
|
|
{
|
|
"id": "settings",
|
|
"trusted": false,
|
|
"type": "file",
|
|
"path": "${dir:state}/settings.json",
|
|
"mode": "0600",
|
|
"takes-config": ["judge-model", "drafting", "reserved-for", "research-active-at-most"],
|
|
"merge": "json",
|
|
"template": "files/settings.json"
|
|
},
|
|
{
|
|
"id": "readers",
|
|
"type": "file",
|
|
"path": "${dir:state}/readers.json",
|
|
"mode": "0600",
|
|
"takes-config": ["readers"],
|
|
"merge": "json",
|
|
"template": "files/readers.json"
|
|
},
|
|
{
|
|
"id": "prepare",
|
|
"type": "process",
|
|
"name": "mesh-knowledge-prepare",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./mesh-knowledge",
|
|
"prepare"
|
|
],
|
|
"run-once": true,
|
|
"env": {
|
|
"DATABASE_URL_FILE": "${dir:state}/database.url"
|
|
},
|
|
"restart-on": [
|
|
"database-url"
|
|
]
|
|
},
|
|
{
|
|
"id": "keep",
|
|
"type": "process",
|
|
"name": "mesh-knowledge-keep",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./mesh-knowledge",
|
|
"keep"
|
|
],
|
|
"env": {
|
|
"DATABASE_URL_FILE": "${dir:state}/database.url"
|
|
},
|
|
"restart-on": [
|
|
"database-url"
|
|
],
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
},
|
|
{
|
|
"id": "watch",
|
|
"type": "process",
|
|
"name": "mesh-knowledge-watch",
|
|
"artifact": "tools",
|
|
"run": [
|
|
"./mesh-knowledge",
|
|
"watch"
|
|
],
|
|
"user": "${machine:account}",
|
|
"env": {
|
|
"DATABASE_URL_FILE": "${dir:state}/database.url",
|
|
"MESH_KNOWLEDGE_STATUS": "${dir:state}/health.json"
|
|
},
|
|
"restart-on": [
|
|
"database-url"
|
|
],
|
|
"health": {
|
|
"kind": "tool",
|
|
"tool": "knowledge_health",
|
|
"needs": "postgres-database",
|
|
"interval": "60s",
|
|
"timeout": "10s",
|
|
"looks": 2,
|
|
"grace": "180s"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-knowledge",
|
|
"binary": "mesh-knowledge",
|
|
"loads": [
|
|
"mesh-knowledge"
|
|
],
|
|
"env": {
|
|
"DATABASE_URL_FILE": "${dir:state}/database.url",
|
|
"MESH_KNOWLEDGE_SETTINGS": "${dir:state}/settings.json",
|
|
"MESH_KNOWLEDGE_STATUS": "${dir:state}/health.json"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|