wip: [01-stabilize] paused at task 1/1 - OCR Hallucination Immune logic via Semantic delta window and fret-isolation

This commit is contained in:
2026-03-29 22:08:40 +09:00
parent aca7bf592a
commit 2507de45d3
4289 changed files with 732689 additions and 28672 deletions

View File

@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ECC Install Config",
"type": "object",
"additionalProperties": false,
"required": [
"version"
],
"properties": {
"$schema": {
"type": "string",
"minLength": 1
},
"version": {
"type": "integer",
"const": 1
},
"target": {
"type": "string",
"enum": [
"claude",
"cursor",
"antigravity",
"codex",
"opencode"
]
},
"profile": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
},
"modules": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
}
},
"include": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(baseline|lang|framework|capability):[a-z0-9-]+$"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(baseline|lang|framework|capability):[a-z0-9-]+$"
}
},
"options": {
"type": "object",
"additionalProperties": true
}
}
}

View File

@@ -0,0 +1,197 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Claude Code Hooks Configuration",
"description": "Configuration for Claude Code hooks. Supports current Claude Code hook events and hook action types.",
"$defs": {
"stringArray": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"commandHookItem": {
"type": "object",
"required": [
"type",
"command"
],
"properties": {
"type": {
"type": "string",
"const": "command",
"description": "Run a local command"
},
"command": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"$ref": "#/$defs/stringArray"
}
]
},
"async": {
"type": "boolean",
"description": "Run hook asynchronously in background without blocking"
},
"timeout": {
"type": "number",
"minimum": 0,
"description": "Timeout in seconds for async hooks"
}
},
"additionalProperties": true
},
"httpHookItem": {
"type": "object",
"required": [
"type",
"url"
],
"properties": {
"type": {
"type": "string",
"const": "http"
},
"url": {
"type": "string",
"minLength": 1
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"allowedEnvVars": {
"$ref": "#/$defs/stringArray"
},
"timeout": {
"type": "number",
"minimum": 0
}
},
"additionalProperties": true
},
"promptHookItem": {
"type": "object",
"required": [
"type",
"prompt"
],
"properties": {
"type": {
"type": "string",
"enum": ["prompt", "agent"]
},
"prompt": {
"type": "string",
"minLength": 1
},
"model": {
"type": "string",
"minLength": 1
},
"timeout": {
"type": "number",
"minimum": 0
}
},
"additionalProperties": true
},
"hookItem": {
"oneOf": [
{
"$ref": "#/$defs/commandHookItem"
},
{
"$ref": "#/$defs/httpHookItem"
},
{
"$ref": "#/$defs/promptHookItem"
}
]
},
"matcherEntry": {
"type": "object",
"required": [
"hooks"
],
"properties": {
"matcher": {
"oneOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"hooks": {
"type": "array",
"items": {
"$ref": "#/$defs/hookItem"
}
},
"description": {
"type": "string"
}
}
}
},
"oneOf": [
{
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"hooks": {
"type": "object",
"propertyNames": {
"enum": [
"SessionStart",
"UserPromptSubmit",
"PreToolUse",
"PermissionRequest",
"PostToolUse",
"PostToolUseFailure",
"Notification",
"SubagentStart",
"Stop",
"SubagentStop",
"PreCompact",
"InstructionsLoaded",
"TeammateIdle",
"TaskCompleted",
"ConfigChange",
"WorktreeCreate",
"WorktreeRemove",
"SessionEnd"
]
},
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/$defs/matcherEntry"
}
}
}
},
"required": [
"hooks"
]
},
{
"type": "array",
"items": {
"$ref": "#/$defs/matcherEntry"
}
}
]
}

View File

@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ECC Install Components",
"type": "object",
"additionalProperties": false,
"required": [
"version",
"components"
],
"properties": {
"version": {
"type": "integer",
"minimum": 1
},
"components": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"family",
"description",
"modules"
],
"properties": {
"id": {
"type": "string",
"pattern": "^(baseline|lang|framework|capability|agent|skill):[a-z0-9-]+$"
},
"family": {
"type": "string",
"enum": [
"baseline",
"language",
"framework",
"capability",
"agent",
"skill"
]
},
"description": {
"type": "string",
"minLength": 1
},
"modules": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
}
}
}
}
}
}
}

View File

@@ -0,0 +1,105 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ECC Install Modules",
"type": "object",
"properties": {
"version": {
"type": "integer",
"minimum": 1
},
"modules": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
},
"kind": {
"type": "string",
"enum": [
"rules",
"agents",
"commands",
"hooks",
"platform",
"orchestration",
"skills"
]
},
"description": {
"type": "string",
"minLength": 1
},
"paths": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"targets": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": [
"claude",
"cursor",
"antigravity",
"codex",
"opencode"
]
}
},
"dependencies": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
}
},
"defaultInstall": {
"type": "boolean"
},
"cost": {
"type": "string",
"enum": [
"light",
"medium",
"heavy"
]
},
"stability": {
"type": "string",
"enum": [
"experimental",
"beta",
"stable"
]
}
},
"required": [
"id",
"kind",
"description",
"paths",
"targets",
"dependencies",
"defaultInstall",
"cost",
"stability"
],
"additionalProperties": false
}
}
},
"required": [
"version",
"modules"
],
"additionalProperties": false
}

View File

@@ -0,0 +1,45 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ECC Install Profiles",
"type": "object",
"properties": {
"version": {
"type": "integer",
"minimum": 1
},
"profiles": {
"type": "object",
"minProperties": 1,
"propertyNames": {
"pattern": "^[a-z0-9-]+$"
},
"additionalProperties": {
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1
},
"modules": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
}
}
},
"required": [
"description",
"modules"
],
"additionalProperties": false
}
}
},
"required": [
"version",
"profiles"
],
"additionalProperties": false
}

View File

@@ -0,0 +1,210 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ECC install state",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"installedAt",
"target",
"request",
"resolution",
"source",
"operations"
],
"properties": {
"schemaVersion": {
"type": "string",
"const": "ecc.install.v1"
},
"installedAt": {
"type": "string",
"minLength": 1
},
"lastValidatedAt": {
"type": "string",
"minLength": 1
},
"target": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"root",
"installStatePath"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"target": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"enum": [
"home",
"project"
]
},
"root": {
"type": "string",
"minLength": 1
},
"installStatePath": {
"type": "string",
"minLength": 1
}
}
},
"request": {
"type": "object",
"additionalProperties": false,
"required": [
"profile",
"modules",
"includeComponents",
"excludeComponents",
"legacyLanguages",
"legacyMode"
],
"properties": {
"profile": {
"type": [
"string",
"null"
]
},
"modules": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"includeComponents": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"excludeComponents": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"legacyLanguages": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"legacyMode": {
"type": "boolean"
}
}
},
"resolution": {
"type": "object",
"additionalProperties": false,
"required": [
"selectedModules",
"skippedModules"
],
"properties": {
"selectedModules": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"skippedModules": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
}
},
"source": {
"type": "object",
"additionalProperties": false,
"required": [
"repoVersion",
"repoCommit",
"manifestVersion"
],
"properties": {
"repoVersion": {
"type": [
"string",
"null"
]
},
"repoCommit": {
"type": [
"string",
"null"
]
},
"manifestVersion": {
"type": "integer",
"minimum": 1
}
}
},
"operations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"kind",
"moduleId",
"sourceRelativePath",
"destinationPath",
"strategy",
"ownership",
"scaffoldOnly"
],
"properties": {
"kind": {
"type": "string",
"minLength": 1
},
"moduleId": {
"type": "string",
"minLength": 1
},
"sourceRelativePath": {
"type": "string",
"minLength": 1
},
"destinationPath": {
"type": "string",
"minLength": 1
},
"strategy": {
"type": "string",
"minLength": 1
},
"ownership": {
"type": "string",
"minLength": 1
},
"scaffoldOnly": {
"type": "boolean"
}
}
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Package Manager Configuration",
"type": "object",
"properties": {
"packageManager": {
"type": "string",
"enum": [
"npm",
"pnpm",
"yarn",
"bun"
]
},
"setAt": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp when the preference was last set"
}
},
"required": ["packageManager"],
"additionalProperties": false
}

View File

@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Claude Plugin Configuration",
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
"description": { "type": "string" },
"author": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"properties": {
"name": { "type": "string" },
"url": { "type": "string", "format": "uri" }
},
"required": ["name"]
}
]
},
"homepage": { "type": "string", "format": "uri" },
"repository": { "type": "string" },
"license": { "type": "string" },
"keywords": {
"type": "array",
"items": { "type": "string" }
},
"skills": {
"type": "array",
"items": { "type": "string" }
},
"agents": {
"type": "array",
"items": { "type": "string" }
},
"features": {
"type": "object",
"properties": {
"agents": { "type": "integer", "minimum": 0 },
"commands": { "type": "integer", "minimum": 0 },
"skills": { "type": "integer", "minimum": 0 },
"configAssets": { "type": "boolean" },
"hookEvents": {
"type": "array",
"items": { "type": "string" }
},
"customTools": {
"type": "array",
"items": { "type": "string" }
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Skill Provenance",
"description": "Provenance metadata for learned and imported skills. Required in ~/.claude/skills/learned/* and ~/.claude/skills/imported/*",
"type": "object",
"properties": {
"source": {
"type": "string",
"minLength": 1,
"description": "Origin (URL, path, or identifier)"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp"
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score 0-1"
},
"author": {
"type": "string",
"minLength": 1,
"description": "Who or what produced the skill"
}
},
"required": ["source", "created_at", "confidence", "author"],
"additionalProperties": true
}

View File

@@ -0,0 +1,316 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "ecc.state-store.v1",
"title": "ECC State Store Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"sessions": {
"type": "array",
"items": {
"$ref": "#/$defs/session"
}
},
"skillRuns": {
"type": "array",
"items": {
"$ref": "#/$defs/skillRun"
}
},
"skillVersions": {
"type": "array",
"items": {
"$ref": "#/$defs/skillVersion"
}
},
"decisions": {
"type": "array",
"items": {
"$ref": "#/$defs/decision"
}
},
"installState": {
"type": "array",
"items": {
"$ref": "#/$defs/installState"
}
},
"governanceEvents": {
"type": "array",
"items": {
"$ref": "#/$defs/governanceEvent"
}
}
},
"$defs": {
"nonEmptyString": {
"type": "string",
"minLength": 1
},
"nullableString": {
"type": [
"string",
"null"
]
},
"nullableInteger": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"jsonValue": {
"type": [
"object",
"array",
"string",
"number",
"boolean",
"null"
]
},
"jsonArray": {
"type": "array"
},
"session": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"adapterId",
"harness",
"state",
"repoRoot",
"startedAt",
"endedAt",
"snapshot"
],
"properties": {
"id": {
"$ref": "#/$defs/nonEmptyString"
},
"adapterId": {
"$ref": "#/$defs/nonEmptyString"
},
"harness": {
"$ref": "#/$defs/nonEmptyString"
},
"state": {
"$ref": "#/$defs/nonEmptyString"
},
"repoRoot": {
"$ref": "#/$defs/nullableString"
},
"startedAt": {
"$ref": "#/$defs/nullableString"
},
"endedAt": {
"$ref": "#/$defs/nullableString"
},
"snapshot": {
"type": [
"object",
"array"
]
}
}
},
"skillRun": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"skillId",
"skillVersion",
"sessionId",
"taskDescription",
"outcome",
"failureReason",
"tokensUsed",
"durationMs",
"userFeedback",
"createdAt"
],
"properties": {
"id": {
"$ref": "#/$defs/nonEmptyString"
},
"skillId": {
"$ref": "#/$defs/nonEmptyString"
},
"skillVersion": {
"$ref": "#/$defs/nonEmptyString"
},
"sessionId": {
"$ref": "#/$defs/nonEmptyString"
},
"taskDescription": {
"$ref": "#/$defs/nonEmptyString"
},
"outcome": {
"$ref": "#/$defs/nonEmptyString"
},
"failureReason": {
"$ref": "#/$defs/nullableString"
},
"tokensUsed": {
"$ref": "#/$defs/nullableInteger"
},
"durationMs": {
"$ref": "#/$defs/nullableInteger"
},
"userFeedback": {
"$ref": "#/$defs/nullableString"
},
"createdAt": {
"$ref": "#/$defs/nonEmptyString"
}
}
},
"skillVersion": {
"type": "object",
"additionalProperties": false,
"required": [
"skillId",
"version",
"contentHash",
"amendmentReason",
"promotedAt",
"rolledBackAt"
],
"properties": {
"skillId": {
"$ref": "#/$defs/nonEmptyString"
},
"version": {
"$ref": "#/$defs/nonEmptyString"
},
"contentHash": {
"$ref": "#/$defs/nonEmptyString"
},
"amendmentReason": {
"$ref": "#/$defs/nullableString"
},
"promotedAt": {
"$ref": "#/$defs/nullableString"
},
"rolledBackAt": {
"$ref": "#/$defs/nullableString"
}
}
},
"decision": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"sessionId",
"title",
"rationale",
"alternatives",
"supersedes",
"status",
"createdAt"
],
"properties": {
"id": {
"$ref": "#/$defs/nonEmptyString"
},
"sessionId": {
"$ref": "#/$defs/nonEmptyString"
},
"title": {
"$ref": "#/$defs/nonEmptyString"
},
"rationale": {
"$ref": "#/$defs/nonEmptyString"
},
"alternatives": {
"$ref": "#/$defs/jsonArray"
},
"supersedes": {
"$ref": "#/$defs/nullableString"
},
"status": {
"$ref": "#/$defs/nonEmptyString"
},
"createdAt": {
"$ref": "#/$defs/nonEmptyString"
}
}
},
"installState": {
"type": "object",
"additionalProperties": false,
"required": [
"targetId",
"targetRoot",
"profile",
"modules",
"operations",
"installedAt",
"sourceVersion"
],
"properties": {
"targetId": {
"$ref": "#/$defs/nonEmptyString"
},
"targetRoot": {
"$ref": "#/$defs/nonEmptyString"
},
"profile": {
"$ref": "#/$defs/nullableString"
},
"modules": {
"$ref": "#/$defs/jsonArray"
},
"operations": {
"$ref": "#/$defs/jsonArray"
},
"installedAt": {
"$ref": "#/$defs/nonEmptyString"
},
"sourceVersion": {
"$ref": "#/$defs/nullableString"
}
}
},
"governanceEvent": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"sessionId",
"eventType",
"payload",
"resolvedAt",
"resolution",
"createdAt"
],
"properties": {
"id": {
"$ref": "#/$defs/nonEmptyString"
},
"sessionId": {
"$ref": "#/$defs/nullableString"
},
"eventType": {
"$ref": "#/$defs/nonEmptyString"
},
"payload": {
"$ref": "#/$defs/jsonValue"
},
"resolvedAt": {
"$ref": "#/$defs/nullableString"
},
"resolution": {
"$ref": "#/$defs/nullableString"
},
"createdAt": {
"$ref": "#/$defs/nonEmptyString"
}
}
}
}
}