@really-knows-ai/foundry 3.3.0 → 3.3.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.
- package/dist/.opencode/plugins/foundry-tools/config-create-tools.js +1 -1
- package/dist/.opencode/plugins/foundry-tools/config-law-tools.js +1 -1
- package/dist/CHANGELOG.md +19 -0
- package/dist/skills/add-artefact-type/SKILL.md +0 -13
- package/dist/skills/add-law/SKILL.md +17 -0
- package/package.json +1 -1
|
@@ -142,7 +142,7 @@ function artefactTypeArgs(s) { return {
|
|
|
142
142
|
function appraiserArgs(s) { return {
|
|
143
143
|
id: s.string().describe('Slugged identifier matching the filename under foundry/appraisers/'),
|
|
144
144
|
name: s.string().describe('Human-readable display name written to frontmatter.name'),
|
|
145
|
-
description: s.string().describe('
|
|
145
|
+
description: s.string().describe('Personality or perspective (2-4 sentences: how they think, what they care about, how they evaluate). Appraisers read laws to learn what to check — laws define boundaries and constraints, this field defines the evaluator character and lens only. Do not enumerate criteria here; put those in laws.'),
|
|
146
146
|
model: s.string().optional().describe('Optional model override for this appraiser (e.g. openai/gpt-4o)'),
|
|
147
147
|
}; }
|
|
148
148
|
|
|
@@ -332,7 +332,7 @@ function makeAddLawTool(tool) {
|
|
|
332
332
|
}).describe('Where to write the law'),
|
|
333
333
|
validators: tool.schema.array(tool.schema.object({
|
|
334
334
|
id: tool.schema.string().describe('Validator identifier'),
|
|
335
|
-
command: tool.schema.string().describe('CLI command with optional {pattern} / {files} placeholders'),
|
|
335
|
+
command: tool.schema.string().describe('CLI command with optional {pattern} / {files} placeholders. Prefer JavaScript (.mjs) scripts as separate files (e.g. "node foundry/artefacts/<type>/check.mjs {files}"). Stdout must be NDJSON: one JSON object per line with required fields "file" (relative path) and "text" (message). Optional: "location" (line:col), "severity" (error|warning). Exit code is ignored.'),
|
|
336
336
|
failureMeans: tool.schema.string().optional().describe('Description of what failure means'),
|
|
337
337
|
})).optional().describe('Optional deterministic validators'),
|
|
338
338
|
},
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.3.1] - 2026-05-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Appraiser tool description** now explicitly states that appraisers are
|
|
8
|
+
personalities only — boundaries and constraints belong in laws. Prevents
|
|
9
|
+
the AI from embedding criteria in appraiser descriptions that should be
|
|
10
|
+
encoded as laws.
|
|
11
|
+
- **Validator command description** now mandates `.mjs` scripts and NDJSON
|
|
12
|
+
stdout format (`file`, `text`, optional `location`/`severity`, exit code
|
|
13
|
+
ignored). Prevents the AI from using inline bash/Python validators that
|
|
14
|
+
don't produce machine-parseable output.
|
|
15
|
+
- **add-law skill** gains §2a: a deterministic-vs-subjective split step
|
|
16
|
+
that walks the user through which law elements can be script-checked and
|
|
17
|
+
which are left to appraisers. Includes guidance to prefer existing
|
|
18
|
+
libraries over hand-rolled validation logic.
|
|
19
|
+
- **add-artefact-type skill** no longer carries validator guidance
|
|
20
|
+
(validators are exclusively law-related, not artefact-type-related).
|
|
21
|
+
|
|
3
22
|
## [3.3.0] - 2026-05-14
|
|
4
23
|
|
|
5
24
|
### Added
|
|
@@ -94,8 +94,6 @@ in the `name` field.
|
|
|
94
94
|
|
|
95
95
|
Ask: does this capture the artefact type correctly?
|
|
96
96
|
|
|
97
|
-
When laws or validators are clearly part of the requested artefact type, draft them during artefact-type creation. Use the validator contract from `add-law` and prefer established packages installed with the project package manager.
|
|
98
|
-
|
|
99
97
|
### 5. Laws (optional)
|
|
100
98
|
|
|
101
99
|
Ask:
|
|
@@ -114,17 +112,6 @@ the `add-law` skill under **§7a. Validator contract**. Authors of
|
|
|
114
112
|
type-specific laws must follow that contract — do not invent a
|
|
115
113
|
different one here.
|
|
116
114
|
|
|
117
|
-
**Use existing libraries:** Before writing custom validation logic,
|
|
118
|
-
search npm for well-tested libraries that solve the problem (e.g.
|
|
119
|
-
`syllable` for syllable counting, `natural` for NLP tasks).
|
|
120
|
-
Hand-rolled heuristics are fragile — prefer battle-tested packages.
|
|
121
|
-
Install them as project dependencies.
|
|
122
|
-
|
|
123
|
-
Check the project's `package.json` for `"type": "module"`:
|
|
124
|
-
- If ESM (`"type": "module"`): use `import` syntax, or name scripts with `.mjs` extension
|
|
125
|
-
- If CommonJS (no `"type"` field or `"type": "commonjs"`): `require()` is fine, or use `.cjs` extension
|
|
126
|
-
- When in doubt, use `.mjs` or `.cjs` extensions to be explicit regardless of project settings
|
|
127
|
-
|
|
128
115
|
### 6. Appraisers (optional)
|
|
129
116
|
|
|
130
117
|
Ask:
|
|
@@ -57,6 +57,23 @@ Write the law using these structured fields:
|
|
|
57
57
|
- `failing` (string) — description of what failing looks like
|
|
58
58
|
- `validators` (array, optional) — validator entries. Include only when a deterministic check can decide pass/fail. See **Validator contract** below for the exact shape a validator command must satisfy.
|
|
59
59
|
|
|
60
|
+
#### 2a. Identify deterministic vs subjective elements
|
|
61
|
+
|
|
62
|
+
For each law, explicitly split what it checks into two categories:
|
|
63
|
+
|
|
64
|
+
- **Deterministic** — can be checked by a script without human or LLM judgment. Examples: line count, syllable count, word minimum, forbidden patterns, file existence, formatting rules. These become `validators:` entries in the law.
|
|
65
|
+
- **Subjective** — requires judgment. Examples: imagery quality, emotional resonance, persuasiveness, aesthetic appeal, clarity of argument. The appraisers evaluate these during the appraise stage. No validator entry needed; the law's prose alone guides the appraiser.
|
|
66
|
+
|
|
67
|
+
Walk the user through this split for each law:
|
|
68
|
+
|
|
69
|
+
> This law covers [summary]. Here's what's deterministic vs subjective:
|
|
70
|
+
> - Deterministic: [list elements that can be script-checked]
|
|
71
|
+
> - Subjective: [list elements requiring judgment — appraisers handle these]
|
|
72
|
+
>
|
|
73
|
+
> Shall I add validators for the deterministic elements?
|
|
74
|
+
|
|
75
|
+
For each deterministic element, write a standalone `.mjs` script next to the artefacts it validates (e.g. `foundry/artefacts/<type>/check-line-count.mjs`) and reference it in the command (e.g. `node foundry/artefacts/<type>/check-line-count.mjs {files}`). Place validators alongside the artefacts so they colocate with what they validate. Prefer Node.js built-ins and libraries already in the project; hand-rolled heuristics are fragile — use available packages instead of writing custom validation logic from scratch.
|
|
76
|
+
|
|
60
77
|
The `id` value should be:
|
|
61
78
|
- Lowercase, hyphenated
|
|
62
79
|
- Short but descriptive
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@really-knows-ai/foundry",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "A skill-driven framework for governed artefact generation with AI coding tools. Define your own artefact types, laws, and flows — Foundry handles the forge → quench → appraise pipeline with deterministic routing, quality gates, and iterative refinement.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/.opencode/plugins/foundry.js",
|