@really-knows-ai/foundry 3.5.7 → 3.5.8
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.
|
@@ -36,7 +36,7 @@ import { createMemoryAdminTools } from './foundry-tools/memory-admin-tools.js';
|
|
|
36
36
|
import { createSnapshotTools } from './foundry-tools/snapshot-tools.js';
|
|
37
37
|
import { createAttestationTools } from './foundry-tools/attestation-tools.js';
|
|
38
38
|
import { createRefreshAgentsTool } from './foundry-tools/refresh-agents-tool.js';
|
|
39
|
-
import { resolveGit } from '../../scripts/lib/tool-paths.js';
|
|
39
|
+
import { resolveGit, resolvePnpm } from '../../scripts/lib/tool-paths.js';
|
|
40
40
|
|
|
41
41
|
function findPackageRoot(startDir) {
|
|
42
42
|
let dir = startDir;
|
|
@@ -103,7 +103,17 @@ function initGitRepo(worktree) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
function ensurePackageJson(worktree) {
|
|
107
|
+
if (existsSync(path.join(worktree, 'package.json'))) return;
|
|
108
|
+
try {
|
|
109
|
+
execFileSync(resolvePnpm(), ['init'], { cwd: worktree, stdio: 'pipe' });
|
|
110
|
+
} catch (err) {
|
|
111
|
+
console.error('Foundry pnpm init error:', err.message);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
106
115
|
function runBootstrapSequence(worktree, pkgRoot) {
|
|
116
|
+
ensurePackageJson(worktree);
|
|
107
117
|
bootstrapDirectories(worktree);
|
|
108
118
|
bootstrapGitignore(worktree);
|
|
109
119
|
refreshAgents(worktree);
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.5.8] - 2026-05-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Foundry bootstrap runs `pnpm init` on the project workspace when no `package.json` exists, so validators can install dependencies immediately.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Validator guidance in the add-law skill hardened from "prefer libraries" to "hand-rolled heuristics are a last resort."
|
|
12
|
+
|
|
3
13
|
## [3.5.7] - 2026-05-23
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -18,4 +18,8 @@ function resolveOpenCode() {
|
|
|
18
18
|
return process.env.FOUNDRY_OPENCODE_PATH || resolveFromPath('opencode');
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
function resolvePnpm() {
|
|
22
|
+
return process.env.FOUNDRY_PNPM_PATH || resolveFromPath('pnpm');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { resolveGit, resolveOpenCode, resolvePnpm };
|
|
@@ -66,7 +66,7 @@ Walk the user through which elements of the law can be validated deterministical
|
|
|
66
66
|
>
|
|
67
67
|
> Shall I add validators for the script-checkable elements?
|
|
68
68
|
|
|
69
|
-
For each script-checkable element, write a standalone `.mjs` script next to the artefacts it validates (e.g. `foundry/artefacts/<type>/check-line-count.mjs`) and reference it in the command (e.g. `node foundry/artefacts/<type>/check-line-count.mjs {files}`). Place validators alongside the artefacts so they colocate with what they validate.
|
|
69
|
+
For each script-checkable element, write a standalone `.mjs` script next to the artefacts it validates (e.g. `foundry/artefacts/<type>/check-line-count.mjs`) and reference it in the command (e.g. `node foundry/artefacts/<type>/check-line-count.mjs {files}`). Place validators alongside the artefacts so they colocate with what they validate. Use existing project dependencies and Node.js built‑ins. Hand‑rolled heuristics (custom syllable counters, regex parsers, manual character walks) are a last resort — they produce false positives, waste tokens on debugging, and break on edge cases. Install a library instead. Only write validation logic from scratch when no npm package exists for the task and the heuristic is trivially correct.
|
|
70
70
|
|
|
71
71
|
**Validators**: Ask about `validators` (optional) — offer to create one or skip.
|
|
72
72
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@really-knows-ai/foundry",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.8",
|
|
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",
|