special-agents 0.3.6 → 0.3.7

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 ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  29 composable best-practice rule packs, 6 skills, and 4 agent roles for Claude Code and Codex.
4
4
 
5
- The content layer of [Rafi](https://github.com/ttante/foreman). Ships both the authoring source (`content/`) and prebuilt composition logic so it can be used as a library, consumed by `rafi compile`, or extended directly.
5
+ The content layer of [Rafi](https://github.com/ttante/rafi). Ships both the authoring source (`content/`) and prebuilt composition logic so it can be used as a library, consumed by `rafi compile`, or extended directly.
6
6
 
7
7
  ## Install
8
8
 
package/package.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "name": "special-agents",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Rafi library: composable best-practice rules, skills, and agents for Claude Code and Codex.",
5
+ "license": "Apache-2.0",
5
6
  "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/ttante/rafi.git",
10
+ "directory": "packages/special-agents"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/ttante/rafi/issues"
14
+ },
15
+ "homepage": "https://github.com/ttante/rafi/tree/main/packages/special-agents#readme",
6
16
  "main": "./dist/index.js",
7
17
  "types": "./dist/index.d.ts",
8
18
  "exports": {
@@ -14,27 +24,25 @@
14
24
  "files": [
15
25
  "dist",
16
26
  "content",
17
- "README.md"
27
+ "README.md",
28
+ "LICENSE"
18
29
  ],
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.build.json",
32
+ "typecheck": "tsc --noEmit",
33
+ "test": "tsx --test test/*.test.ts"
34
+ },
19
35
  "engines": {
20
36
  "node": ">=20"
21
37
  },
22
- "bundledDependencies": [
23
- "rafi-spec"
24
- ],
25
38
  "dependencies": {
39
+ "rafi-spec": "0.3.7",
26
40
  "ajv": "^8.20.0",
27
- "yaml": "^2.5.1",
28
- "rafi-spec": "0.0.0"
41
+ "yaml": "^2.5.1"
29
42
  },
30
43
  "devDependencies": {
31
44
  "@types/node": "^20.14.0",
32
45
  "tsx": "^4.19.0",
33
46
  "typescript": "^5.6.0"
34
- },
35
- "scripts": {
36
- "build": "tsc -p tsconfig.build.json",
37
- "typecheck": "tsc --noEmit",
38
- "test": "tsx --test test/*.test.ts"
39
47
  }
40
- }
48
+ }
@@ -1,4 +0,0 @@
1
- /** Rafi neutral schema — public surface. */
2
- export * from "./types.js";
3
- export { rulePackSchema, skillManifestSchema, agentManifestSchema, projectConfigSchema, } from "./schemas.js";
4
- export { type ValidationResult, validateRulePack, validateSkillManifest, validateAgentManifest, validateProjectConfig, assertRulePack, assertSkillManifest, assertAgentManifest, assertProjectConfig, } from "./validate.js";
@@ -1,4 +0,0 @@
1
- /** Rafi neutral schema — public surface. */
2
- export * from "./types.js";
3
- export { rulePackSchema, skillManifestSchema, agentManifestSchema, projectConfigSchema, } from "./schemas.js";
4
- export { validateRulePack, validateSkillManifest, validateAgentManifest, validateProjectConfig, assertRulePack, assertSkillManifest, assertAgentManifest, assertProjectConfig, } from "./validate.js";
@@ -1,245 +0,0 @@
1
- /**
2
- * JSON Schemas (draft-07) for the neutral types in {@link ./types}. Kept in lockstep
3
- * with those interfaces; validated by {@link ./validate}.
4
- */
5
- export declare const rulePackSchema: {
6
- readonly $id: "rafi/rulePack";
7
- readonly type: "object";
8
- readonly additionalProperties: false;
9
- readonly required: readonly ["name", "category", "description", "condition", "template"];
10
- readonly properties: {
11
- readonly name: {
12
- readonly type: "string";
13
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
14
- };
15
- readonly category: {
16
- readonly enum: readonly ["base", "process", "domain", "templated"];
17
- };
18
- readonly description: {
19
- readonly type: "string";
20
- readonly minLength: 1;
21
- };
22
- readonly condition: {
23
- readonly enum: readonly ["always", "frontend", "ai", "cloud", "backend"];
24
- };
25
- readonly template: {
26
- readonly type: "boolean";
27
- };
28
- readonly supersededByForeman: {
29
- readonly type: "boolean";
30
- };
31
- readonly body: {
32
- readonly type: "string";
33
- };
34
- };
35
- };
36
- export declare const skillManifestSchema: {
37
- readonly $id: "rafi/skillManifest";
38
- readonly type: "object";
39
- readonly additionalProperties: false;
40
- readonly required: readonly ["name", "description"];
41
- readonly properties: {
42
- readonly name: {
43
- readonly type: "string";
44
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
45
- };
46
- readonly description: {
47
- readonly type: "string";
48
- readonly minLength: 1;
49
- };
50
- readonly pins: {
51
- readonly type: "array";
52
- readonly items: {
53
- readonly type: "string";
54
- };
55
- };
56
- readonly codexPriority: {
57
- readonly enum: readonly ["inline", "reference"];
58
- };
59
- readonly body: {
60
- readonly type: "string";
61
- };
62
- };
63
- };
64
- export declare const agentManifestSchema: {
65
- readonly $id: "rafi/agentManifest";
66
- readonly type: "object";
67
- readonly additionalProperties: false;
68
- readonly required: readonly ["name", "description", "role", "packs", "skills"];
69
- readonly properties: {
70
- readonly name: {
71
- readonly type: "string";
72
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
73
- };
74
- readonly description: {
75
- readonly type: "string";
76
- readonly minLength: 1;
77
- };
78
- readonly role: {
79
- readonly enum: readonly ["builder", "qa", "planner", "ticket-maker"];
80
- };
81
- readonly packs: {
82
- readonly type: "array";
83
- readonly items: {
84
- readonly type: "string";
85
- };
86
- };
87
- readonly skills: {
88
- readonly type: "array";
89
- readonly items: {
90
- readonly type: "string";
91
- };
92
- };
93
- readonly conditionalPacks: {
94
- readonly type: "object";
95
- readonly additionalProperties: false;
96
- readonly properties: {
97
- readonly ai: {
98
- readonly type: "array";
99
- readonly items: {
100
- readonly type: "string";
101
- };
102
- };
103
- readonly frontend: {
104
- readonly type: "array";
105
- readonly items: {
106
- readonly type: "string";
107
- };
108
- };
109
- readonly cloud: {
110
- readonly type: "array";
111
- readonly items: {
112
- readonly type: "string";
113
- };
114
- };
115
- readonly backend: {
116
- readonly type: "array";
117
- readonly items: {
118
- readonly type: "string";
119
- };
120
- };
121
- };
122
- };
123
- readonly model: {
124
- readonly type: readonly ["string", "null"];
125
- };
126
- readonly effort: {
127
- readonly type: readonly ["string", "null"];
128
- readonly enum: readonly ["low", "medium", "high", "xhigh", null];
129
- };
130
- };
131
- };
132
- export declare const projectConfigSchema: {
133
- readonly $id: "rafi/projectConfig";
134
- readonly type: "object";
135
- readonly additionalProperties: false;
136
- readonly required: readonly ["appName", "timezone", "stack", "flags", "harness", "agent_files", "agents", "skills"];
137
- readonly properties: {
138
- readonly appName: {
139
- readonly type: "string";
140
- readonly minLength: 1;
141
- };
142
- readonly timezone: {
143
- readonly type: "string";
144
- readonly minLength: 1;
145
- };
146
- readonly stack: {
147
- type: string;
148
- additionalProperties: boolean;
149
- required: string[];
150
- properties: {
151
- [k: string]: {
152
- type: string;
153
- minLength: number;
154
- };
155
- };
156
- };
157
- readonly flags: {
158
- type: string;
159
- additionalProperties: boolean;
160
- required: string[];
161
- properties: {
162
- [k: string]: {
163
- type: string;
164
- };
165
- };
166
- };
167
- readonly harness: {
168
- readonly type: "object";
169
- readonly additionalProperties: false;
170
- readonly required: readonly ["targets", "qa"];
171
- readonly properties: {
172
- readonly targets: {
173
- readonly type: "array";
174
- readonly minItems: 1;
175
- readonly items: {
176
- readonly enum: readonly ["claude", "codex"];
177
- };
178
- };
179
- readonly qa: {
180
- readonly type: "boolean";
181
- };
182
- };
183
- };
184
- readonly agent_files: {
185
- readonly type: "object";
186
- readonly additionalProperties: false;
187
- readonly required: readonly ["mode", "codex", "claude"];
188
- readonly properties: {
189
- readonly mode: {
190
- readonly enum: readonly ["append", "update", "overwrite"];
191
- };
192
- readonly codex: {
193
- readonly type: "string";
194
- readonly minLength: 1;
195
- };
196
- readonly claude: {
197
- readonly type: "string";
198
- readonly minLength: 1;
199
- };
200
- };
201
- };
202
- readonly agents: {
203
- readonly type: "object";
204
- readonly additionalProperties: {
205
- readonly type: "object";
206
- readonly additionalProperties: false;
207
- readonly required: readonly ["artifact_source", "claude", "codex"];
208
- readonly properties: {
209
- readonly artifact_source: {
210
- readonly enum: readonly ["rafi", "existing"];
211
- };
212
- readonly claude: {
213
- readonly type: "string";
214
- readonly minLength: 1;
215
- };
216
- readonly codex: {
217
- readonly type: "string";
218
- readonly minLength: 1;
219
- };
220
- };
221
- };
222
- };
223
- readonly skills: {
224
- readonly type: "object";
225
- readonly additionalProperties: {
226
- readonly type: "object";
227
- readonly additionalProperties: false;
228
- readonly required: readonly ["artifact_source", "claude", "codex"];
229
- readonly properties: {
230
- readonly artifact_source: {
231
- readonly enum: readonly ["rafi", "existing"];
232
- };
233
- readonly claude: {
234
- readonly type: "string";
235
- readonly minLength: 1;
236
- };
237
- readonly codex: {
238
- readonly type: "string";
239
- readonly minLength: 1;
240
- };
241
- };
242
- };
243
- };
244
- };
245
- };
@@ -1,121 +0,0 @@
1
- /**
2
- * JSON Schemas (draft-07) for the neutral types in {@link ./types}. Kept in lockstep
3
- * with those interfaces; validated by {@link ./validate}.
4
- */
5
- const KEBAB = "^[a-z0-9]+(?:-[a-z0-9]+)*$";
6
- export const rulePackSchema = {
7
- $id: "rafi/rulePack",
8
- type: "object",
9
- additionalProperties: false,
10
- required: ["name", "category", "description", "condition", "template"],
11
- properties: {
12
- name: { type: "string", pattern: KEBAB },
13
- category: { enum: ["base", "process", "domain", "templated"] },
14
- description: { type: "string", minLength: 1 },
15
- condition: { enum: ["always", "frontend", "ai", "cloud", "backend"] },
16
- template: { type: "boolean" },
17
- supersededByForeman: { type: "boolean" },
18
- body: { type: "string" },
19
- },
20
- };
21
- export const skillManifestSchema = {
22
- $id: "rafi/skillManifest",
23
- type: "object",
24
- additionalProperties: false,
25
- required: ["name", "description"],
26
- properties: {
27
- name: { type: "string", pattern: KEBAB },
28
- description: { type: "string", minLength: 1 },
29
- pins: { type: "array", items: { type: "string" } },
30
- codexPriority: { enum: ["inline", "reference"] },
31
- body: { type: "string" },
32
- },
33
- };
34
- export const agentManifestSchema = {
35
- $id: "rafi/agentManifest",
36
- type: "object",
37
- additionalProperties: false,
38
- required: ["name", "description", "role", "packs", "skills"],
39
- properties: {
40
- name: { type: "string", pattern: KEBAB },
41
- description: { type: "string", minLength: 1 },
42
- role: { enum: ["builder", "qa", "planner", "ticket-maker"] },
43
- packs: { type: "array", items: { type: "string" } },
44
- skills: { type: "array", items: { type: "string" } },
45
- conditionalPacks: {
46
- type: "object",
47
- additionalProperties: false,
48
- properties: {
49
- ai: { type: "array", items: { type: "string" } },
50
- frontend: { type: "array", items: { type: "string" } },
51
- cloud: { type: "array", items: { type: "string" } },
52
- backend: { type: "array", items: { type: "string" } },
53
- },
54
- },
55
- model: { type: ["string", "null"] },
56
- effort: { type: ["string", "null"], enum: ["low", "medium", "high", "xhigh", null] },
57
- },
58
- };
59
- const stringRecord = (keys) => ({
60
- type: "object",
61
- additionalProperties: false,
62
- required: keys,
63
- properties: Object.fromEntries(keys.map((k) => [k, { type: "string", minLength: 1 }])),
64
- });
65
- const boolRecord = (keys) => ({
66
- type: "object",
67
- additionalProperties: false,
68
- required: keys,
69
- properties: Object.fromEntries(keys.map((k) => [k, { type: "boolean" }])),
70
- });
71
- const runtimeArtifactPaths = {
72
- type: "object",
73
- additionalProperties: false,
74
- required: ["artifact_source", "claude", "codex"],
75
- properties: {
76
- artifact_source: { enum: ["rafi", "existing"] },
77
- claude: { type: "string", minLength: 1 },
78
- codex: { type: "string", minLength: 1 },
79
- },
80
- };
81
- const artifactPathMap = {
82
- type: "object",
83
- additionalProperties: runtimeArtifactPaths,
84
- };
85
- export const projectConfigSchema = {
86
- $id: "rafi/projectConfig",
87
- type: "object",
88
- additionalProperties: false,
89
- required: ["appName", "timezone", "stack", "flags", "harness", "agent_files", "agents", "skills"],
90
- properties: {
91
- appName: { type: "string", minLength: 1 },
92
- timezone: { type: "string", minLength: 1 },
93
- stack: stringRecord(["frontend", "backend", "database", "cloud", "packageManager"]),
94
- flags: boolRecord(["hasFrontend", "usesAI", "runsInCloud"]),
95
- harness: {
96
- type: "object",
97
- additionalProperties: false,
98
- required: ["targets", "qa"],
99
- properties: {
100
- targets: {
101
- type: "array",
102
- minItems: 1,
103
- items: { enum: ["claude", "codex"] },
104
- },
105
- qa: { type: "boolean" },
106
- },
107
- },
108
- agent_files: {
109
- type: "object",
110
- additionalProperties: false,
111
- required: ["mode", "codex", "claude"],
112
- properties: {
113
- mode: { enum: ["append", "update", "overwrite"] },
114
- codex: { type: "string", minLength: 1 },
115
- claude: { type: "string", minLength: 1 },
116
- },
117
- },
118
- agents: artifactPathMap,
119
- skills: artifactPathMap,
120
- },
121
- };
@@ -1,129 +0,0 @@
1
- /**
2
- * Rafi neutral schema — the shapes that the `special-agents` library and the
3
- * `ai-foreman` runtime must agree on. Authoring inputs (rule packs, skills,
4
- * agent manifests) and the per-project configuration that drives composition.
5
- */
6
- /** Which category a rule pack belongs to (drives default load behavior). */
7
- export type PackCategory = "base" | "process" | "domain" | "templated";
8
- /**
9
- * When a pack applies. `always` packs load for every project; the others load
10
- * only when the matching project flag is on (see {@link ProjectFlags}).
11
- */
12
- export type PackCondition = "always" | "frontend" | "ai" | "cloud" | "backend";
13
- /** The YAML front-matter carried by each rule pack markdown file. */
14
- export interface RulePackFrontmatter {
15
- /** Unique, kebab-case identifier (e.g. `security`). */
16
- name: string;
17
- category: PackCategory;
18
- /** One-line summary used in indexes and pack pickers. */
19
- description: string;
20
- condition: PackCondition;
21
- /** True when the body contains `{{placeholders}}` / `{{#if}}` directives. */
22
- template: boolean;
23
- /** When true, the pack is omitted while the foreman ticket tracker is active. */
24
- supersededByForeman?: boolean;
25
- }
26
- /** A fully loaded rule pack: its front-matter plus the markdown body. */
27
- export interface RulePack extends RulePackFrontmatter {
28
- /** The rule text (bullets) below the front-matter. */
29
- body: string;
30
- }
31
- /** How a skill should be treated when flattening for Codex (which can't lazy-load). */
32
- export type CodexPriority = "inline" | "reference";
33
- /**
34
- * A skill manifest. Keeps the existing Anthropic `SKILL.md` format and adds two
35
- * optional composition fields that non-Rafi tools can safely ignore.
36
- */
37
- export interface SkillManifest {
38
- /** Unique, kebab-case identifier matching the skill directory name. */
39
- name: string;
40
- /** One-line trigger description (the cheap progressive-disclosure index). */
41
- description: string;
42
- /** Rule packs this skill wants loaded alongside it. */
43
- pins?: string[];
44
- /** Whether Codex flattening should inline this skill's body or just reference it. */
45
- codexPriority?: CodexPriority;
46
- /** The skill body (instructions). Optional in metadata-only contexts. */
47
- body?: string;
48
- }
49
- /** The role an agent fills, mapped to an ai-foreman turn-type or command. */
50
- export type AgentRole = "builder" | "qa" | "planner" | "ticket-maker";
51
- /** Reasoning effort levels accepted by the builders. */
52
- export type EffortLevel = "low" | "medium" | "high" | "xhigh";
53
- /** Packs added to a role only when the matching project flag is on. */
54
- export interface ConditionalPacks {
55
- ai?: string[];
56
- frontend?: string[];
57
- cloud?: string[];
58
- backend?: string[];
59
- }
60
- /**
61
- * A role manifest: a named composition of rule packs + skills that the runtime
62
- * loads for a given turn-type.
63
- */
64
- export interface AgentManifest {
65
- /** Unique, kebab-case identifier (usually equals {@link role}). */
66
- name: string;
67
- description: string;
68
- role: AgentRole;
69
- /** Pack references; globs like `base/*` are allowed and expanded at compile time. */
70
- packs: string[];
71
- /** Skill names this role preloads. */
72
- skills: string[];
73
- /** Extra packs gated on project flags. */
74
- conditionalPacks?: ConditionalPacks;
75
- /** Model override; null inherits the runtime's `--model`. */
76
- model?: string | null;
77
- /** Effort override; null inherits the runtime's `--effort`. */
78
- effort?: EffortLevel | null;
79
- }
80
- /** Which harness targets to emit native config for. */
81
- export type HarnessTarget = "claude" | "codex";
82
- /** The stack choices collected by `rafi create` (free-text strings). */
83
- export interface ProjectStack {
84
- frontend: string;
85
- backend: string;
86
- database: string;
87
- cloud: string;
88
- packageManager: string;
89
- }
90
- /** Boolean flags that gate conditional packs and docs. */
91
- export interface ProjectFlags {
92
- hasFrontend: boolean;
93
- usesAI: boolean;
94
- runsInCloud: boolean;
95
- }
96
- /** Harness emission + QA preferences. */
97
- export interface HarnessConfig {
98
- targets: HarnessTarget[];
99
- qa: boolean;
100
- }
101
- /** How Rafi should handle existing root instruction files. */
102
- export type AgentFileMode = "append" | "update" | "overwrite";
103
- /** Root instruction files used by Codex and Claude. */
104
- export interface AgentFilesConfig {
105
- mode: AgentFileMode;
106
- codex: string;
107
- claude: string;
108
- }
109
- /** Per-runtime paths for a skill or agent artifact. */
110
- export type ArtifactSource = "rafi" | "existing";
111
- export interface RuntimeArtifactConfig {
112
- artifact_source: ArtifactSource;
113
- claude: string;
114
- codex: string;
115
- }
116
- /**
117
- * The committed `rafi-config.yaml` in a target repo. Skipping the walkthrough uses
118
- * the library defaults, which reproduce today's hardcoded guidance.
119
- */
120
- export interface ProjectConfig {
121
- appName: string;
122
- timezone: string;
123
- stack: ProjectStack;
124
- flags: ProjectFlags;
125
- harness: HarnessConfig;
126
- agent_files: AgentFilesConfig;
127
- agents: Record<string, RuntimeArtifactConfig>;
128
- skills: Record<string, RuntimeArtifactConfig>;
129
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Rafi neutral schema — the shapes that the `special-agents` library and the
3
- * `ai-foreman` runtime must agree on. Authoring inputs (rule packs, skills,
4
- * agent manifests) and the per-project configuration that drives composition.
5
- */
6
- export {};
@@ -1,16 +0,0 @@
1
- import type { RulePackFrontmatter, SkillManifest, AgentManifest, ProjectConfig } from "./types.js";
2
- /** Outcome of validating a value against one of the neutral schemas. */
3
- export interface ValidationResult {
4
- valid: boolean;
5
- /** Human-readable messages; empty when valid. */
6
- errors: string[];
7
- }
8
- export declare const validateRulePack: (d: unknown) => ValidationResult;
9
- export declare const validateSkillManifest: (d: unknown) => ValidationResult;
10
- export declare const validateAgentManifest: (d: unknown) => ValidationResult;
11
- export declare const validateProjectConfig: (d: unknown) => ValidationResult;
12
- /** Validate and narrow, throwing on failure. */
13
- export declare function assertRulePack(d: unknown): asserts d is RulePackFrontmatter;
14
- export declare function assertSkillManifest(d: unknown): asserts d is SkillManifest;
15
- export declare function assertAgentManifest(d: unknown): asserts d is AgentManifest;
16
- export declare function assertProjectConfig(d: unknown): asserts d is ProjectConfig;
@@ -1,40 +0,0 @@
1
- /** ajv-backed validation for the neutral schemas. */
2
- import { Ajv } from "ajv";
3
- import { rulePackSchema, skillManifestSchema, agentManifestSchema, projectConfigSchema, } from "./schemas.js";
4
- const ajv = new Ajv({ allErrors: true, allowUnionTypes: true });
5
- function run(fn, data) {
6
- const valid = fn(data);
7
- if (valid)
8
- return { valid: true, errors: [] };
9
- const errors = (fn.errors ?? []).map((e) => `${e.instancePath || "(root)"} ${e.message ?? "is invalid"}`.trim());
10
- return { valid: false, errors };
11
- }
12
- const vRulePack = ajv.compile(rulePackSchema);
13
- const vSkill = ajv.compile(skillManifestSchema);
14
- const vAgent = ajv.compile(agentManifestSchema);
15
- const vProject = ajv.compile(projectConfigSchema);
16
- export const validateRulePack = (d) => run(vRulePack, d);
17
- export const validateSkillManifest = (d) => run(vSkill, d);
18
- export const validateAgentManifest = (d) => run(vAgent, d);
19
- export const validateProjectConfig = (d) => run(vProject, d);
20
- /** Validate and narrow, throwing on failure. */
21
- export function assertRulePack(d) {
22
- const r = validateRulePack(d);
23
- if (!r.valid)
24
- throw new Error(`Invalid rule pack: ${r.errors.join("; ")}`);
25
- }
26
- export function assertSkillManifest(d) {
27
- const r = validateSkillManifest(d);
28
- if (!r.valid)
29
- throw new Error(`Invalid skill manifest: ${r.errors.join("; ")}`);
30
- }
31
- export function assertAgentManifest(d) {
32
- const r = validateAgentManifest(d);
33
- if (!r.valid)
34
- throw new Error(`Invalid agent manifest: ${r.errors.join("; ")}`);
35
- }
36
- export function assertProjectConfig(d) {
37
- const r = validateProjectConfig(d);
38
- if (!r.valid)
39
- throw new Error(`Invalid project config: ${r.errors.join("; ")}`);
40
- }
@@ -1,35 +0,0 @@
1
- {
2
- "name": "rafi-spec",
3
- "version": "0.0.0",
4
- "private": true,
5
- "description": "Rafi neutral schema: rule packs, skills, agents, and project config shapes shared by special-agents and ai-foreman.",
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "default": "./dist/index.js"
13
- }
14
- },
15
- "files": [
16
- "dist",
17
- "src"
18
- ],
19
- "scripts": {
20
- "build": "tsc -p tsconfig.build.json",
21
- "typecheck": "tsc --noEmit",
22
- "test": "tsx --test test/*.test.ts"
23
- },
24
- "engines": {
25
- "node": ">=20"
26
- },
27
- "dependencies": {
28
- "ajv": "^8.20.0"
29
- },
30
- "devDependencies": {
31
- "@types/node": "^20.14.0",
32
- "tsx": "^4.19.0",
33
- "typescript": "^5.6.0"
34
- }
35
- }
@@ -1,19 +0,0 @@
1
- /** Rafi neutral schema — public surface. */
2
- export * from "./types.js";
3
- export {
4
- rulePackSchema,
5
- skillManifestSchema,
6
- agentManifestSchema,
7
- projectConfigSchema,
8
- } from "./schemas.js";
9
- export {
10
- type ValidationResult,
11
- validateRulePack,
12
- validateSkillManifest,
13
- validateAgentManifest,
14
- validateProjectConfig,
15
- assertRulePack,
16
- assertSkillManifest,
17
- assertAgentManifest,
18
- assertProjectConfig,
19
- } from "./validate.js";
@@ -1,130 +0,0 @@
1
- /**
2
- * JSON Schemas (draft-07) for the neutral types in {@link ./types}. Kept in lockstep
3
- * with those interfaces; validated by {@link ./validate}.
4
- */
5
-
6
- const KEBAB = "^[a-z0-9]+(?:-[a-z0-9]+)*$";
7
-
8
- export const rulePackSchema = {
9
- $id: "rafi/rulePack",
10
- type: "object",
11
- additionalProperties: false,
12
- required: ["name", "category", "description", "condition", "template"],
13
- properties: {
14
- name: { type: "string", pattern: KEBAB },
15
- category: { enum: ["base", "process", "domain", "templated"] },
16
- description: { type: "string", minLength: 1 },
17
- condition: { enum: ["always", "frontend", "ai", "cloud", "backend"] },
18
- template: { type: "boolean" },
19
- supersededByForeman: { type: "boolean" },
20
- body: { type: "string" },
21
- },
22
- } as const;
23
-
24
- export const skillManifestSchema = {
25
- $id: "rafi/skillManifest",
26
- type: "object",
27
- additionalProperties: false,
28
- required: ["name", "description"],
29
- properties: {
30
- name: { type: "string", pattern: KEBAB },
31
- description: { type: "string", minLength: 1 },
32
- pins: { type: "array", items: { type: "string" } },
33
- codexPriority: { enum: ["inline", "reference"] },
34
- body: { type: "string" },
35
- },
36
- } as const;
37
-
38
- export const agentManifestSchema = {
39
- $id: "rafi/agentManifest",
40
- type: "object",
41
- additionalProperties: false,
42
- required: ["name", "description", "role", "packs", "skills"],
43
- properties: {
44
- name: { type: "string", pattern: KEBAB },
45
- description: { type: "string", minLength: 1 },
46
- role: { enum: ["builder", "qa", "planner", "ticket-maker"] },
47
- packs: { type: "array", items: { type: "string" } },
48
- skills: { type: "array", items: { type: "string" } },
49
- conditionalPacks: {
50
- type: "object",
51
- additionalProperties: false,
52
- properties: {
53
- ai: { type: "array", items: { type: "string" } },
54
- frontend: { type: "array", items: { type: "string" } },
55
- cloud: { type: "array", items: { type: "string" } },
56
- backend: { type: "array", items: { type: "string" } },
57
- },
58
- },
59
- model: { type: ["string", "null"] },
60
- effort: { type: ["string", "null"], enum: ["low", "medium", "high", "xhigh", null] },
61
- },
62
- } as const;
63
-
64
- const stringRecord = (keys: string[]) => ({
65
- type: "object",
66
- additionalProperties: false,
67
- required: keys,
68
- properties: Object.fromEntries(keys.map((k) => [k, { type: "string", minLength: 1 }])),
69
- });
70
-
71
- const boolRecord = (keys: string[]) => ({
72
- type: "object",
73
- additionalProperties: false,
74
- required: keys,
75
- properties: Object.fromEntries(keys.map((k) => [k, { type: "boolean" }])),
76
- });
77
-
78
- const runtimeArtifactPaths = {
79
- type: "object",
80
- additionalProperties: false,
81
- required: ["artifact_source", "claude", "codex"],
82
- properties: {
83
- artifact_source: { enum: ["rafi", "existing"] },
84
- claude: { type: "string", minLength: 1 },
85
- codex: { type: "string", minLength: 1 },
86
- },
87
- } as const;
88
-
89
- const artifactPathMap = {
90
- type: "object",
91
- additionalProperties: runtimeArtifactPaths,
92
- } as const;
93
-
94
- export const projectConfigSchema = {
95
- $id: "rafi/projectConfig",
96
- type: "object",
97
- additionalProperties: false,
98
- required: ["appName", "timezone", "stack", "flags", "harness", "agent_files", "agents", "skills"],
99
- properties: {
100
- appName: { type: "string", minLength: 1 },
101
- timezone: { type: "string", minLength: 1 },
102
- stack: stringRecord(["frontend", "backend", "database", "cloud", "packageManager"]),
103
- flags: boolRecord(["hasFrontend", "usesAI", "runsInCloud"]),
104
- harness: {
105
- type: "object",
106
- additionalProperties: false,
107
- required: ["targets", "qa"],
108
- properties: {
109
- targets: {
110
- type: "array",
111
- minItems: 1,
112
- items: { enum: ["claude", "codex"] },
113
- },
114
- qa: { type: "boolean" },
115
- },
116
- },
117
- agent_files: {
118
- type: "object",
119
- additionalProperties: false,
120
- required: ["mode", "codex", "claude"],
121
- properties: {
122
- mode: { enum: ["append", "update", "overwrite"] },
123
- codex: { type: "string", minLength: 1 },
124
- claude: { type: "string", minLength: 1 },
125
- },
126
- },
127
- agents: artifactPathMap,
128
- skills: artifactPathMap,
129
- },
130
- } as const;
@@ -1,156 +0,0 @@
1
- /**
2
- * Rafi neutral schema — the shapes that the `special-agents` library and the
3
- * `ai-foreman` runtime must agree on. Authoring inputs (rule packs, skills,
4
- * agent manifests) and the per-project configuration that drives composition.
5
- */
6
-
7
- // ───────────────────────────── Rule packs ─────────────────────────────
8
-
9
- /** Which category a rule pack belongs to (drives default load behavior). */
10
- export type PackCategory = "base" | "process" | "domain" | "templated";
11
-
12
- /**
13
- * When a pack applies. `always` packs load for every project; the others load
14
- * only when the matching project flag is on (see {@link ProjectFlags}).
15
- */
16
- export type PackCondition = "always" | "frontend" | "ai" | "cloud" | "backend";
17
-
18
- /** The YAML front-matter carried by each rule pack markdown file. */
19
- export interface RulePackFrontmatter {
20
- /** Unique, kebab-case identifier (e.g. `security`). */
21
- name: string;
22
- category: PackCategory;
23
- /** One-line summary used in indexes and pack pickers. */
24
- description: string;
25
- condition: PackCondition;
26
- /** True when the body contains `{{placeholders}}` / `{{#if}}` directives. */
27
- template: boolean;
28
- /** When true, the pack is omitted while the foreman ticket tracker is active. */
29
- supersededByForeman?: boolean;
30
- }
31
-
32
- /** A fully loaded rule pack: its front-matter plus the markdown body. */
33
- export interface RulePack extends RulePackFrontmatter {
34
- /** The rule text (bullets) below the front-matter. */
35
- body: string;
36
- }
37
-
38
- // ───────────────────────────── Skills ─────────────────────────────
39
-
40
- /** How a skill should be treated when flattening for Codex (which can't lazy-load). */
41
- export type CodexPriority = "inline" | "reference";
42
-
43
- /**
44
- * A skill manifest. Keeps the existing Anthropic `SKILL.md` format and adds two
45
- * optional composition fields that non-Rafi tools can safely ignore.
46
- */
47
- export interface SkillManifest {
48
- /** Unique, kebab-case identifier matching the skill directory name. */
49
- name: string;
50
- /** One-line trigger description (the cheap progressive-disclosure index). */
51
- description: string;
52
- /** Rule packs this skill wants loaded alongside it. */
53
- pins?: string[];
54
- /** Whether Codex flattening should inline this skill's body or just reference it. */
55
- codexPriority?: CodexPriority;
56
- /** The skill body (instructions). Optional in metadata-only contexts. */
57
- body?: string;
58
- }
59
-
60
- // ───────────────────────────── Agents (roles) ─────────────────────────────
61
-
62
- /** The role an agent fills, mapped to an ai-foreman turn-type or command. */
63
- export type AgentRole = "builder" | "qa" | "planner" | "ticket-maker";
64
-
65
- /** Reasoning effort levels accepted by the builders. */
66
- export type EffortLevel = "low" | "medium" | "high" | "xhigh";
67
-
68
- /** Packs added to a role only when the matching project flag is on. */
69
- export interface ConditionalPacks {
70
- ai?: string[];
71
- frontend?: string[];
72
- cloud?: string[];
73
- backend?: string[];
74
- }
75
-
76
- /**
77
- * A role manifest: a named composition of rule packs + skills that the runtime
78
- * loads for a given turn-type.
79
- */
80
- export interface AgentManifest {
81
- /** Unique, kebab-case identifier (usually equals {@link role}). */
82
- name: string;
83
- description: string;
84
- role: AgentRole;
85
- /** Pack references; globs like `base/*` are allowed and expanded at compile time. */
86
- packs: string[];
87
- /** Skill names this role preloads. */
88
- skills: string[];
89
- /** Extra packs gated on project flags. */
90
- conditionalPacks?: ConditionalPacks;
91
- /** Model override; null inherits the runtime's `--model`. */
92
- model?: string | null;
93
- /** Effort override; null inherits the runtime's `--effort`. */
94
- effort?: EffortLevel | null;
95
- }
96
-
97
- // ───────────────────────────── Project config ─────────────────────────────
98
-
99
- /** Which harness targets to emit native config for. */
100
- export type HarnessTarget = "claude" | "codex";
101
-
102
- /** The stack choices collected by `rafi create` (free-text strings). */
103
- export interface ProjectStack {
104
- frontend: string;
105
- backend: string;
106
- database: string;
107
- cloud: string;
108
- packageManager: string;
109
- }
110
-
111
- /** Boolean flags that gate conditional packs and docs. */
112
- export interface ProjectFlags {
113
- hasFrontend: boolean;
114
- usesAI: boolean;
115
- runsInCloud: boolean;
116
- }
117
-
118
- /** Harness emission + QA preferences. */
119
- export interface HarnessConfig {
120
- targets: HarnessTarget[];
121
- qa: boolean;
122
- }
123
-
124
- /** How Rafi should handle existing root instruction files. */
125
- export type AgentFileMode = "append" | "update" | "overwrite";
126
-
127
- /** Root instruction files used by Codex and Claude. */
128
- export interface AgentFilesConfig {
129
- mode: AgentFileMode;
130
- codex: string;
131
- claude: string;
132
- }
133
-
134
- /** Per-runtime paths for a skill or agent artifact. */
135
- export type ArtifactSource = "rafi" | "existing";
136
-
137
- export interface RuntimeArtifactConfig {
138
- artifact_source: ArtifactSource;
139
- claude: string;
140
- codex: string;
141
- }
142
-
143
- /**
144
- * The committed `rafi-config.yaml` in a target repo. Skipping the walkthrough uses
145
- * the library defaults, which reproduce today's hardcoded guidance.
146
- */
147
- export interface ProjectConfig {
148
- appName: string;
149
- timezone: string;
150
- stack: ProjectStack;
151
- flags: ProjectFlags;
152
- harness: HarnessConfig;
153
- agent_files: AgentFilesConfig;
154
- agents: Record<string, RuntimeArtifactConfig>;
155
- skills: Record<string, RuntimeArtifactConfig>;
156
- }
@@ -1,60 +0,0 @@
1
- /** ajv-backed validation for the neutral schemas. */
2
- import { Ajv, type ValidateFunction } from "ajv";
3
- import {
4
- rulePackSchema,
5
- skillManifestSchema,
6
- agentManifestSchema,
7
- projectConfigSchema,
8
- } from "./schemas.js";
9
- import type {
10
- RulePackFrontmatter,
11
- SkillManifest,
12
- AgentManifest,
13
- ProjectConfig,
14
- } from "./types.js";
15
-
16
- const ajv = new Ajv({ allErrors: true, allowUnionTypes: true });
17
-
18
- /** Outcome of validating a value against one of the neutral schemas. */
19
- export interface ValidationResult {
20
- valid: boolean;
21
- /** Human-readable messages; empty when valid. */
22
- errors: string[];
23
- }
24
-
25
- function run(fn: ValidateFunction, data: unknown): ValidationResult {
26
- const valid = fn(data) as boolean;
27
- if (valid) return { valid: true, errors: [] };
28
- const errors = (fn.errors ?? []).map(
29
- (e) => `${e.instancePath || "(root)"} ${e.message ?? "is invalid"}`.trim(),
30
- );
31
- return { valid: false, errors };
32
- }
33
-
34
- const vRulePack = ajv.compile(rulePackSchema);
35
- const vSkill = ajv.compile(skillManifestSchema);
36
- const vAgent = ajv.compile(agentManifestSchema);
37
- const vProject = ajv.compile(projectConfigSchema);
38
-
39
- export const validateRulePack = (d: unknown): ValidationResult => run(vRulePack, d);
40
- export const validateSkillManifest = (d: unknown): ValidationResult => run(vSkill, d);
41
- export const validateAgentManifest = (d: unknown): ValidationResult => run(vAgent, d);
42
- export const validateProjectConfig = (d: unknown): ValidationResult => run(vProject, d);
43
-
44
- /** Validate and narrow, throwing on failure. */
45
- export function assertRulePack(d: unknown): asserts d is RulePackFrontmatter {
46
- const r = validateRulePack(d);
47
- if (!r.valid) throw new Error(`Invalid rule pack: ${r.errors.join("; ")}`);
48
- }
49
- export function assertSkillManifest(d: unknown): asserts d is SkillManifest {
50
- const r = validateSkillManifest(d);
51
- if (!r.valid) throw new Error(`Invalid skill manifest: ${r.errors.join("; ")}`);
52
- }
53
- export function assertAgentManifest(d: unknown): asserts d is AgentManifest {
54
- const r = validateAgentManifest(d);
55
- if (!r.valid) throw new Error(`Invalid agent manifest: ${r.errors.join("; ")}`);
56
- }
57
- export function assertProjectConfig(d: unknown): asserts d is ProjectConfig {
58
- const r = validateProjectConfig(d);
59
- if (!r.valid) throw new Error(`Invalid project config: ${r.errors.join("; ")}`);
60
- }