@really-knows-ai/foundry 3.4.0 → 3.5.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.
@@ -40,9 +40,9 @@ Appraise makes **no disk writes**. Feedback output flows through `foundry_feedba
40
40
  > 3. Investigate and fix the root cause of the failure before restarting.
41
41
 
42
42
  Then return control to the user and stop.
43
- - `foundry_artefacts_list({cycle: <current-cycle>})` — enumerate this cycle's artefacts. Always pass the `cycle` filter; omitting it returns stale rows from prior sessions. Skip rows whose status is `done` or `blocked`.
44
- - For each remaining row, gather its type-specific context:
45
- - `foundry_config_laws` with the row's type — applicable laws (global + type-specific)
43
+ - `foundry_artefacts_list({})` — enumerate the current cycle's branch artefact changes as `[{ file, state }]` entries.
44
+ - For each artefact change, gather its type-specific context:
45
+ - `foundry_config_laws` with the cycle's output type — applicable laws (global + type-specific)
46
46
  - `foundry_config_artefact_type` with the type ID — the artefact type definition
47
47
  - `foundry_appraisers_select` with the type ID — selected appraiser personalities with their raw model IDs
48
48
 
@@ -23,7 +23,7 @@ Human-appraise runs inside an enforced stage. Your **first** and **last** tool c
23
23
 
24
24
  Human-appraise makes **no disk writes**. All output flows through `foundry_feedback_add` and `foundry_feedback_resolve`. `foundry_stage_end` flags unexpected writes as a violation.
25
25
 
26
- Human-appraise **cannot** call `foundry_feedback_action`, `foundry_feedback_wontfix`, or `foundry_artefacts_set_status` — the tools reject those calls during a human-appraise stage (action/wontfix are forge-only forward transitions; set-status requires no active stage). See "Feedback handling" below for the legal transitions available to human-appraise.
26
+ Human-appraise **cannot** call `foundry_feedback_action` or `foundry_feedback_wontfix` — the tools reject those calls during a human-appraise stage (action/wontfix are forge-only forward transitions). See "Feedback handling" below for the legal transitions available to human-appraise.
27
27
 
28
28
  ## Input
29
29
 
@@ -54,7 +54,7 @@ Your LAST tool call must be `foundry_stage_end({summary: '<one-sentence descript
54
54
  > 3. Investigate and fix the root cause of the failure before restarting.
55
55
 
56
56
  Then call `foundry_stage_end({summary: 'Flow is failed; no human appraisal performed'})`, return control to the user, and stop.
57
- - `foundry_artefacts_list({cycle: <current-cycle>})` — this cycle's artefact files and status (always pass the `cycle` filter; omitting it returns stale rows from prior sessions)
57
+ - `foundry_artefacts_list({})` — this cycle's branch artefact changes as `[{ file, state }]` entries
58
58
  - `foundry_feedback_list` — all existing feedback
59
59
  - `foundry_history_list({cycle: <current-cycle>})` — what has happened so far
60
60
 
@@ -75,7 +75,7 @@ Your LAST tool call must be `foundry_stage_end({summary: '<one-sentence descript
75
75
  - **Approve** — "looks good" / "continue" — no feedback added, sort will advance.
76
76
  - **Provide feedback** — `foundry_feedback_add({ file, text, tag: 'human' })`. Sort will route back to forge.
77
77
  - **Resolve feedback** — `foundry_feedback_resolve({ id, resolution, reason? })` for items in `{actioned, wont-fix, deadlocked}`. See "Feedback handling" below for the legal transitions and authority rules.
78
- - **Abort** — human-appraise cannot directly mark the artefact `blocked` (the `foundry_artefacts_set_status` tool refuses calls during an active stage). To abort: end the stage with a summary explaining the abort, then either (a) instruct the user to call `foundry_workfile_delete({ confirm: true })` to discard the cycle, or (b) reject outstanding feedback so routing exhausts iterations and sort marks the artefact blocked on its own.
78
+ - **Abort** — human-appraise cannot directly mark the artefact `blocked` (the repository no longer has a per-artefact status tool or table). To abort: end the stage with a summary explaining the abort, then either (a) instruct the user to call `foundry_workfile_delete({ confirm: true })` to discard the cycle, or (b) reject outstanding feedback so routing exhausts iterations and sort blocks the cycle on its own.
79
79
 
80
80
  7. `foundry_stage_end({summary})` — describe what the human decided so sort can log it.
81
81
 
@@ -96,10 +96,9 @@ What human-appraise can NOT do:
96
96
  `{actioned, wont-fix}` — that is forge's lane (spec §5.1 rule 1) and
97
97
  the tools reject calls from any non-forge stage. If an open or rejected
98
98
  item needs work, sort will route to forge after this stage ends.
99
- - **No artefact status writes.** `foundry_artefacts_set_status` requires
100
- no active stage; it refuses calls while human-appraise is open. Status
101
- promotion to `done`/`blocked` is owned by sort/orchestrate based on
102
- routing.
99
+ - **No artefact status writes.** The repository no longer has a per-artefact
100
+ status tool or table. Status is owned by the cycle state machine through
101
+ sort and orchestrate routing.
103
102
 
104
103
  What human-appraise CAN do:
105
104
 
@@ -87,21 +87,20 @@ When it returns, call `foundry_orchestrate({lastResult: {ok: true}})`.
87
87
 
88
88
  Payload: `{cycle, artefact_file, next_cycles}`.
89
89
 
90
- 1. Call `foundry_artefacts_set_status({file: artefact_file, status: 'done'})`.
91
- 2. Report to the user: "Cycle `<cycle>` complete. Output: `<artefact_file>`. Next cycles available: `<next_cycles>`."
92
- 3. Return control to the flow skill.
90
+ 1. Report to the user: "Cycle `<cycle>` complete. Output: `<artefact_file>`. Next cycles available: `<next_cycles>`."
91
+ 2. Return control to the flow skill.
93
92
 
94
93
  ### `blocked`
95
94
 
96
95
  Payload: `{cycle, artefact_file, reason}`.
97
96
 
98
- Report to the user: "Cycle `<cycle>` blocked on `<artefact_file>`: `<reason>`." Return control to the flow skill. The artefact has already been marked blocked.
97
+ Report to the user: "Cycle `<cycle>` blocked on `<artefact_file>`: `<reason>`." Return control to the flow skill. The cycle is blocked.
99
98
 
100
99
  ### `violation`
101
100
 
102
101
  Payload: `{details, affected_files}`.
103
102
 
104
- Report to the user: "Cycle halted (violation): `<details>`. Affected files: `<affected_files>`." Return control to the flow skill. Affected artefacts have already been marked blocked.
103
+ Report to the user: "Cycle halted (violation): `<details>`. Affected files: `<affected_files>`." Return control to the flow skill. The cycle is halted by the violation; no per-artefact status is written.
105
104
 
106
105
  ## What you do NOT do
107
106
 
@@ -39,14 +39,14 @@ Quench makes **no disk writes**. You produce feedback via `foundry_feedback_add`
39
39
  > 3. Investigate and fix the root cause of the failure before restarting.
40
40
 
41
41
  Then return control to the user and stop.
42
- 3. `foundry_artefacts_list({cycle: <current-cycle>})` — enumerate the artefacts produced by **this** cycle. Always pass the `cycle` filter; omitting it returns rows from prior sessions and validates stale files. Skip rows whose status is `done` or `blocked`.
43
- 4. For each remaining row:
42
+ 3. `foundry_artefacts_list({})` — enumerate the current cycle's branch artefact changes as `[{ file, state }]` entries.
43
+ 4. For each artefact change:
44
44
  a. `foundry_validate_run({ typeId: '<type-id>' })` — executes all law-based validators for the artefact type. The tool returns `{ ok, validatorsRun, items, errors }`. `items` is the array of parsed feedback items; each entry carries `lawId`, `validatorId`, `file`, and `text` (plus optional `location` and `severity`). `errors` carries validator-level failures with `lawId`, `validatorId`, `type` (`parse` or `pattern-mismatch`), and `message`.
45
45
  b. For each entry in `items`: call `foundry_feedback_add` with `{ file: item.file, text: item.text, tag: 'law:' + item.lawId + ':' + item.validatorId }`. The tag uses the law ID and validator ID returned by the tool so operators reading `WORK.feedback.yaml` can identify exactly which validator produced each item.
46
46
  c. If `errors` is non-empty, the validators themselves misbehaved (malformed JSONL or files outside the artefact type's `file-patterns`). Report these to the user via `foundry_stage_end` summary; do not convert them to law-tagged feedback.
47
47
  5. Call `foundry_feedback_list`. For items whose `source` matches your stage id and whose state is `actioned` or `wont-fix`, use the validation results from step 4 to resolve them by id: approve when the relevant validation now passes or the deterministic issue is gone; reject with a reason when it still fails.
48
- 6. If every command passes for every row, add no new feedback.
49
- 7. If the artefact table has no rows for this cycle, `foundry_stage_end({summary: 'SKIP: no artefacts registered for this cycle'})` and stop.
48
+ 6. If every command passes for every artefact change, add no new feedback.
49
+ 7. If the artefact list is empty, `foundry_stage_end({summary: 'SKIP: no files'})` and stop.
50
50
  8. `foundry_stage_end({summary})`.
51
51
 
52
52
  ## Feedback handling
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@really-knows-ai/foundry",
3
- "version": "3.4.0",
3
+ "version": "3.5.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",