@really-knows-ai/foundry 3.5.6 → 3.5.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/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.5.7] - 2026-05-23
4
+
5
+ ### Added
6
+
7
+ - Artefact types can include an `example.md` alongside `definition.md`. When present, the forge skill treats its structure as normative — the forge agent follows the same format, preventing common formatting mistakes like unwanted title headings on haikus.
8
+
3
9
  ## [3.5.6] - 2026-05-23
4
10
 
5
11
  ### Fixed
@@ -22,12 +22,20 @@ export async function getCycleDefinition(foundryDir, cycleId, io) {
22
22
  }
23
23
 
24
24
  export async function getArtefactType(foundryDir, typeId, io) {
25
- const path = join(foundryDir, 'artefacts', typeId, 'definition.md');
26
- if (!(await io.exists(path))) {
25
+ const dir = join(foundryDir, 'artefacts', typeId);
26
+ const defPath = join(dir, 'definition.md');
27
+ if (!(await io.exists(defPath))) {
27
28
  throw new Error(`Artefact type not found: ${typeId}`);
28
29
  }
29
- const text = await io.readFile(path);
30
- return parseDoc(text);
30
+ const text = await io.readFile(defPath);
31
+ const result = parseDoc(text);
32
+
33
+ const examplePath = join(dir, 'example.md');
34
+ if (await io.exists(examplePath)) {
35
+ result.example = (await io.readFile(examplePath)).trim();
36
+ }
37
+
38
+ return result;
31
39
  }
32
40
 
33
41
  /**
@@ -40,7 +40,7 @@ Forge runs inside an enforced stage. Your **first** and **last** tool calls are
40
40
 
41
41
  Then return control to the user and stop.
42
42
  3. `foundry_config_cycle` — understand what to produce and what inputs are available.
43
- 4. `foundry_config_artefact_type` with the output type ID — get the artefact type definition, especially its `file-patterns`.
43
+ 4. `foundry_config_artefact_type` with the output type ID — get the artefact type definition, `file-patterns`, and any example. When the response includes an `example` field, its structure is normative — your output must follow the same format (no extra headings, metadata blocks, or free-form prose that the example does not include).
44
44
  5. `foundry_config_laws` — get all applicable laws (global + type-specific).
45
45
  6. If the cycle declares `inputs`, discover input files by filesystem scan:
46
46
  - For each type listed in `inputs`, call `foundry_config_artefact_type` to get its `file-patterns`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@really-knows-ai/foundry",
3
- "version": "3.5.6",
3
+ "version": "3.5.7",
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",