@really-knows-ai/foundry 2.3.2 → 3.0.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 (170) hide show
  1. package/README.md +180 -369
  2. package/dist/.opencode/plugins/foundry-tools/appraiser-tools.js +28 -0
  3. package/dist/.opencode/plugins/foundry-tools/artefact-tools.js +58 -0
  4. package/dist/.opencode/plugins/foundry-tools/assay-tools.js +92 -0
  5. package/dist/.opencode/plugins/foundry-tools/attestation-tools.js +191 -0
  6. package/dist/.opencode/plugins/foundry-tools/config-create-tools.js +128 -0
  7. package/dist/.opencode/plugins/foundry-tools/config-law-tools.js +380 -0
  8. package/dist/.opencode/plugins/foundry-tools/config-tools.js +43 -0
  9. package/dist/.opencode/plugins/foundry-tools/feedback-tools.js +234 -0
  10. package/dist/.opencode/plugins/foundry-tools/git-helpers.js +354 -0
  11. package/dist/.opencode/plugins/foundry-tools/git-tools.js +181 -0
  12. package/dist/.opencode/plugins/foundry-tools/helpers.js +340 -0
  13. package/dist/.opencode/plugins/foundry-tools/history-tools.js +20 -0
  14. package/dist/.opencode/plugins/foundry-tools/memory-admin-tools.js +296 -0
  15. package/dist/.opencode/plugins/foundry-tools/memory-helpers.js +104 -0
  16. package/dist/.opencode/plugins/foundry-tools/memory-tools.js +286 -0
  17. package/dist/.opencode/plugins/foundry-tools/orchestrate-tool.js +159 -0
  18. package/dist/.opencode/plugins/foundry-tools/snapshot-tools.js +104 -0
  19. package/dist/.opencode/plugins/foundry-tools/stage-tools.js +186 -0
  20. package/dist/.opencode/plugins/foundry-tools/validate-tools.js +263 -0
  21. package/dist/.opencode/plugins/foundry-tools/workfile-tools.js +102 -0
  22. package/dist/.opencode/plugins/foundry.js +105 -0
  23. package/dist/CHANGELOG.md +533 -0
  24. package/dist/LICENSE +21 -0
  25. package/dist/README.md +278 -0
  26. package/dist/docs/README.md +59 -0
  27. package/dist/docs/architecture.md +433 -0
  28. package/dist/docs/concepts.md +395 -0
  29. package/dist/docs/getting-started.md +344 -0
  30. package/dist/docs/memory-maintenance.md +176 -0
  31. package/dist/docs/tools.md +1411 -0
  32. package/dist/docs/work-spec.md +283 -0
  33. package/dist/scripts/lib/artefacts.js +151 -0
  34. package/dist/scripts/lib/assay/loader.js +151 -0
  35. package/dist/scripts/lib/assay/parse-jsonl.js +102 -0
  36. package/dist/scripts/lib/assay/permissions.js +52 -0
  37. package/dist/scripts/lib/assay/run.js +219 -0
  38. package/dist/scripts/lib/assay/spawn-with-timeout.js +138 -0
  39. package/dist/scripts/lib/attestation/attest.js +111 -0
  40. package/dist/scripts/lib/attestation/canonical-json.js +109 -0
  41. package/dist/scripts/lib/attestation/hash.js +17 -0
  42. package/dist/scripts/lib/attestation/parse.js +14 -0
  43. package/dist/scripts/lib/attestation/payload.js +106 -0
  44. package/dist/scripts/lib/attestation/render.js +16 -0
  45. package/dist/scripts/lib/attestation/verify.js +15 -0
  46. package/dist/scripts/lib/branch-guard.js +72 -0
  47. package/dist/scripts/lib/config-creators/appraiser.js +9 -0
  48. package/dist/scripts/lib/config-creators/artefact-type.js +9 -0
  49. package/dist/scripts/lib/config-creators/cycle.js +11 -0
  50. package/dist/scripts/lib/config-creators/factory.js +49 -0
  51. package/dist/scripts/lib/config-creators/flow.js +11 -0
  52. package/dist/scripts/lib/config-validators/appraiser.js +49 -0
  53. package/dist/scripts/lib/config-validators/artefact-type.js +38 -0
  54. package/dist/scripts/lib/config-validators/cycle.js +131 -0
  55. package/dist/scripts/lib/config-validators/flow.js +57 -0
  56. package/dist/scripts/lib/config-validators/helpers.js +96 -0
  57. package/dist/scripts/lib/config-validators/law.js +96 -0
  58. package/dist/scripts/lib/config.js +328 -0
  59. package/dist/scripts/lib/failed-flow.js +131 -0
  60. package/dist/scripts/lib/feedback-store.js +249 -0
  61. package/dist/scripts/lib/feedback-transitions.js +105 -0
  62. package/dist/scripts/lib/finalize.js +70 -0
  63. package/dist/scripts/lib/foundational-guards.js +13 -0
  64. package/dist/scripts/lib/git-bridge.js +77 -0
  65. package/dist/scripts/lib/git-finish/work-finish.js +233 -0
  66. package/dist/scripts/lib/git-policy.js +101 -0
  67. package/dist/scripts/lib/guards.js +125 -0
  68. package/dist/scripts/lib/history.js +132 -0
  69. package/dist/scripts/lib/memory/admin/create-edge-type.js +91 -0
  70. package/dist/scripts/lib/memory/admin/create-entity-type.js +43 -0
  71. package/dist/scripts/lib/memory/admin/create-extractor.js +67 -0
  72. package/dist/scripts/lib/memory/admin/drop-edge-type.js +40 -0
  73. package/dist/scripts/lib/memory/admin/drop-entity-type.js +172 -0
  74. package/dist/scripts/lib/memory/admin/dump.js +47 -0
  75. package/dist/scripts/lib/memory/admin/helpers.js +31 -0
  76. package/dist/scripts/lib/memory/admin/init.js +170 -0
  77. package/dist/scripts/lib/memory/admin/live-store.js +76 -0
  78. package/dist/scripts/lib/memory/admin/reembed.js +285 -0
  79. package/dist/scripts/lib/memory/admin/rename-edge-type.js +54 -0
  80. package/dist/scripts/lib/memory/admin/rename-entity-type.js +151 -0
  81. package/dist/scripts/lib/memory/admin/reset.js +24 -0
  82. package/dist/scripts/lib/memory/admin/vacuum.js +9 -0
  83. package/dist/scripts/lib/memory/admin/validate.js +19 -0
  84. package/dist/scripts/lib/memory/config.js +149 -0
  85. package/dist/scripts/lib/memory/cozo.js +136 -0
  86. package/dist/scripts/lib/memory/drift.js +71 -0
  87. package/dist/scripts/lib/memory/embeddings.js +128 -0
  88. package/dist/scripts/lib/memory/frontmatter.js +75 -0
  89. package/dist/scripts/lib/memory/ndjson.js +84 -0
  90. package/dist/scripts/lib/memory/paths.js +25 -0
  91. package/dist/scripts/lib/memory/permissions.js +41 -0
  92. package/dist/scripts/lib/memory/prompt.js +109 -0
  93. package/dist/scripts/lib/memory/query.js +56 -0
  94. package/dist/scripts/lib/memory/reads.js +109 -0
  95. package/dist/scripts/lib/memory/schema.js +64 -0
  96. package/dist/scripts/lib/memory/search.js +73 -0
  97. package/dist/scripts/lib/memory/singleton.js +49 -0
  98. package/dist/scripts/lib/memory/store.js +162 -0
  99. package/dist/scripts/lib/memory/types.js +93 -0
  100. package/dist/scripts/lib/memory/validate.js +58 -0
  101. package/dist/scripts/lib/memory/writes.js +40 -0
  102. package/{scripts → dist/scripts}/lib/pending.js +7 -2
  103. package/dist/scripts/lib/secret.js +59 -0
  104. package/{scripts → dist/scripts}/lib/slug.js +3 -2
  105. package/dist/scripts/lib/snapshot/finish.js +103 -0
  106. package/dist/scripts/lib/snapshot/inspect.js +253 -0
  107. package/dist/scripts/lib/snapshot/render.js +55 -0
  108. package/dist/scripts/lib/sort-fs-check.js +121 -0
  109. package/dist/scripts/lib/sort-routing.js +101 -0
  110. package/{scripts → dist/scripts}/lib/stage-guard.js +12 -6
  111. package/{scripts → dist/scripts}/lib/state.js +4 -0
  112. package/dist/scripts/lib/token.js +57 -0
  113. package/dist/scripts/lib/tracing.js +59 -0
  114. package/dist/scripts/lib/ulid.js +100 -0
  115. package/dist/scripts/lib/validator-jsonl.js +162 -0
  116. package/{scripts → dist/scripts}/lib/workfile.js +38 -20
  117. package/dist/scripts/orchestrate-cycle.js +215 -0
  118. package/dist/scripts/orchestrate-phases.js +314 -0
  119. package/dist/scripts/orchestrate.js +163 -0
  120. package/dist/scripts/sort.js +278 -0
  121. package/{skills → dist/skills}/add-appraiser/SKILL.md +39 -9
  122. package/{skills → dist/skills}/add-artefact-type/SKILL.md +62 -40
  123. package/{skills → dist/skills}/add-cycle/SKILL.md +57 -17
  124. package/dist/skills/add-extractor/SKILL.md +133 -0
  125. package/{skills → dist/skills}/add-flow/SKILL.md +36 -10
  126. package/dist/skills/add-law/SKILL.md +191 -0
  127. package/dist/skills/add-memory-edge-type/SKILL.md +52 -0
  128. package/dist/skills/add-memory-entity-type/SKILL.md +74 -0
  129. package/{skills → dist/skills}/appraise/SKILL.md +62 -13
  130. package/dist/skills/assay/SKILL.md +72 -0
  131. package/dist/skills/change-embedding-model/SKILL.md +58 -0
  132. package/dist/skills/drop-memory-edge-type/SKILL.md +54 -0
  133. package/dist/skills/drop-memory-entity-type/SKILL.md +57 -0
  134. package/dist/skills/dry-run/SKILL.md +116 -0
  135. package/{skills → dist/skills}/flow/SKILL.md +15 -2
  136. package/dist/skills/forge/SKILL.md +121 -0
  137. package/dist/skills/human-appraise/SKILL.md +153 -0
  138. package/{skills → dist/skills}/init-foundry/SKILL.md +23 -4
  139. package/dist/skills/init-memory/SKILL.md +92 -0
  140. package/{skills → dist/skills}/orchestrate/SKILL.md +30 -4
  141. package/dist/skills/quench/SKILL.md +99 -0
  142. package/{skills → dist/skills}/refresh-agents/SKILL.md +1 -1
  143. package/dist/skills/rename-memory-edge-type/SKILL.md +50 -0
  144. package/dist/skills/rename-memory-entity-type/SKILL.md +51 -0
  145. package/dist/skills/reset-memory/SKILL.md +54 -0
  146. package/dist/skills/upgrade-foundry/SKILL.md +191 -0
  147. package/package.json +34 -17
  148. package/.opencode/plugins/foundry.js +0 -761
  149. package/CHANGELOG.md +0 -100
  150. package/docs/concepts.md +0 -122
  151. package/docs/getting-started.md +0 -187
  152. package/docs/work-spec.md +0 -207
  153. package/scripts/lib/artefacts.js +0 -124
  154. package/scripts/lib/config.js +0 -175
  155. package/scripts/lib/feedback-transitions.js +0 -25
  156. package/scripts/lib/feedback.js +0 -440
  157. package/scripts/lib/finalize.js +0 -41
  158. package/scripts/lib/history.js +0 -59
  159. package/scripts/lib/secret.js +0 -23
  160. package/scripts/lib/tags.js +0 -108
  161. package/scripts/lib/token.js +0 -26
  162. package/scripts/orchestrate.js +0 -418
  163. package/scripts/sort.js +0 -370
  164. package/scripts/validate-tags.js +0 -54
  165. package/skills/add-law/SKILL.md +0 -111
  166. package/skills/forge/SKILL.md +0 -88
  167. package/skills/human-appraise/SKILL.md +0 -82
  168. package/skills/quench/SKILL.md +0 -62
  169. package/skills/upgrade-foundry/SKILL.md +0 -216
  170. /package/{skills → dist/skills}/list-agents/SKILL.md +0 -0
@@ -0,0 +1,533 @@
1
+ # Changelog
2
+
3
+ ## [3.0.1] - 2026-05-11
4
+
5
+ A documentation and cleanup patch. No runtime behaviour change. `quench`
6
+ already read deterministic checks via `getLawsForQuench`; this release
7
+ aligns the authoring skills, end-user docs, and source tree with that
8
+ reality and removes the deprecated `validation.md` reader path.
9
+
10
+ ### Authoring skills now teach laws-with-validators
11
+
12
+ - `add-artefact-type` folds deterministic checks into laws via the
13
+ optional `validators:` block. The skill walks the user through laws
14
+ and their validators in a single step; the previously separate
15
+ "Validation" step is gone.
16
+ - `upgrade-foundry` describes type-specific laws (with validators where
17
+ applicable) instead of standalone "validation commands".
18
+ - The `validators:` YAML shape in `add-artefact-type` is now identical
19
+ to the canonical shape in `add-law`.
20
+
21
+ ### Documentation
22
+
23
+ - `docs/architecture.md`, `docs/concepts.md`, `docs/getting-started.md`,
24
+ and `docs/work-spec.md` drop every reference to `validation.md` and
25
+ describe `quench` as running validators declared inside laws.
26
+ - The `quench` stage is now correctly documented as included iff any
27
+ applicable law declares validators.
28
+
29
+ ### Internal cleanup
30
+
31
+ - Remove the deprecated `getValidation` and `parseValidationLines`
32
+ exports from `src/scripts/lib/config.js`, plus their six private
33
+ helpers. Nothing in production called them; `quench` reads via
34
+ `getLawsForQuench`.
35
+ - Remove the `describe('getValidation', …)` test block and three inert
36
+ `validation.md` fixtures from the orchestrate integration tests.
37
+
38
+ ### Migration
39
+
40
+ No action required for projects that already use laws-with-validators.
41
+ Projects still carrying a `foundry/artefacts/<type>/validation.md` file
42
+ have been carrying dead weight since the move to `getLawsForQuench`;
43
+ the file is now safe to delete by hand, or `upgrade-foundry` will
44
+ rebuild the configuration through the current tools.
45
+
46
+ ## [3.0.0] - 2026-05-10
47
+
48
+ A consolidation release covering every change since v2.4.2. Foundry 3.0.0
49
+ restructures the branch model into three explicit kinds (`config/*`,
50
+ `work/*`, `dry-run/*/*`), introduces deterministic attestation, replaces
51
+ the markdown-parsed feedback section with a typed YAML store, adds the
52
+ assay pre-forge stage and the flow-memory subsystem, unifies law
53
+ authoring around a JSONL-validator model, and adds a verbose tracing /
54
+ forensic-snapshot loop for dry-runs. The work was developed across what
55
+ were originally numbered as 2.5.0, 2.6.0, 2.7.0, and 3.0.0 internal
56
+ milestones; only 3.0.0 is being released. Where an intermediate
57
+ milestone introduced a feature and a later milestone modified it, this
58
+ entry documents the 3.0.0 end-state only.
59
+
60
+ ### Branch-model breaking changes
61
+
62
+ - **`foundry_git_branch` requires explicit `kind`.** The previous
63
+ `{ flowId, description }` signature is removed. Callers must now pass
64
+ `kind: 'config' | 'work' | 'dry-run'`. Per-kind requirements:
65
+ `kind: 'config'` needs `description` and a non-`config/*`,
66
+ non-`work/*` starting branch; `kind: 'work'` needs `flowId`,
67
+ `description`, and a non-`config/*`, non-`work/*` starting branch;
68
+ `kind: 'dry-run'` needs `flowId`, `description`, and the operator
69
+ must already be on a `config/<x>` branch. `flowId` is invalid for
70
+ `kind: 'config'`.
71
+ - **`foundry_git_finish` dispatches on the current branch prefix.**
72
+ `work/<x>` retains existing semantics (squash-merge plus WORK
73
+ cleanup); `config/<x>` is new (squash-merge, no WORK cleanup);
74
+ `dry-run/<x>/<y>` writes a forensic snapshot under `.snapshots/`
75
+ on the parent `config/<x>` working tree and force-deletes the
76
+ dry-run branch (see "Dry-run finish writes a forensic snapshot"
77
+ below). Any other branch is refused with "nothing to finish".
78
+ `baseBranch` is rejected for dry-run finish (the parent config
79
+ branch is encoded in the dry-run branch name).
80
+ - **Dry-run namespace is `dry-run/<parent>/<flowId>-<desc>`, not
81
+ nested under `config/<parent>`.** Originally specified as
82
+ `config/<x>/dry-run/<y>`; git refuses to coexist a parent ref with
83
+ a child-prefixed ref, so the namespace is a flat sibling instead.
84
+ - **Schema/config mutation now requires a `config/*` branch.**
85
+ Affected tools: `foundry_config_create_artefact_type`,
86
+ `_create_appraiser`, `_create_flow`, `_create_cycle`,
87
+ `foundry_config_add_law`, `foundry_config_edit_law`,
88
+ `foundry_memory_create_entity_type` / `_create_edge_type` /
89
+ `_rename_entity_type` / `_rename_edge_type` / `_drop_entity_type` /
90
+ `_drop_edge_type`, `foundry_extractor_create`, `foundry_memory_init`,
91
+ `foundry_memory_reset`, `foundry_memory_change_embedding_model`. All
92
+ refuse on any branch other than `config/<description>`.
93
+ - **Flow-data mutation now requires a `work/*` or `dry-run/*/*`
94
+ branch.** Affected tools: `foundry_orchestrate`,
95
+ `foundry_workfile_create` / `_delete`, `foundry_artefacts_set_status`,
96
+ `foundry_feedback_*` (mutating variants), `foundry_assay_run`,
97
+ `foundry_validate_run`, `foundry_appraisers_select`,
98
+ `foundry_stage_begin` / `_end` / `_retry`, `foundry_memory_put` /
99
+ `_relate` / `_unrelate`.
100
+
101
+ ### Attestation, dry-run, and snapshot breaking changes
102
+
103
+ - **`foundry_git_finish` on `work/*` refuses without ATTEST.md at HEAD.**
104
+ Work-branch merges are gated on a deterministic attestation commit
105
+ produced by `foundry_attest`. Operators must run `foundry_attest`
106
+ with `confirm: true` before finishing a work branch.
107
+ - **Dry-run finish writes a forensic snapshot.** `foundry_git_finish`
108
+ on a `dry-run/<x>/<y>` branch writes `.snapshots/<run-id>/` on the
109
+ parent `config/<x>` working tree (containing `README.md`,
110
+ `work/WORK*`, `diff.patch`, `trace.jsonl`) and force-deletes the
111
+ dry-run branch. No merge, no commit.
112
+ - **`.snapshots/` is a new gitignored top-level directory.** It
113
+ appears in projects only after the first dry-run finish. Snapshots
114
+ are local operator artefacts and never committed by foundry.
115
+ - **Verbose tool-call tracing on dry-run branches.** Every `foundry_*`
116
+ tool call (except `foundry_orchestrate`, which uses inline guards)
117
+ appends a JSONL record to `.foundry/trace/<branch-slug>.jsonl` while
118
+ on a dry-run branch. The trace is truncated when the dry-run branch
119
+ is created and copied into the snapshot at finish.
120
+
121
+ ### Feedback and state-machine breaking changes
122
+
123
+ - **Feedback storage moved from markdown to YAML.** The `## Feedback`
124
+ section in `WORK.md` is removed. Feedback items now live in
125
+ `WORK.feedback.yaml` with full transition history per item. Any
126
+ legacy `## Feedback` content in an old `WORK.md` is inert text:
127
+ not parsed, not deleted, not written to.
128
+ - **Feedback tools switch from `{ file, index }` to `{ id }`
129
+ addressing.** `foundry_feedback_add` drops the `stageBase?`
130
+ argument (source is read from the active stage).
131
+ `foundry_feedback_list` response shape is now
132
+ `{ id, file, tag, text, source, state, depth, reason? }`. Item ids
133
+ are ULIDs.
134
+ - **Feedback state machine expands from 4 states to 6:** `open |
135
+ actioned | wont-fix | rejected | deadlocked | resolved`. `approved`
136
+ is renamed to `resolved` internally; the public resolve tool still
137
+ accepts `resolution: 'approved' | 'rejected'` as input.
138
+ - **Deadlock detection is per-item.** Each item's depth in its own
139
+ transition history is checked against `deadlock-iterations`. Items
140
+ freshly added in the threshold-th iteration are never auto-deadlocked.
141
+ - **Source-authorship rule.** Only the stage that created a feedback
142
+ item can resolve or reject it. `human-appraise` has universal
143
+ override authority — it may transition any non-resolved item to any
144
+ legal target state regardless of source.
145
+ - **Assay rejected as a feedback source.** `foundry_feedback_add`
146
+ and `WORK.feedback.yaml` refuse `source: 'assay'`. Assay failures
147
+ surface as a hard flow failure (see Assay breaking changes below).
148
+
149
+ ### Cycle and artefact-type breaking changes
150
+
151
+ - **Cycle frontmatter key renamed: `output:` → `output-type:`.** The
152
+ orchestrator no longer reads `output:`. Cycle definitions in
153
+ `foundry/flows/*/cycles/*.md` must use `output-type:` to declare
154
+ the artefact-type id the cycle produces. Unmigrated cycles yield a
155
+ hard violation pointing to the upgrade skill.
156
+ - **Artefact-type frontmatter `output:` is removed.** The field had
157
+ zero runtime consumers — forge's write scope is governed by
158
+ `file-patterns`, and `file-patterns` legitimately spans multiple
159
+ directories, so a single `output:` (or earlier-proposed
160
+ `output-dir:`) could not honestly describe artefact location.
161
+ Stale `output:` entries are harmless but should be deleted.
162
+
163
+ ### Assay and memory breaking changes
164
+
165
+ - **Assay extractor failure marks the workfile failed.** When an
166
+ extractor exits non-zero, parses incorrectly, violates permissions,
167
+ or times out, `foundry_assay_run` calls `markWorkfileFailed` and
168
+ returns `{flow_failed: true, error, …}`. It does not file a
169
+ `#validation` feedback item. Rationale: the failure cause (a
170
+ project-authored script under `foundry/memory/extractors/`) lives
171
+ outside any artefact's `file-patterns`, so forge has no way to act
172
+ on assay-sourced feedback; the prior behaviour produced
173
+ unsatisfiable state-machine items. Tooling that pattern-matched
174
+ assay-sourced feedback must instead detect `flow_failed: true` on
175
+ the assay-run response.
176
+ - **Memory NDJSON relations moved to `foundry-memory/relations/`.**
177
+ Per-type row data (`<entity-type>.ndjson`, `<edge-type>.ndjson`)
178
+ lives at the top-level `foundry-memory/relations/` directory,
179
+ sibling to `foundry/`. The rest of the memory tree (`config.md`,
180
+ `schema.json`, `entities/`, `edges/`, `extractors/`, the gitignored
181
+ `memory.db*` runtime files) stays under `foundry/memory/`.
182
+ Rationale: the relations directory is large, frequently rewritten,
183
+ and benefits from being separable from the human-authored config.
184
+
185
+ ### Law model breaking changes
186
+
187
+ - **Quench executes law-defined JSONL validators.** Each law in
188
+ `foundry/laws/*.md` or `foundry/artefacts/<typeId>/laws.md` declares
189
+ one or more validator commands in a fenced code block.
190
+ `foundry_validate_run` executes them, parses their JSONL output, and
191
+ returns per-item feedback (`{ lawId, validatorId, file, text,
192
+ location?, severity? }`). The quench skill emits one
193
+ `foundry_feedback_add` call per item tagged
194
+ `law:<lawId>:<validatorId>`. Items whose `file` falls outside the
195
+ artefact type's `file-patterns` are surfaced as `pattern-mismatch`
196
+ errors rather than silently swallowed.
197
+ - **Law authoring split into `add` and `edit`.** There is no
198
+ `foundry_config_create_law`; use `foundry_config_add_law` for new
199
+ laws and `foundry_config_edit_law` to replace an existing law in
200
+ place. `foundry_config_read_law` returns the full markdown for a
201
+ single law by id, and `foundry_config_validate_law` runs schema
202
+ validation against a candidate body without writing.
203
+
204
+ ### Added
205
+
206
+ - **`foundry_attest`, `foundry_attestation_show`,
207
+ `foundry_attestation_verify`.** Deterministic attestation
208
+ primitives. `foundry_attest` verifies the current work cycle is
209
+ complete (all required stages ran, no unresolved feedback, no
210
+ blocked artefacts), writes a canonical-JSON ATTEST.md payload
211
+ (cycle id, diff sha, stages, attestation tools, models), and
212
+ commits it to the work branch. `foundry_attestation_show` and
213
+ `_verify` read and re-verify an attestation after the fact. Takes
214
+ `baseBranch` (optional, default `main`), `message` (required goal
215
+ text), and `confirm` (must be `true` to write).
216
+ - **`foundry_stage_retry` tool.** Re-runs the last failed stage on a
217
+ failed workfile without abandoning the cycle. Requires the
218
+ workfile to be in `status: failed` and the cause to be transient
219
+ (network, model error). Restores the active-stage token and clears
220
+ the failed marker.
221
+ - **`foundry_config_create_*` tools** for the four kinds with a
222
+ single-file canonical layout (artefact-type, appraiser, flow,
223
+ cycle). Each produces one git commit per invocation on the current
224
+ `config/*` branch. Updates (replacing an existing file) are not
225
+ exposed as MCP tools for these kinds; operators edit by hand on
226
+ the current `config/*` branch.
227
+ - **`foundry_config_validate_*` tools** for all five config kinds
228
+ (artefact-type, law, appraiser, flow, cycle). Schema-only, no
229
+ branch guard, callable from any branch. Authors iterate on a draft
230
+ body, then call the corresponding `_create_*` or `_add_law` /
231
+ `_edit_law` to commit.
232
+ - **`foundry_config_read_law` tool.** Reads a single law by id,
233
+ returning its full markdown including the validators block. No
234
+ branch guard.
235
+ - **`foundry_snapshot_*` tools.** `foundry_snapshot_list`, `_show`,
236
+ `_delete`, `_prune` — programmatic inspection and cleanup of
237
+ dry-run forensic snapshots. Allowed on every branch.
238
+ - **Assay stage.** A deterministic pre-forge stage that runs
239
+ project-authored extractor scripts to populate flow memory before
240
+ forge starts. Opt-in per cycle via `assay: { extractors: [...] }`
241
+ in cycle frontmatter. Iteration-0-only. See
242
+ [docs/concepts.md](docs/concepts.md#assay).
243
+ - **`foundry_assay_run` and `foundry_extractor_create` plugin tools.**
244
+ `foundry_assay_run` executes the extractors declared by the active
245
+ assay stage. `foundry_extractor_create` registers a new extractor
246
+ definition at `foundry/memory/extractors/<name>.md`.
247
+ - **`add-extractor` skill.** Authoring loop for extractor definitions.
248
+ - **Flow memory subsystem.** A typed, graph-shaped knowledge store
249
+ that persists across cycles. Entity types, edge types, and their
250
+ prose briefs live in `foundry/memory/`; row data is committed as
251
+ NDJSON under `foundry-memory/relations/`; the live database
252
+ (`foundry/memory/memory.db*`) is gitignored and rebuilt on demand
253
+ from the NDJSON files. Each cycle declares read/write permissions
254
+ in its frontmatter (`memory: { read: [...], write: [...] }`). The
255
+ dispatched stage prompt is augmented with a vocabulary block
256
+ listing the entity/edge types and memory tools visible to that
257
+ cycle.
258
+ - **20 memory tools.** `foundry_memory_{put,relate,unrelate,get,list,
259
+ neighbours,query,search}` for read/write,
260
+ `foundry_memory_{create,rename,drop}_{entity,edge}_type` for
261
+ vocabulary management, `foundry_memory_{init,validate,reset,dump,
262
+ vacuum,change_embedding_model}` for admin. Destructive operations
263
+ (`_drop_*`) take an optional `confirm` — without it they return a
264
+ preview of affected rows.
265
+ - **9 memory authoring skills.** `init-memory`,
266
+ `add-memory-entity-type`, `add-memory-edge-type`,
267
+ `rename-memory-entity-type`, `rename-memory-edge-type`,
268
+ `drop-memory-entity-type`, `drop-memory-edge-type`, `reset-memory`,
269
+ `change-embedding-model`.
270
+ - **Optional semantic search.** When `embeddings.enabled` is true in
271
+ `foundry/memory/config.md`, entities are embedded on write against
272
+ an OpenAI-compatible endpoint (default: local Ollama
273
+ `nomic-embed-text`, 768 dims) and exposed via
274
+ `foundry_memory_search`. Embeddings can be disabled; the graph
275
+ still works without them.
276
+ - **`dry-run` skill.** Documents the
277
+ config-edit → dry-run → finish → inspect-snapshot loop.
278
+ - **`WORK.feedback.yaml`.** First-class persistent record of every
279
+ feedback item and its full transition history. Atomic writes via
280
+ write-temp-then-rename.
281
+ - **`open_feedback` and `seq` on every `WORK.history.yaml` entry.**
282
+ `open_feedback` records the count of open items at each tick; `seq`
283
+ acts as a tiebreaker for same-millisecond timestamps.
284
+ - **Failed-flow guards on mutating tools.** `foundry_validate_run`
285
+ and 11 mutating memory admin tools (`foundry_memory_init`,
286
+ `_reset`, `_vacuum`, `_change_embedding_model`,
287
+ `_create_entity_type`, `_create_edge_type`, `_rename_entity_type`,
288
+ `_rename_edge_type`, `_drop_entity_type`, `_drop_edge_type`, and
289
+ `foundry_extractor_create`) refuse on a failed workfile. Read-only
290
+ memory tools (`_dump`, `_validate`) remain callable.
291
+ - **Deterministic orchestration.** `foundry_orchestrate` owns the
292
+ sort → history → dispatch → finalize → history → commit loop in
293
+ plugin code. Orphaned-stage detection: if `orchestrate` is called
294
+ without `lastResult` while an active stage exists, returns
295
+ `violation`.
296
+ - **Atomic stage tokens.** `foundry_stage_begin(stage, cycle, token)`
297
+ consumes a single-use HMAC-signed token issued by `foundry_sort`;
298
+ `foundry_stage_end(summary)` closes a stage preserving `baseSha`
299
+ for finalize; `foundry_stage_finalize` verifies stage output
300
+ against allowed file patterns and registers matching files as
301
+ draft artefacts, rejecting stray writes with
302
+ `{error: "unexpected_files", files: [...]}`.
303
+ - **`.foundry/` state directory** (gitignored) — holds `.secret`
304
+ (per-worktree HMAC key, mode 0600), `active-stage.json` (present
305
+ only during an active stage), `last-stage.json` (for finalize
306
+ lookup), and `trace/` (dry-run JSONL traces).
307
+
308
+ ### Changed
309
+
310
+ - **`foundry_memory_dump` response wrapped in a JSON envelope.** Now
311
+ returns `{ dump: "<text>" }`, matching every other plugin tool's
312
+ contract. Callers that previously consumed the raw string must
313
+ read `.dump`.
314
+ - **`foundry_git_branch` errors return a JSON envelope.** Failures
315
+ are returned as `{ error: "<message>" }`, giving callers a
316
+ structured alternative to raw `execFileSync` errors.
317
+ - **`cozo-node` is now an optional dependency.** Foundry installs
318
+ without it; the memory subsystem reports
319
+ `"cozo-node is not installed on this platform"` if a memory tool
320
+ is invoked. This unblocks installation on platforms without
321
+ prebuilt cozo binaries.
322
+ - **Test suite split into unit, integration, and e2e tiers.** Run
323
+ individually with `pnpm run test`, `pnpm run test:integration`,
324
+ `pnpm run test:e2e`, or all together with `pnpm run test:all`.
325
+ `pnpm run build:all` chains lint → test:all → build.
326
+ - **`prepublishOnly` runs `build:all`.** Publish is now gated on the
327
+ full quality pipeline, not just `build`.
328
+
329
+ ### Fixed
330
+
331
+ - **Stage-end memory sync failure is a hard flow failure.** When
332
+ `foundry_stage_end` cannot flush the in-memory DB to the NDJSON
333
+ source of truth, WORK.md is marked `status: failed` with the sync
334
+ error as `reason`, and every mutating tool refuses until the cycle
335
+ is abandoned via `foundry_workfile_delete`. Read-only tools and
336
+ the escape hatches (`workfile_delete`, `git_finish`) remain
337
+ callable. Skills driving each stage (`forge`, `quench`, `appraise`,
338
+ `human-appraise`, `orchestrate`, `assay`, `flow`) were updated to
339
+ check for the failed state at the top of their procedure and hand
340
+ control back to the user. Previously, sync failures were silently
341
+ swallowed and the live DB was allowed to drift ahead of on-disk
342
+ NDJSON.
343
+ - **`foundry_orchestrate` catches `requireNotFailed` violations.**
344
+ Moved the failed-flow check inside the wrapper try/catch so a
345
+ malformed-frontmatter `YAMLException` collapses to
346
+ `{action: 'violation'}` instead of an uncaught throw.
347
+ - **Missing artefact-type definitions surface a typed finalize error.**
348
+ The orchestrator's finalize bridge now returns
349
+ `{ok: false, error: "missing_artefact_type: <type> (<reason>)"}`
350
+ when `getArtefactType` fails, preserving the real error and
351
+ avoiding a false `unexpected_files` violation.
352
+ - **Atomic history writes.** `WORK.history.yaml` writes use
353
+ write-temp-then-rename, closing observed incompleteness in the
354
+ wild. Malformed history on read now marks the flow failed via
355
+ `markWorkfileFailed`, allowing graceful recovery rather than
356
+ silent corruption.
357
+ - **Validation results structured per item.** `foundry_validate_run`
358
+ returns `{ ok, validatorsRun, items, errors }` with `items` as
359
+ parsed JSONL entries and `errors` separating parse failures from
360
+ pattern mismatches. Replaces the prior unstructured aggregate.
361
+
362
+ ### Migration
363
+
364
+ Run the `upgrade-foundry` skill from a clean project state. Foundry
365
+ upgrades use a rebuild-style workflow: the skill preserves the
366
+ existing `foundry/` directory, initialises a clean current-version
367
+ configuration, analyses the preserved directory as source material,
368
+ and recreates supported concepts through current tools.
369
+
370
+ The skill asks clarifying questions for ambiguous flow routing, input
371
+ contracts, validation behaviour, memory settings, and deprecated
372
+ concepts. It does not migrate in-flight `WORK.md` state, feedback
373
+ state, branch state, or active flow execution. Complete or discard
374
+ active flows before upgrading.
375
+
376
+ Cycle definitions must rename `output:` to `output-type:`. Artefact-type
377
+ definitions should delete the `output:` line. Projects with a populated
378
+ memory store should `git mv foundry/memory/relations
379
+ foundry-memory/relations` before re-initialising; projects that have
380
+ not yet populated memory can simply re-run `foundry_memory_init` on a
381
+ fresh `config/*` branch. Pre-3.0.0 in-flight feedback in the markdown
382
+ `## Feedback` section is not auto-migrated: finish or discard
383
+ in-flight cycles before upgrading.
384
+
385
+ Projects with populated memory should validate memory before upgrading
386
+ so the preserved source material reflects committed state. The
387
+ recreated current-version config should be validated with the current
388
+ config and memory validation tools before merging the config branch.
389
+
390
+ ### Known issues
391
+
392
+ - **Flow memory backend (`cozo-node`) is unmaintained.** The optional
393
+ flow-memory subsystem persists to `cozo-node`, whose upstream
394
+ packages have not seen a release since December 2023
395
+ (`cozo-node@0.7.6`) and whose Rust core (`cozodb/cozo`) has not
396
+ been pushed to since December 2024. The memory tools continue to
397
+ work and there are no known runtime issues, but `cozo-node@0.7.6`
398
+ transitively depends on `@mapbox/node-pre-gyp@^1`, which surfaces
399
+ six `deprecated subdependency` warnings at install time
400
+ (`are-we-there-yet`, `gauge`, `glob@7`, `inflight`, `npmlog`,
401
+ `rimraf@3`). These warnings are cosmetic: `pnpm audit` reports
402
+ zero vulnerabilities. Foundry will migrate to a maintained graph +
403
+ vector backend in a future release; the memory tool surface
404
+ (`foundry_memory_*`) and the on-disk vocabulary / NDJSON format
405
+ are designed to remain stable across that migration.
406
+
407
+ ## 2.4.2 — 2026-04-23
408
+
409
+ ### Changed
410
+
411
+ - README: new hero-style "Governed work for AI" section before the TOC — names the discipline problem, lists what developers get, speaks to teams under a "structural, not cultural" framing.
412
+ - README: old "Why Foundry?" section removed; the five bullets it contained now live under a renamed "Design principles" section (was "Design decisions"), prefaced with the governing rule (*trust the tool, not the LLM*) and extended with a new principle entry on human-in-the-loop gates.
413
+
414
+ ## 2.4.1 — 2026-04-23
415
+
416
+ ### Fixed
417
+
418
+ - `docs/getting-started.md` install snippet used a `packages` key that doesn't exist in OpenCode's config schema. Corrected to the `plugin: ["@really-knows-ai/foundry"]` form already shown in `README.md`.
419
+
420
+ ## 2.4.0 — 2026-04-23
421
+
422
+ ### Added
423
+
424
+ - **Flow memory** — a typed, graph-shaped knowledge store that persists across cycles. Entity types, edge types, and their prose briefs live in `foundry/memory/`; entity rows and edge rows are committed as NDJSON under `foundry/memory/relations/`; the live Cozo 0.7 database (`foundry/memory/memory.db*`) is gitignored and rebuilt on demand from the NDJSON files. Each cycle declares read/write permissions in its frontmatter (`memory: { read: [...], write: [...] }`); the dispatched stage prompt is augmented with a vocabulary block listing the entity/edge types visible to that cycle and the memory tools available to it.
425
+ - **Optional semantic search.** When `embeddings.enabled` is true in `foundry/memory/config.md`, entities are embedded on write against an OpenAI-compatible endpoint (default: local Ollama `nomic-embed-text`, 768 dims) and exposed via `foundry_memory_search`. Embeddings can be disabled; the graph still works.
426
+ - **20 memory tools** registered by the plugin: `foundry_memory_{put,relate,unrelate,get,list,neighbours,query,search}` for read/write, `foundry_memory_{create,rename,drop}_{entity,edge}_type` for vocabulary management, `foundry_memory_{init,validate,reset,dump,vacuum,change_embedding_model}` for admin. Destructive operations (`drop_*`) take an optional `confirm` — without it they return a preview of affected rows.
427
+ - **9 memory skills**: `init-memory`, `add-memory-entity-type`, `add-memory-edge-type`, `rename-memory-entity-type`, `rename-memory-edge-type`, `drop-memory-entity-type`, `drop-memory-edge-type`, `reset-memory`, `change-embedding-model`. All wrap the deterministic admin tools with the usual conflict-checking, preview-then-confirm, and commit discipline.
428
+ - `docs/memory-maintenance.md` — contributor notes on Cozo 0.7 adaptations (`::compact`, typed `<F32;N>?` vector columns, `?[...] <- [[...]]` put syntax, single-vs-double-quote string literal semantics, `::relations` HNSW filtering) and the session-singleton lifecycle constraint.
429
+
430
+ ### Notes
431
+
432
+ - Memory is strictly opt-in. A project without `foundry/memory/` behaves exactly as before; the prompt-extras injection no-ops, and cycles that don't declare a `memory:` block see no vocabulary and no memory tools in their prompt.
433
+ - On store open, orphan relations left behind by drops/renames are reconciled automatically (`::relations` filtered to `^(ent|edge)_[^:]+$`, HNSW indices dropped before `::remove`).
434
+ - Memory prompt injection is wrapped in a swallow-errors guard: if memory is misconfigured or drifted, dispatch still succeeds with no vocabulary block rather than failing the cycle.
435
+
436
+ ## 2.3.2 — 2026-04-21
437
+
438
+ ### Changed
439
+
440
+ - Config-modifying skills (`add-flow`, `add-cycle`, `add-law`, `add-appraiser`, `add-artefact-type`) now refuse to run on a work branch. They require the current branch to not start with `work/`, directing the user to complete or discard the in-flight flow before changing foundry configuration. Structural changes belong on the base branch, not alongside transient flow state.
441
+
442
+ ### Removed
443
+
444
+ - Historical planning docs (`docs/plans/`, `docs/specs/`, `docs/superpowers/`) and `HARDEN.md`. All described features that shipped in v2.2.0–v2.3.1; git history preserves the full record.
445
+
446
+ ## 2.3.1 — 2026-04-20
447
+
448
+ ### Changed
449
+
450
+ - `flow` skill: any cycle in a flow may now be the starting cycle (previously limited to `starting-cycles`). The list becomes a hint for ambiguous requests. A cycle whose `inputs` contract cannot be satisfied from files on disk is not eligible to start.
451
+ - `flow` skill: between-cycles logic no longer implies any carry-over ceremony. The next cycle's forge discovers the previous cycle's output via filesystem scan against its input types' `file-patterns`.
452
+ - `forge` skill: input discovery now explicitly uses filesystem scan against each input type's `file-patterns`, with the goal guiding which candidates are relevant.
453
+ - `forge` skill: the write invariant is restated accurately — forge may only write to files matching the output artefact type's `file-patterns` (plus the tool-managed files). All other files on disk are read-only. The previous "inputs are read-only" framing was a special case of this rule.
454
+
455
+ ### Notes
456
+
457
+ - No tool, schema, or enforcement changes. Existing flows continue to work. `sort.js`'s `checkModifiedFiles` already enforces the write invariant.
458
+
459
+ ## 2.3.0 — 2026-04-20
460
+
461
+ ### Breaking
462
+
463
+ - **LLM orchestration replaced with deterministic `foundry_orchestrate` tool.** The `cycle` and `sort` skills are removed; replaced by a single thin `orchestrate` skill that drives a 3-line loop.
464
+ - **Six tools deregistered** from the plugin (still exist as internal imports for tests): `foundry_sort`, `foundry_history_append`, `foundry_stage_finalize`, `foundry_git_commit`, `foundry_workfile_configure_from_cycle`, `foundry_workfile_set`.
465
+ - Upgrade requires clean main + no in-flight workfile (see `upgrade-foundry` skill).
466
+
467
+ ### Added
468
+
469
+ - `foundry_orchestrate` — single tool that owns the sort → history → dispatch → finalize → history → commit loop. Atomic stage completion.
470
+ - `scripts/orchestrate.js` — deterministic orchestration logic, composes existing internal functions.
471
+ - Orphaned-stage detection: if orchestrate is called without `lastResult` but an active stage exists, returns `violation`. Fixes the ses_256c failure mode where an LLM skipped the post-dispatch history append and wedged the cycle.
472
+
473
+ ### Fixed
474
+
475
+ - Root cause of all deferred HARDEN.md bugs (B, C, D, E, G) and the ses_256c bug: LLM misfollowing a deterministic protocol. Protocol now lives inside the plugin tool.
476
+
477
+ ### Migration
478
+
479
+ See `skills/upgrade-foundry/SKILL.md` for v2.3.0 pre-flight checks. No automated state migration — complete or discard in-flight cycles on v2.2.x before upgrading.
480
+
481
+ ## 2.2.1 — 2026-04-20
482
+
483
+ Follow-up patch addressing the five bugs deferred from v2.2.0 (see `HARDEN.md` §Deferred).
484
+
485
+ ### Breaking changes
486
+
487
+ - **Cycle-definition deadlock config flattened.** The nested `human-appraise: {enabled, deadlock-threshold}` block is replaced by three flat keys:
488
+ - `human-appraise: <bool>` (default `false`) — include `human-appraise` in the stage loop every iteration
489
+ - `deadlock-appraise: <bool>` (default `true`) — route to `human-appraise` when LLM appraisers deadlock
490
+ - `deadlock-iterations: <number>` (default `5`) — deadlock threshold
491
+ Run the `upgrade-foundry` skill to migrate existing cycle defs — the old nested form is no longer read.
492
+
493
+ ### New
494
+
495
+ - **`foundry_workfile_configure_from_cycle({cycleId, stages})`** — populates WORK.md frontmatter from a cycle definition in one call. Replaces the prior 6–7 sequential `foundry_workfile_set` calls at cycle start. Defaults for `max-iterations`, `human-appraise`, `deadlock-appraise`, `deadlock-iterations`, and `models` now live in plugin code rather than skill prose.
496
+ - **`foundry_artefacts_list({cycle})`** — optional cycle filter. Callers should always pass the current cycle to avoid picking up stale rows from prior aborted sessions.
497
+
498
+ ### Fixed
499
+
500
+ - **Bug B — deadlock routing.** Sort now reads the flat deadlock keys from WORK.md frontmatter and routes to `human-appraise` on deadlock (either an existing `human-appraise:<cycle>` stage in `stages`, or a synthesized one). When `deadlock-appraise: false`, deadlock marks the cycle `blocked`.
501
+ - **Bug C — stale artefact validation.** `quench`, `appraise`, and `human-appraise` skills now pass the current cycle to `foundry_artefacts_list`, scoping validation to artefacts produced by the current cycle.
502
+ - **Bug D — overwriting WORK.md.** The `flow` skill now calls `foundry_workfile_get` before `foundry_workfile_create` and prompts the user to resume, discard, or abort when an existing workfile is detected. Silent overwrite is not offered; resume requires matching `flow` and `cycle`.
503
+ - **Bug E — missing micro-commits.** `foundry_sort` now returns `{route: 'violation'}` when `WORK.md`, `WORK.history.yaml`, or anything under `.foundry/` has uncommitted changes at the start of a sort call and history is non-empty. Structurally enforces the one-commit-per-stage contract that previously lived only in skill prose. First sort of a cycle is exempt (empty history).
504
+ - **Bug G — workfile setup boilerplate.** See `foundry_workfile_configure_from_cycle` above.
505
+
506
+ ### Migration
507
+
508
+ Run the `upgrade-foundry` skill to migrate cycle definitions to the flat deadlock keys (Bug B). No other migration required — WORK.md, `.foundry/`, and feedback state are forward-compatible.
509
+
510
+ ## 2.2.0 — 2026-04-19
511
+
512
+ ### Breaking changes
513
+
514
+ - **`foundry_artefacts_add` removed.** Artefact registration now happens exclusively via `foundry_stage_finalize` after a forge stage closes.
515
+ - **`foundry_artefacts_set_status` no longer accepts `draft`.** Only `done` and `blocked` are valid. New artefacts are registered as `draft` automatically by `stage_finalize`.
516
+ - **Feedback / artefact / workfile mutation tools now enforce stage-lock preconditions.** Tools callable by subagents require an active stage matching their role; tools callable by the orchestrator require no active stage. Out-of-band calls return a structured error.
517
+ - **Feedback state machine strictly enforced.** `approved` is terminal. `quench` cannot approve/reject `wont-fix` items. See `HARDEN.md` §4 for the full matrix.
518
+ - **`foundry_sort` dispatchable routes now return a `token` field.** Subagents must redeem the token via `foundry_stage_begin`; forged or replayed tokens are rejected.
519
+
520
+ ### New
521
+
522
+ - **`foundry_stage_begin(stage, cycle, token)`** — subagents open a work stage by consuming a single-use HMAC-signed token.
523
+ - **`foundry_stage_end(summary)`** — subagents close a stage; preserves `baseSha` for finalize.
524
+ - **`foundry_stage_finalize(cycle)`** — orchestrator verifies stage output against allowed file patterns, registers matching files as draft artefacts, rejects stray writes with `{error: "unexpected_files", files: [...]}`.
525
+ - **`.foundry/` state directory** (gitignored) — holds `.secret` (per-worktree HMAC key, mode 0600), `active-stage.json` (present only during an active stage), `last-stage.json` (for finalize lookup).
526
+
527
+ ### Fixed
528
+
529
+ - Normalized `maxIterations` → `max-iterations` across workfile read/write paths (previously inconsistent between flow and cycle skills, causing latent deadlock-detection issues).
530
+
531
+ ### Migration
532
+
533
+ Upgrade with the `upgrade-foundry` skill. `.foundry/` is created automatically on first plugin boot; `.secret` is generated idempotently. No data migration required — existing `WORK.md` and `foundry/*` configs are compatible.
package/dist/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Really Knows AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.