@really-knows-ai/foundry 3.3.6 → 3.3.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.
|
@@ -169,3 +169,37 @@ export function writeFoundryGuideAgent(worktree, packageRoot) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
function resolveSkillsSource(packageRoot) {
|
|
173
|
+
const distSkillsDir = path.join(packageRoot, 'dist', 'skills');
|
|
174
|
+
if (existsSync(distSkillsDir)) return distSkillsDir;
|
|
175
|
+
const srcSkillsDir = path.join(packageRoot, 'src', 'skills');
|
|
176
|
+
if (existsSync(srcSkillsDir)) return srcSkillsDir;
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function copySkillFile(worktree, name, sourcePath) {
|
|
181
|
+
const targetDir = path.join(worktree, '.opencode', 'skills', name);
|
|
182
|
+
mkdirSync(targetDir, { recursive: true });
|
|
183
|
+
writeFileSync(path.join(targetDir, 'SKILL.md'), readFileSync(sourcePath, 'utf8'));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function writeFoundrySkills(worktree, packageRoot) {
|
|
187
|
+
const sourceDir = resolveSkillsSource(packageRoot);
|
|
188
|
+
if (!sourceDir) {
|
|
189
|
+
return { ok: false, error: 'Skills directory not found in dist/skills or src/skills' };
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const skillDirs = readdirSync(sourceDir, { withFileTypes: true })
|
|
193
|
+
.filter(e => e.isDirectory());
|
|
194
|
+
|
|
195
|
+
let count = 0;
|
|
196
|
+
for (const dir of skillDirs) {
|
|
197
|
+
const sourceSkill = path.join(sourceDir, dir.name, 'SKILL.md');
|
|
198
|
+
if (!existsSync(sourceSkill)) continue;
|
|
199
|
+
copySkillFile(worktree, dir.name, sourceSkill);
|
|
200
|
+
count++;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return { ok: true, count };
|
|
204
|
+
}
|
|
205
|
+
|
|
@@ -17,7 +17,7 @@ import { execFileSync } from 'child_process';
|
|
|
17
17
|
import { tool } from '@opencode-ai/plugin';
|
|
18
18
|
import { createPendingStore } from '../../scripts/lib/pending.js';
|
|
19
19
|
import { getBootstrapContent } from './foundry-tools/helpers.js';
|
|
20
|
-
import { refreshAgents, detectChanges, writeFoundryGuideAgent } from './foundry-tools/agent-refresh.js';
|
|
20
|
+
import { refreshAgents, detectChanges, writeFoundryGuideAgent, writeFoundrySkills } from './foundry-tools/agent-refresh.js';
|
|
21
21
|
import { createHistoryTools } from './foundry-tools/history-tools.js';
|
|
22
22
|
import { createStageTools } from './foundry-tools/stage-tools.js';
|
|
23
23
|
import { createWorkfileTools } from './foundry-tools/workfile-tools.js';
|
|
@@ -108,6 +108,7 @@ function runBootstrapSequence(worktree, pkgRoot) {
|
|
|
108
108
|
bootstrapGitignore(worktree);
|
|
109
109
|
refreshAgents(worktree);
|
|
110
110
|
writeFoundryGuideAgent(worktree, pkgRoot);
|
|
111
|
+
writeFoundrySkills(worktree, pkgRoot);
|
|
111
112
|
const pkg = JSON.parse(readFileSync(path.join(pkgRoot, 'package.json'), 'utf8'));
|
|
112
113
|
writeFileSync(path.join(worktree, 'foundry', 'VERSION'), pkg.version, 'utf8');
|
|
113
114
|
initGitRepo(worktree);
|
|
@@ -218,8 +219,9 @@ export const FoundryPlugin = async ({ directory }) => {
|
|
|
218
219
|
config.skills.paths.push(allSkillsDir);
|
|
219
220
|
}
|
|
220
221
|
|
|
221
|
-
// Always ensure guide agent
|
|
222
|
+
// Always ensure guide agent and skills are up to date
|
|
222
223
|
ensureGuideAgent(directory, packageRoot);
|
|
224
|
+
writeFoundrySkills(directory, packageRoot);
|
|
223
225
|
|
|
224
226
|
restartNeeded = runPluginBootstrap(directory, packageRoot);
|
|
225
227
|
},
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.3.7] - 2026-05-18
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Skills table in agent + file copying.** The Foundry agent lists all 27
|
|
8
|
+
skills in an "Available Skills" table. The plugin also copies them to
|
|
9
|
+
`.opencode/skills/` on every startup, making them loadable via the
|
|
10
|
+
`skill` tool. Both pieces together ensure the LLM knows about the skills
|
|
11
|
+
AND can load them.
|
|
12
|
+
|
|
3
13
|
## [3.3.6] - 2026-05-18
|
|
4
14
|
|
|
5
15
|
### Fixed
|
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.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",
|