@autotelic/protocol 0.0.0-stage → 0.1.1

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.
Files changed (70) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +183 -2
  3. package/dist/baseline.d.ts +41 -0
  4. package/dist/baseline.d.ts.map +1 -0
  5. package/dist/baseline.js +62 -0
  6. package/dist/baseline.js.map +1 -0
  7. package/dist/catalog.d.ts +275 -0
  8. package/dist/catalog.d.ts.map +1 -0
  9. package/dist/catalog.js +437 -0
  10. package/dist/catalog.js.map +1 -0
  11. package/dist/compat.d.ts +12 -0
  12. package/dist/compat.d.ts.map +1 -0
  13. package/dist/compat.js +104 -0
  14. package/dist/compat.js.map +1 -0
  15. package/dist/config.d.ts +179 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/config.js +302 -0
  18. package/dist/config.js.map +1 -0
  19. package/dist/decode.d.ts +32 -0
  20. package/dist/decode.d.ts.map +1 -0
  21. package/dist/decode.js +71 -0
  22. package/dist/decode.js.map +1 -0
  23. package/dist/doc.d.ts +105 -0
  24. package/dist/doc.d.ts.map +1 -0
  25. package/dist/doc.js +159 -0
  26. package/dist/doc.js.map +1 -0
  27. package/dist/graph.d.ts +139 -0
  28. package/dist/graph.d.ts.map +1 -0
  29. package/dist/graph.js +258 -0
  30. package/dist/graph.js.map +1 -0
  31. package/dist/index.d.ts +22 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +22 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/intent.d.ts +32 -0
  36. package/dist/intent.d.ts.map +1 -0
  37. package/dist/intent.js +54 -0
  38. package/dist/intent.js.map +1 -0
  39. package/dist/json.d.ts +3 -0
  40. package/dist/json.d.ts.map +1 -0
  41. package/dist/json.js +18 -0
  42. package/dist/json.js.map +1 -0
  43. package/dist/lexicon.d.ts +58 -0
  44. package/dist/lexicon.d.ts.map +1 -0
  45. package/dist/lexicon.js +176 -0
  46. package/dist/lexicon.js.map +1 -0
  47. package/dist/patterns.d.ts +65 -0
  48. package/dist/patterns.d.ts.map +1 -0
  49. package/dist/patterns.js +166 -0
  50. package/dist/patterns.js.map +1 -0
  51. package/dist/recipes.d.ts +34 -0
  52. package/dist/recipes.d.ts.map +1 -0
  53. package/dist/recipes.js +74 -0
  54. package/dist/recipes.js.map +1 -0
  55. package/dist/report.d.ts +218 -0
  56. package/dist/report.d.ts.map +1 -0
  57. package/dist/report.js +330 -0
  58. package/dist/report.js.map +1 -0
  59. package/package.json +46 -3
  60. package/schema/baseline.json +29 -0
  61. package/schema/catalog.json +206 -0
  62. package/schema/cutlist.config.json +103 -0
  63. package/schema/intent.json +43 -0
  64. package/schema/jig.config.json +56 -0
  65. package/schema/manifest.json +67 -0
  66. package/schema/menu.json +169 -0
  67. package/schema/onboarding.json +25 -0
  68. package/schema/patterns.json +141 -0
  69. package/schema/recipes.json +57 -0
  70. package/schema/report.json +141 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://autotelic.dev/tackle/protocol/onboarding.json",
4
+ "title": "Onboarding",
5
+ "description": "The agent door: a repo-local prompt that is simultaneously the client engineer's documentation, the client agent's system-prompt fragment, and the thing a review surface diffs. One artifact, three readers.",
6
+ "type": "object",
7
+ "required": ["lexicon", "title", "prompt"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "lexicon": { "$ref": "#/$defs/lexicon" },
11
+ "title": { "type": "string" },
12
+ "prompt": { "type": "string" }
13
+ },
14
+ "$defs": {
15
+ "lexicon": {
16
+ "type": "object",
17
+ "required": ["name", "version"],
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "name": { "enum": ["onboarding"] },
21
+ "version": { "type": "integer", "minimum": 1 }
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://autotelic.dev/tackle/protocol/patterns.json",
4
+ "title": "Patterns",
5
+ "description": "The pattern-language view: each pattern has a context, forces, a solution, and relations; the view also carries the stable shape and the entropy signals.",
6
+ "type": "object",
7
+ "required": [
8
+ "lexicon",
9
+ "hash",
10
+ "stable",
11
+ "compositions",
12
+ "primitives",
13
+ "shared",
14
+ "families",
15
+ "signals"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "lexicon": { "$ref": "#/$defs/lexicon" },
20
+ "hash": { "type": "string" },
21
+ "stable": { "type": "array", "items": { "$ref": "#/$defs/pattern" } },
22
+ "compositions": { "type": "array", "items": { "$ref": "#/$defs/pattern" } },
23
+ "primitives": { "type": "array", "items": { "$ref": "#/$defs/pattern" } },
24
+ "shared": { "type": "array", "items": { "$ref": "#/$defs/pattern" } },
25
+ "families": { "type": "array", "items": { "$ref": "#/$defs/pattern" } },
26
+ "signals": { "$ref": "#/$defs/signals" }
27
+ },
28
+ "$defs": {
29
+ "lexicon": {
30
+ "type": "object",
31
+ "required": ["name", "version"],
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "name": { "enum": ["patterns"] },
35
+ "version": { "type": "integer", "minimum": 1 }
36
+ }
37
+ },
38
+ "tier": { "enum": ["primitive", "shared", "local"] },
39
+ "role": {
40
+ "enum": ["component", "hook", "context", "provider", "barrel", "route", "module"]
41
+ },
42
+ "relation": {
43
+ "type": "object",
44
+ "required": ["kind", "target"],
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "kind": {
48
+ "enum": [
49
+ "uses",
50
+ "part-of",
51
+ "variant-of",
52
+ "replaces",
53
+ "block",
54
+ "hook",
55
+ "context",
56
+ "provider",
57
+ "barrel"
58
+ ]
59
+ },
60
+ "target": { "type": "string" }
61
+ }
62
+ },
63
+ "factors": {
64
+ "type": "object",
65
+ "required": ["tier", "adoption", "ownership", "variant", "documented"],
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "tier": { "type": "number", "minimum": 0, "maximum": 1 },
69
+ "adoption": { "type": "number", "minimum": 0, "maximum": 1 },
70
+ "ownership": { "type": "number", "minimum": 0, "maximum": 1 },
71
+ "variant": { "type": "number", "minimum": 0, "maximum": 1 },
72
+ "documented": { "type": "number", "minimum": 0, "maximum": 1 }
73
+ }
74
+ },
75
+ "pattern": {
76
+ "type": "object",
77
+ "required": [
78
+ "id",
79
+ "name",
80
+ "kind",
81
+ "path",
82
+ "tier",
83
+ "usedBy",
84
+ "owners",
85
+ "exports",
86
+ "composedOf",
87
+ "relations",
88
+ "stability",
89
+ "factors"
90
+ ],
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "id": { "type": "string" },
94
+ "name": { "type": "string" },
95
+ "kind": { "enum": ["composition", "primitive", "shared", "family"] },
96
+ "role": { "$ref": "#/$defs/role" },
97
+ "path": { "type": "string" },
98
+ "tier": { "$ref": "#/$defs/tier" },
99
+ "feature": { "type": "string" },
100
+ "summary": { "type": "string" },
101
+ "whenToUse": { "type": "string" },
102
+ "whenNotToUse": { "type": "string" },
103
+ "states": { "type": "array", "items": { "type": "string" } },
104
+ "status": { "enum": ["stable", "beta", "experimental", "deprecated"] },
105
+ "examples": { "type": "array", "items": { "type": "string" } },
106
+ "useInstead": { "type": "array", "items": { "type": "string" } },
107
+ "usedBy": { "type": "integer", "minimum": 0 },
108
+ "owners": { "type": "array", "items": { "type": "string" } },
109
+ "exports": { "type": "array", "items": { "type": "string" } },
110
+ "composedOf": { "type": "array", "items": { "type": "string" } },
111
+ "blocks": { "type": "array", "items": { "type": "string" } },
112
+ "hooks": { "type": "array", "items": { "type": "string" } },
113
+ "valueKeys": { "type": "array", "items": { "type": "string" } },
114
+ "relations": { "type": "array", "items": { "$ref": "#/$defs/relation" } },
115
+ "stability": { "type": "number", "minimum": 0, "maximum": 1 },
116
+ "factors": { "$ref": "#/$defs/factors" }
117
+ }
118
+ },
119
+ "signals": {
120
+ "type": "object",
121
+ "required": ["orphans", "variants", "deprecated"],
122
+ "additionalProperties": false,
123
+ "properties": {
124
+ "orphans": { "type": "array", "items": { "type": "string" } },
125
+ "variants": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object",
129
+ "required": ["canonical", "members"],
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "canonical": { "type": "string" },
133
+ "members": { "type": "array", "items": { "type": "string" } }
134
+ }
135
+ }
136
+ },
137
+ "deprecated": { "type": "array", "items": { "type": "string" } }
138
+ }
139
+ }
140
+ }
141
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://autotelic.dev/tackle/protocol/recipes.json",
4
+ "title": "Recipes",
5
+ "description": "Copyable imports and minimal shapes for the load-bearing parts and every composition, derived from the catalog and the pattern view.",
6
+ "type": "object",
7
+ "required": ["lexicon", "hash", "features", "parts"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "lexicon": { "$ref": "#/$defs/lexicon" },
11
+ "hash": { "type": "string" },
12
+ "features": { "type": "array", "items": { "$ref": "#/$defs/recipe" } },
13
+ "parts": { "type": "array", "items": { "$ref": "#/$defs/recipe" } }
14
+ },
15
+ "$defs": {
16
+ "lexicon": {
17
+ "type": "object",
18
+ "required": ["name", "version"],
19
+ "additionalProperties": false,
20
+ "properties": {
21
+ "name": { "enum": ["recipes"] },
22
+ "version": { "type": "integer", "minimum": 1 }
23
+ }
24
+ },
25
+ "import": {
26
+ "type": "object",
27
+ "required": ["from", "binding", "mode"],
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "from": { "type": "string" },
31
+ "binding": { "type": "string" },
32
+ "mode": { "enum": ["named", "default", "namespace"] }
33
+ }
34
+ },
35
+ "recipe": {
36
+ "type": "object",
37
+ "required": ["id", "name", "kind", "path", "source", "import", "usage", "notes"],
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "id": { "type": "string" },
41
+ "name": { "type": "string" },
42
+ "kind": { "enum": ["feature", "part"] },
43
+ "path": { "type": "string" },
44
+ "source": { "type": "string" },
45
+ "stability": { "type": "number", "minimum": 0, "maximum": 1 },
46
+ "import": { "$ref": "#/$defs/import" },
47
+ "extraImports": { "type": "array", "items": { "$ref": "#/$defs/import" } },
48
+ "usage": { "type": "string" },
49
+ "props": { "type": "array", "items": { "type": "string" } },
50
+ "blocks": { "type": "array", "items": { "type": "string" } },
51
+ "hooks": { "type": "array", "items": { "type": "string" } },
52
+ "valueKeys": { "type": "array", "items": { "type": "string" } },
53
+ "notes": { "type": "array", "items": { "type": "string" } }
54
+ }
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://autotelic.dev/tackle/protocol/report.json",
4
+ "title": "Report",
5
+ "description": "One run, across every engine, in one oxlint-shaped stream. A derived snapshot: its counts are a rendering, not the state. A record carries either its `lexicon` reference or, from before per-lexicon versioning, the legacy `protocolVersion`.",
6
+ "type": "object",
7
+ "required": ["counts", "files", "diagnostics", "generators"],
8
+ "anyOf": [{ "required": ["lexicon"] }, { "required": ["protocolVersion"] }],
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "lexicon": { "$ref": "#/$defs/lexicon" },
12
+ "protocolVersion": {
13
+ "type": "string",
14
+ "description": "Legacy: the single version the format carried before per-lexicon versioning. Accepted forever; superseded by `lexicon`."
15
+ },
16
+ "counts": { "$ref": "#/$defs/counts" },
17
+ "files": { "type": "integer", "minimum": 0 },
18
+ "diagnostics": { "type": "array", "items": { "$ref": "#/$defs/diagnostic" } },
19
+ "generators": { "type": "array", "items": { "$ref": "#/$defs/generator" } },
20
+ "elapsedMs": { "type": "number" }
21
+ },
22
+ "$defs": {
23
+ "lexicon": {
24
+ "type": "object",
25
+ "required": ["name", "version"],
26
+ "additionalProperties": false,
27
+ "properties": {
28
+ "name": { "enum": ["report"] },
29
+ "version": { "type": "integer", "minimum": 1 }
30
+ }
31
+ },
32
+ "severity": { "enum": ["error", "warn", "info"] },
33
+ "counts": {
34
+ "type": "object",
35
+ "required": ["error", "warn", "info"],
36
+ "additionalProperties": false,
37
+ "properties": {
38
+ "error": { "type": "integer", "minimum": 0 },
39
+ "warn": { "type": "integer", "minimum": 0 },
40
+ "info": { "type": "integer", "minimum": 0 }
41
+ }
42
+ },
43
+ "location": {
44
+ "type": "object",
45
+ "required": ["file", "line", "column"],
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "file": { "type": "string" },
49
+ "line": { "type": "integer", "minimum": 1 },
50
+ "column": { "type": "integer", "minimum": 1 },
51
+ "endLine": { "type": "integer", "minimum": 1 },
52
+ "endColumn": { "type": "integer", "minimum": 1 }
53
+ }
54
+ },
55
+ "diagnostic": {
56
+ "type": "object",
57
+ "required": ["engine", "ruleId", "severity", "message", "location"],
58
+ "additionalProperties": false,
59
+ "properties": {
60
+ "engine": { "type": "string" },
61
+ "ruleId": { "type": "string" },
62
+ "severity": { "$ref": "#/$defs/severity" },
63
+ "message": { "type": "string" },
64
+ "help": { "type": "string" },
65
+ "location": { "$ref": "#/$defs/location" },
66
+ "identity": { "type": "string" },
67
+ "judged": { "type": "boolean" },
68
+ "fixable": { "type": "boolean" },
69
+ "docsUrl": { "type": "string" },
70
+ "engineVersion": { "type": "string" },
71
+ "move": { "$ref": "#/$defs/move" },
72
+ "score": { "type": "number" },
73
+ "confidence": { "type": "number" },
74
+ "repair": { "$ref": "#/$defs/repair" }
75
+ }
76
+ },
77
+ "move": {
78
+ "enum": ["contract", "combine", "expand"],
79
+ "description": "The entropy reversal a judged finding proposes; absent when the finding is not about entropy."
80
+ },
81
+ "repairOperation": { "enum": ["merge", "split", "move", "replace", "migrate"] },
82
+ "repairEdit": {
83
+ "type": "object",
84
+ "required": ["file", "line", "column", "instruction"],
85
+ "additionalProperties": false,
86
+ "properties": {
87
+ "file": { "type": "string" },
88
+ "line": { "type": "integer", "minimum": 1 },
89
+ "column": { "type": "integer", "minimum": 1 },
90
+ "instruction": { "type": "string" }
91
+ }
92
+ },
93
+ "repair": {
94
+ "type": "object",
95
+ "required": ["operation", "remove", "cascade", "complete", "settled"],
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "operation": { "$ref": "#/$defs/repairOperation" },
99
+ "keep": { "$ref": "#/$defs/location" },
100
+ "remove": { "type": "array", "items": { "$ref": "#/$defs/location" } },
101
+ "cascade": { "type": "array", "items": { "$ref": "#/$defs/repairEdit" } },
102
+ "complete": {
103
+ "type": "boolean",
104
+ "description": "True when every affected site is listed, so the repair is a work order an agent can execute without a search of its own."
105
+ },
106
+ "settled": { "type": "string" }
107
+ }
108
+ },
109
+ "dropCount": {
110
+ "type": "object",
111
+ "required": ["stage", "count"],
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "stage": { "type": "string" },
115
+ "count": { "type": "integer", "minimum": 0 }
116
+ }
117
+ },
118
+ "engineStatus": {
119
+ "enum": ["ran", "replayed", "skipped", "errored"],
120
+ "description": "What an engine did, which is not the same as what it found. `replayed` means it served a cache and did not look."
121
+ },
122
+ "generator": {
123
+ "type": "object",
124
+ "required": ["id", "diagnostics", "error", "warn", "info"],
125
+ "additionalProperties": false,
126
+ "properties": {
127
+ "id": { "type": "string" },
128
+ "version": { "type": "string" },
129
+ "diagnostics": { "type": "integer", "minimum": 0 },
130
+ "error": { "type": "integer", "minimum": 0 },
131
+ "warn": { "type": "integer", "minimum": 0 },
132
+ "info": { "type": "integer", "minimum": 0 },
133
+ "durationMs": { "type": "number" },
134
+ "note": { "type": "string" },
135
+ "status": { "$ref": "#/$defs/engineStatus" },
136
+ "unjudged": { "type": "integer", "minimum": 0 },
137
+ "drops": { "type": "array", "items": { "$ref": "#/$defs/dropCount" } }
138
+ }
139
+ }
140
+ }
141
+ }