Add agent workspace

This commit is contained in:
Raven Scott
2026-04-22 02:28:25 -04:00
parent 2cfd2a8ab3
commit 5b12254fe1
62 changed files with 1091 additions and 14 deletions
+1
View File
@@ -438,6 +438,7 @@ Root **`npm run pretest`** is the canonical doc/code gate. Run it before pushing
16. **`scripts/verify-holepunch-clone-freshness.mjs`** — Optional lag gate from **`holepunch-freshness-gate.json`** (**`enabled: false`** by default); strict mode via **`BARE_OS_HOLEPUNCH_FRESHNESS_STRICT=1`**.
17. **`npm run smoke:bare-manifest`** — Manifest import smoke.
18. **`npm run smoke:agent-web-fetch:bare`** (optional) — Runs [`scripts/smoke-agent-web-fetch-bare.mjs`](smoke-agent-web-fetch-bare.mjs) under the **Bare** runtime: exercises **`lib/agent-web-fetch.js`** timeout/abort contract and a live **`https://example.com`** fetch when network is available.
19. **`npm run sample:agent-workspace`** — Runs [`print-agent-workspace-sample.mjs`](print-agent-workspace-sample.mjs): prints a concatenated **agent workspace** system prompt sample from [`packages/bare-os-coreutils/share/agent-workspace/`](../packages/bare-os-coreutils/share/agent-workspace/) (host Node; no booter).
**Commit expectation:** check in every regenerated artifact **`pretest` produces** (kernel init bundle, seeder mirror, generated markdown/JSON, dashboard) in the same change set as the source edit.
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env node
/**
* Print a sample agent workspace system prompt from repo templates (host Node).
* Does not use Hyperdrive — reads packages/bare-os-coreutils/share/agent-workspace/*.md
*
* Usage: node scripts/print-agent-workspace-sample.mjs
*/
import { readFile } from 'node:fs/promises'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = dirname(fileURLToPath(import.meta.url))
const share = join(
root,
'..',
'packages',
'bare-os-coreutils',
'share',
'agent-workspace'
)
const files = [
'SOUL.md',
'AGENTS.md',
'IDENTITY.md',
'USER.md',
'TOOLS.md',
'MEMORY.md',
'BOOTSTRAP.md',
'HEARTBEAT.md',
'PROMPT.md'
]
let out = '# Sample agent workspace (from repo share)\n\n'
for (const name of files) {
try {
const t = (await readFile(join(share, name), 'utf8')).trim()
out += '=== ' + name + ' ===\n' + t + '\n\n'
} catch {
out += '=== ' + name + ' ===\n(File not found)\n\n'
}
}
process.stdout.write(out.slice(0, 6000))
if (out.length > 6000) process.stdout.write('\n… truncated for terminal\n')