@really-knows-ai/foundry 3.2.5 → 3.2.6

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.
@@ -92,9 +92,11 @@ export function listFlows(foundryDir) {
92
92
 
93
93
  function buildFoundryNotInitializedMessage() {
94
94
  return `<FOUNDRY_CONTEXT>
95
- Foundry is installed but not initialised in this project. There is no foundry/ directory.
96
-
97
- To set up Foundry, initialise the project first. Initialisation creates the foundry/ directory structure, installs the user-facing Foundry agent, and generates model-routing stage agents. After initialisation, restart OpenCode and switch to the Foundry agent.
95
+ Foundry is installed but not yet initialised in this project there is no foundry/ directory.
96
+ The plugin will bootstrap the directory structure, generate stage agents, and install the
97
+ Foundry guide agent automatically on the next startup. The user may just need to restart
98
+ OpenCode for this to happen. Once initialised, direct the user to restart again so the new
99
+ agents register, then switch to the Foundry agent.
98
100
  </FOUNDRY_CONTEXT>`;
99
101
  }
100
102
 
@@ -110,8 +112,9 @@ function buildFlowList(flows) {
110
112
 
111
113
  function buildFoundryInitializedMessage(flowList, packageRoot) {
112
114
  return `<FOUNDRY_CONTEXT>
113
- Foundry is active in this project. The foundry/ directory contains the project's artefact definitions,
114
- laws, appraisers, cycles, and flows.
115
+ Foundry is active in this project. The foundry/ directory contains the project's artefact
116
+ definitions, laws, appraisers, cycles, and flows. The user should switch to the Foundry agent
117
+ to author and run workflows.
115
118
 
116
119
  Foundry is a skill-driven framework for governed artefact generation and evaluation.
117
120
  The pipeline: assay (populate memory) → forge (produce) → quench (deterministic checks) → appraise (subjective evaluation) → human-appraise (human review) → iterate.
@@ -142,7 +145,10 @@ Scripts are located at: ${path.join(packageRoot, 'scripts')}
142
145
  export function getBootstrapContent(directory, packageRoot, restartNeeded = false) {
143
146
  if (restartNeeded) {
144
147
  return `<FOUNDRY_CONTEXT>
145
- Foundry initialised. Restart OpenCode so the Foundry agent and model-routing agents register. After restart, switch to the Foundry agent to author and run workflows.
148
+ Foundry has just been initialised in this project. The directory structure, stage agent files,
149
+ and Foundry guide agent have all been created. Tell the user to restart OpenCode now so the new
150
+ agents register. After restarting, the user should switch to the Foundry agent to author and
151
+ run workflows.
146
152
  </FOUNDRY_CONTEXT>`;
147
153
  }
148
154
 
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.2.6] - 2026-05-14
4
+
5
+ ### Fixed
6
+
7
+ - **Bootstrap context messages confused the AI.** The injected `FOUNDRY_CONTEXT`
8
+ messages were written as direct user instructions ("Restart OpenCode..."),
9
+ but the AI reads them as system context and interprets them as commands to
10
+ itself. Rewritten as AI-facing framing: "Tell the user to restart...",
11
+ "The user should switch to the Foundry agent...".
12
+
3
13
  ## [3.2.5] - 2026-05-14
4
14
 
5
15
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@really-knows-ai/foundry",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
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",