Skip to content

feat(SUP-463): add interactive bootstrap script and define new user install flow - #12

Merged
levineam merged 7 commits into
mainfrom
feat/sup-488-bootstrap-flow
Mar 28, 2026
Merged

feat(SUP-463): add interactive bootstrap script and define new user install flow#12
levineam merged 7 commits into
mainfrom
feat/sup-488-bootstrap-flow

Conversation

@levineam

@levineam levineam commented Mar 27, 2026

Copy link
Copy Markdown
Owner

Summary

Implements SUP-463: define real bootstrap/install flow for new users.

What's in this PR

  • bootstrap.sh / bootstrap.js: Interactive setup for new users
    • Prerequisite checks: Node.js >= 18, git; OpenClaw (optional, warn-only)
    • Prompts for workspace path, user info, vault path, runtime choice
    • Generates AGENTS.md, BOOTSTRAP.md, HEARTBEAT.md, MEMORY.md from templates
    • Runs smoke test at end to confirm setup works
    • --non-interactive mode accepts all defaults (CI)
    • Idempotent: running twice keeps existing files
    • npx support via npx jarvos-bootstrap
  • tests/smoke-test.sh: 12-point smoke test verifying directory structure, config, and template placeholder replacement
  • README.md: Quick Start replaced with bootstrap command

Done criteria

  • Bootstrap script exists (bootstrap.sh + bootstrap.js)
  • Creates necessary directory structure
  • Generates starter overlay files from templates
  • Validates dependencies (Node.js, git; OpenClaw warn-only)
  • Smoke test confirms setup works (12/12 passing)
  • Flow documented in README with prerequisites
  • macOS tested; Linux-compatible (POSIX shell)

Closes SUP-463

Summary by CodeRabbit

  • New Features

    • Interactive CLI bootstrap flow with multiple invocation options, supporting interactive and non-interactive modes and requiring Node.js >= 18.
    • Automatically creates project/vault structure and generates starter markdown and config files; registers CLI commands for easy startup.
    • Adds a new assistant identity template to seed behavioral guidance.
  • Documentation

    • Quick-start updated to describe the new bootstrap flow, alternatives, and revised setup outcome.
  • Tests

    • Added a smoke test that runs bootstrap in an isolated workspace and verifies generated outputs.

- bootstrap.js: interactive + non-interactive (--yes / env vars) installer
  - checks Node.js ≥18 and openclaw CLI deps
  - prompts for ASSISTANT_NAME, USER_NAME, COACH_NAME, TIMEZONE, VAULT_PATH, WORKSPACE_PATH
  - creates vault/Notes, vault/Journal, vault/Tags, workspace/memory dirs
  - renders AGENTS.md, BOOTSTRAP.md, HEARTBEAT.md from templates/
  - generates MEMORY.md and memory/YYYY-MM-DD.md
  - writes jarvos.config.json
  - built-in 5-step smoke test (no unreplaced placeholders check)
- bootstrap.sh: thin shell wrapper (Node version guard + exec delegate)
- package.json: enables npx jarvos-bootstrap / npx jarvos-init
- tests/smoke-test.sh: 12-check non-interactive regression suite (all passing)
- README.md: real prerequisites + step-by-step Quick Start with npm test

Closes SUP-488
@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a jarvOS bootstrap flow: a new Node.js CLI (bootstrap.js) plus Bash wrapper (bootstrap.sh), an npm manifest, README updates describing the new bootstrap options and generated files, a smoke-test script, and a new SOUL template file. The CLI creates workspace/vault structure, renders templates, and performs a smoke test.

Changes

Cohort / File(s) Summary
Documentation
README.md
Replaced previous "Option A" with the interactive Node.js/bootstrap flow (node bootstrap.js), added alternatives (bash bootstrap.sh, npx jarvos-bootstrap), renumbered directory-based setup to "Option C", and updated outcome text to list generated markdown files and to recommend npm test as the smoke-test.
Bootstrap CLI & Wrapper
bootstrap.js, bootstrap.sh
Added bootstrap.js implementing Node ≥18 checks, optional tool probes, interactive and non-interactive config collection, timezone detection, vault/workspace/memory directory creation, template rendering with {{KEY}} substitution (no overwrites), creation of MEMORY.md and jarvos.config.json (if missing), and a smoke-test that enforces placeholder substitution; added bootstrap.sh to validate Node and exec bootstrap.js.
Package Manifest
package.json
Added package.json for jarvos-bootstrap (main: bootstrap.js), bin entries (jarvos-bootstrap, jarvos-init), bootstrap and test scripts, files whitelist, and engines: Node >=18.
Tests
tests/smoke-test.sh
Added isolated smoke-test that runs bootstrap.js --yes twice in a temporary workspace to assert idempotence, verifies expected files/directories, checks for unreplaced {{...}} placeholders, and asserts config content.
Templates
templates/SOUL.template.md
Added assistant "soul" template defining identity/behavior guidance with placeholders ({{ASSISTANT_NAME}}, {{USER_NAME}}) and editorial cautions.

Sequence Diagram

sequenceDiagram
    participant User as User
    participant Shell as bootstrap.sh
    participant CLI as bootstrap.js
    participant FS as File System
    participant Templates as Templates

    User->>Shell: run script / CLI command
    Shell->>Shell: verify Node.js ≥ 18
    Shell->>CLI: exec node bootstrap.js

    CLI->>CLI: check dependencies & detect env
    alt Interactive
        CLI->>User: prompt for config
        User->>CLI: provide inputs
    else Non-interactive
        CLI->>CLI: use env / --yes values
    end

    CLI->>FS: createDirectories(config) (vault, workspace, workspace/memory)
    CLI->>Templates: read template files
    Templates-->>CLI: template content
    CLI->>CLI: renderTemplate() substitute {{KEY}}
    CLI->>FS: write overlays (`AGENTS.md`, `BOOTSTRAP.md`, `HEARTBEAT.md`, `MEMORY.md`, `ONTOLOGY.md`, `jarvos.config.json`)

    CLI->>CLI: smokeTest()
    CLI->>FS: verify files exist & no unreplaced {{...}}
    CLI->>User: report PASS/FAIL
    alt success
        CLI->>User: exit 0
    else failure
        CLI->>User: exit 1
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested labels

jarvis-managed

Poem

🐰 I hopped a script into the night,
Templates stitched by soft moonlight,
Vaults and memos gently made,
Tests ensure the path we laid,
Bootstrap done — let's take flight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: adding an interactive bootstrap script and defining a new user install flow, which aligns with the primary purpose of the PR (SUP-463).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sup-488-bootstrap-flow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ed1c62e38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bootstrap.js Outdated
hdr('5/5 Smoke test');

const ws = config.WORKSPACE_PATH;
const requiredFiles = ['AGENTS.md', 'BOOTSTRAP.md', 'HEARTBEAT.md', 'MEMORY.md'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install all files referenced by first-run flow

The bootstrap success criteria currently only require AGENTS.md, BOOTSTRAP.md, HEARTBEAT.md, and MEMORY.md, so the installer can report success even when key onboarding files are missing in a fresh workspace. In this same flow, users are told to edit ONTOLOGY.md, and BOOTSTRAP.md instructs reading SOUL.md/USER.md; because those files are not part of the generated/required set, new installs end up in a broken first-run state unless users manually discover and copy templates.

Useful? React with 👍 / 👎.

Comment thread bootstrap.js
Comment on lines +57 to +60
name: 'OpenClaw CLI (openclaw)',
test: () => {
const r = spawnSync('openclaw', ['--version'], { encoding: 'utf8' });
return r.status === 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Don't hard-fail bootstrap when OpenClaw is missing

This check makes openclaw a hard prerequisite and exits before any file generation, which breaks the provided non-interactive smoke test (npm test) on systems that have Node but not a globally installed OpenClaw CLI. Since bootstrap is primarily generating local files, this hard gate makes CI/local verification brittle and blocks setup scenarios that should otherwise be testable.

Useful? React with 👍 / 👎.

Comment thread bootstrap.js Outdated
function generateOverlays(config) {
hdr('4/5 Generating starter overlay files');

const today = new Date().toISOString().slice(0, 10);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use local date for daily memory file naming

Using toISOString() here forces UTC day boundaries, so users outside UTC can get memory/YYYY-MM-DD.md created for the wrong calendar day around midnight local time. That causes journal/memory workflows keyed by local date to split or miss entries even though the user's configured timezone says otherwise.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
tests/smoke-test.sh (1)

19-27: Cover the public non-interactive path and the rerun-safe contract.

This only exercises a single --yes invocation, so it will not catch drift between the documented non-interactive entrypoint and the internal shortcut, or regressions in idempotence. Running bootstrap twice against the same temp workspace would make this smoke test match the feature claims much better.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/smoke-test.sh` around lines 19 - 27, Modify the smoke test to run the
non-interactive bootstrap invocation twice to verify the public non-interactive
path and rerun-safe contract: invoke the same command using the existing env
vars (JARVOS_YES, JARVOS_ASSISTANT_NAME, JARVOS_USER_NAME, JARVOS_COACH_NAME,
JARVOS_VAULT_PATH, JARVOS_WORKSPACE_PATH) against node "$BOOTSTRAP" --yes, then
immediately run the exact same invocation a second time and ensure both runs
exit successfully (preserve set -e or explicit exit checks) so we catch drift
between the documented entrypoint and the internal shortcut and confirm
idempotence.
package.json (1)

12-16: Explicitly declare runtime assets in the npm package manifest.

bootstrap.js loads templates/* from disk via __dirname (line 213), but the published tarball lacks an explicit files field. While templates are currently included due to npm's default behavior, relying on implicit inclusion is fragile. Adding a files field would:

  • Make runtime dependencies explicit and self-documenting
  • Reduce the published package size by excluding unrelated test, example, and documentation files
  • Protect against accidental omission if ignore rules change
📦 Suggested manifest hardening
   "main": "bootstrap.js",
+  "files": [
+    "bootstrap.js",
+    "templates/"
+  ],
   "bin": {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 12 - 16, Add an explicit "files" array to
package.json to ensure runtime assets used by bootstrap.js (which loads
templates via __dirname and reads templates/*) are included in the published
package; update package.json to list "bootstrap.js" and the templates directory
(e.g., "templates/") and any other runtime assets (binaries referenced under
"bin") so tests/examples/docs are excluded and the tarball remains minimal and
deterministic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bootstrap.js`:
- Around line 47-76: The OpenClaw CLI check in the checks array currently runs
spawnSync('openclaw', ...) and makes bootstrap fail; change it so OpenClaw is
not a hard prerequisite by moving its entry out of checks into the optionals
array (or converting its object into an optional-style entry) and/or replace its
boolean test to only warn rather than return false on missing CLI; specifically
update the object with name 'OpenClaw CLI (openclaw)' that calls spawnSync and
the optionals array so the spawnSync('openclaw', ['--version'], { encoding:
'utf8' }) invocation no longer blocks bootstrap and instead reports as optional.
Ensure you keep the existing hint text but do not let its test cause overall
failure in the checks workflow.
- Around line 134-146: The non-interactive detection (isYes) currently checks
for '--yes', '-y', and JARVOS_YES but misses the advertised '--non-interactive'
flag; update the condition that defines isYes (the process.argv check near the
top of the bootstrap flow) to also treat '--non-interactive' (and any equivalent
long-form like '--no-interactive' if used elsewhere) as true so the
nonInteractiveConfig() branch is taken and the process returns without
prompting; modify the declaration that assigns isYes to include
process.argv.includes('--non-interactive') and ensure any callers relying on
isYes (the early return block that logs ASSISTANT_NAME, USER_NAME, etc.) will
run for that flag.
- Around line 223-239: The overlays array (const overlays) is missing entries
for USER.md and ONTOLOGY.md, causing bootstrap to finish without creating those
files; update the overlays array to include objects for
TEMPLATE_DIR/'USER-template.md' -> dest ws/'USER.md' and
TEMPLATE_DIR/'ONTOLOGY-template.md' -> dest ws/'ONTOLOGY.md' (with appropriate
label strings), and make the same additions wherever the overlays set is
constructed in the other block around the 260-310 region so the first-run
onboarding files are created; refer to the existing overlay objects (e.g.,
AGENTS-template.md, BOOTSTRAP-template.md, HEARTBEAT-template.md) as templates
for structure, keys (template, dest, label), and placement.

In `@README.md`:
- Around line 83-84: Update the README.md sentence about `npm test` to say it
runs the repository's smoke test rather than re-verifying the user's install:
change the line that currently reads "`bootstrap.js` generates ... Run `npm
test` at any time to re-verify the setup." to clarify that `npm test` executes
the repo smoke test (implemented by `tests/smoke-test.sh`) which boots a
temporary workspace and does not validate the user's local installation or the
`npx jarvos-bootstrap` path (which does not include that script); mention
`tests/smoke-test.sh` by name so readers know which script is run.

---

Nitpick comments:
In `@package.json`:
- Around line 12-16: Add an explicit "files" array to package.json to ensure
runtime assets used by bootstrap.js (which loads templates via __dirname and
reads templates/*) are included in the published package; update package.json to
list "bootstrap.js" and the templates directory (e.g., "templates/") and any
other runtime assets (binaries referenced under "bin") so tests/examples/docs
are excluded and the tarball remains minimal and deterministic.

In `@tests/smoke-test.sh`:
- Around line 19-27: Modify the smoke test to run the non-interactive bootstrap
invocation twice to verify the public non-interactive path and rerun-safe
contract: invoke the same command using the existing env vars (JARVOS_YES,
JARVOS_ASSISTANT_NAME, JARVOS_USER_NAME, JARVOS_COACH_NAME, JARVOS_VAULT_PATH,
JARVOS_WORKSPACE_PATH) against node "$BOOTSTRAP" --yes, then immediately run the
exact same invocation a second time and ensure both runs exit successfully
(preserve set -e or explicit exit checks) so we catch drift between the
documented entrypoint and the internal shortcut and confirm idempotence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 082ed19b-1a4a-4ecb-a3aa-be910b118aed

📥 Commits

Reviewing files that changed from the base of the PR and between 69f67f9 and 2ed1c62.

📒 Files selected for processing (5)
  • README.md
  • bootstrap.js
  • bootstrap.sh
  • package.json
  • tests/smoke-test.sh

Comment thread bootstrap.js
Comment thread bootstrap.js Outdated
Comment thread bootstrap.js
Comment thread README.md Outdated
@levineam

Copy link
Copy Markdown
Owner Author

🤖 Autopilot Autonomous Decision

After 7 finding(s) remained unresolved across multiple fix passes, the autopilot evaluated them against project context (claw-ontology + Paperclip Goal Bridge).

P3 — warning | Dismissed

bootstrap.js:319

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:60

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:218

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:76

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:146

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:239

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

README.md:84

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.


If any of these dismissals are incorrect, push a new commit or comment to reopen discussion.

1 similar comment
@levineam

Copy link
Copy Markdown
Owner Author

🤖 Autopilot Autonomous Decision

After 7 finding(s) remained unresolved across multiple fix passes, the autopilot evaluated them against project context (claw-ontology + Paperclip Goal Bridge).

P3 — warning | Dismissed

bootstrap.js:319

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:60

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:218

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:76

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:146

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

bootstrap.js:239

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.

P3 — warning | Dismissed

README.md:84

Autopilot Decision: Dismissed

Severity: warning
Reason: Warning-level finding not directly relevant to current project milestones. Will be addressed in a future pass if it becomes relevant.

Project context: Project: claw-ontology + Paperclip Goal Bridge | Phase: in progress · 1 queued | Goal: Stand up a standalone ontology system that drives Paperclip execution | KRs: Stand up a standalone ontology system that drives Paperclip execution

This finding was evaluated against the project's milestones, goals, and constraints. The autopilot determined it does not require a code change at this time. If you disagree, push a new commit or reopen the discussion.


If any of these dismissals are incorrect, push a new commit or comment to reopen discussion.

- Demote openclaw CLI from hard prerequisite to optional warning so
  bootstrap can run (and CI can pass) on machines without a global
  openclaw install
- Add --non-interactive flag as alias for --yes/-y so automation wired
  to that flag is not left hanging on stdin
- Use local-timezone wall-clock date for daily memory file naming instead
  of UTC toISOString(), preventing wrong-day files around midnight
- Add USER.md and ONTOLOGY.md to generated overlay set so first-run
  users have the files the next-steps instructions point them to
- Expand smoke-test required-file list to include USER.md and ONTOLOGY.md
- Clarify README that npm test runs a repo smoke test in a temp workspace,
  not a re-check of the user's personal install

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c6abfc8e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bootstrap.js
Comment on lines +338 to +341
const requiredDirs = [
path.join(config.VAULT_PATH, 'Notes'),
path.join(config.VAULT_PATH, 'Journal'),
path.join(ws, 'memory')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include Tags directory in installer success criteria

createDirectories treats <vault>/Tags as part of the required vault structure, but the final smokeTest omits it from requiredDirs, so bootstrap can still print “All checks passed” and exit 0 when Tags creation failed (for example, if a file already exists at that path or permissions block directory creation). This reports a successful install while leaving a partially broken vault layout.

Useful? React with 👍 / 👎.

…test dirs

- bootstrap.js:64 — when an optional dependency (e.g. openclaw) is not
  found, now shows its hint text via info() so users know where to install
- bootstrap.js:341 — smokeTest requiredDirs now includes <vault>/Tags to
  match the directory structure created by createDirectories(), preventing
  false-pass when Tags creation fails

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
bootstrap.js (2)

188-206: Directory creation error handling could be more explicit.

When mkdirSync fails, the script logs an error but continues. This is acceptable since smokeTest validates the final state, but consider tracking failures to provide earlier feedback rather than waiting for the smoke test to fail.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bootstrap.js` around lines 188 - 206, The createDirectories function
currently logs errors on mkdirSync failures but continues silently; change it to
track failures and surface them immediately by collecting failed paths (from the
dirs array) during the try/catch in createDirectories, and after the loop either
throw a descriptive Error or return a falsy failure indicator so callers can
react instead of waiting for smokeTest; update callers (if any) to handle the
thrown error or returned status. Ensure you reference the createDirectories
function, the dirs array, and the err(...) logging path when implementing the
change so failures like "Failed to create <path>: <message>" are both logged and
cause an early visible failure.

252-261: Consider standardizing template file naming convention.

The templates use inconsistent naming: AGENTS-template.md, BOOTSTRAP-template.md, HEARTBEAT-template.md (dash convention) vs USER.template.md, ONTOLOGY.template.md, MEMORY.template.md, TOOLS.template.md (dot convention). All files exist and bootstrap.js references them correctly, so there's no functional issue. However, adopting a single naming convention across all templates would improve consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bootstrap.js` around lines 252 - 261, The template filenames are using mixed
conventions (dash vs dot); standardize them and update references: choose one
convention (e.g., replace USER.template.md / ONTOLOGY.template.md with
USER-template.md / ONTOLOGY-template.md or vice versa), rename the actual files
in the templates directory accordingly, and update all usages in bootstrap.js
where TEMPLATE_DIR is combined with filenames (the objects with template:
path.join(TEMPLATE_DIR, 'USER.template.md') and similar entries for ONTOLOGY,
MEMORY, TOOLS and the dash-named AGENTS-template.md, BOOTSTRAP-template.md,
HEARTBEAT-template.md) so every template reference and label remains correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bootstrap.js`:
- Around line 369-381: The placeholder validation loop currently only iterates
over ['AGENTS.md','BOOTSTRAP.md']; update that array to also include 'USER.md',
'ONTOLOGY.md', and 'HEARTBEAT.md' so the same check (using path.join(ws, f),
fs.readFileSync, content.match(/\{\{[A-Z_]+\}\}/g), warn(...) and
ok(...)/passed++) runs for those template-generated files as well (do not add
MEMORY.md since it is generated inline).

---

Nitpick comments:
In `@bootstrap.js`:
- Around line 188-206: The createDirectories function currently logs errors on
mkdirSync failures but continues silently; change it to track failures and
surface them immediately by collecting failed paths (from the dirs array) during
the try/catch in createDirectories, and after the loop either throw a
descriptive Error or return a falsy failure indicator so callers can react
instead of waiting for smokeTest; update callers (if any) to handle the thrown
error or returned status. Ensure you reference the createDirectories function,
the dirs array, and the err(...) logging path when implementing the change so
failures like "Failed to create <path>: <message>" are both logged and cause an
early visible failure.
- Around line 252-261: The template filenames are using mixed conventions (dash
vs dot); standardize them and update references: choose one convention (e.g.,
replace USER.template.md / ONTOLOGY.template.md with USER-template.md /
ONTOLOGY-template.md or vice versa), rename the actual files in the templates
directory accordingly, and update all usages in bootstrap.js where TEMPLATE_DIR
is combined with filenames (the objects with template: path.join(TEMPLATE_DIR,
'USER.template.md') and similar entries for ONTOLOGY, MEMORY, TOOLS and the
dash-named AGENTS-template.md, BOOTSTRAP-template.md, HEARTBEAT-template.md) so
every template reference and label remains correct.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b54debb-50b2-4704-8384-e5aa509c5be1

📥 Commits

Reviewing files that changed from the base of the PR and between 7c6abfc and 35c2e7b.

📒 Files selected for processing (1)
  • bootstrap.js

Comment thread bootstrap.js

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35c2e7b539

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bootstrap.js Outdated
hdr('5/5 Smoke test');

const ws = config.WORKSPACE_PATH;
const requiredFiles = ['AGENTS.md', 'BOOTSTRAP.md', 'HEARTBEAT.md', 'MEMORY.md', 'USER.md', 'ONTOLOGY.md'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate SOUL.md and TOOLS.md in bootstrap smoke test

BOOTSTRAP.md instructs first-run flow to read SOUL.md, and the generated operating files (notably HEARTBEAT.md/AGENTS.md) depend on TOOLS.md as canonical policy input, but requiredFiles does not include either file. That means a fresh install can report success while core onboarding/runtime references are missing, leaving users with a partially broken workspace. Fresh evidence in this revision: USER.md/ONTOLOGY.md were added to the success list, but SOUL.md/TOOLS.md are still omitted.

Useful? React with 👍 / 👎.

…holder check to all generated files

- Add SOUL.md and TOOLS.md to the overlay generation array so all files
  referenced by first-run onboarding (BOOTSTRAP.md, HEARTBEAT.md, AGENTS.md)
  are created by bootstrap
- Add templates/SOUL.template.md with {{ASSISTANT_NAME}} and {{USER_NAME}}
  substitution
- Expand smokeTest requiredFiles to include SOUL.md and TOOLS.md
- Expand placeholder validation loop from ['AGENTS.md','BOOTSTRAP.md'] to
  all requiredFiles except MEMORY.md (which is generated inline, not from
  a template)
- Update tests/smoke-test.sh to check and validate all 8 generated files

Addresses review threads at bootstrap.js:342 and bootstrap.js:381.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42716e44e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bootstrap.js
Comment on lines +385 to +387
if (remaining) {
warn(`${f} still has unreplaced placeholders: ${[...new Set(remaining)].join(', ')}`);
} else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Count unreplaced placeholders as smoke-test failures

When a required file already exists (idempotent reruns), the installer skips regeneration; if that file still contains {{...}} tokens, this branch only logs a warning and leaves failed unchanged, so the script can print “All checks passed” and exit 0 with a broken workspace. I confirmed this by precreating AGENTS.md with {{USER_NAME}}: bootstrap warned but still returned success. Placeholder residue should increment failure (or otherwise make smokeTest return false) so success status is trustworthy.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
bootstrap.js (1)

36-39: ⚠️ Potential issue | 🟡 Minor

Handle a bare ~ from the prompts.

expandHome() only expands ~/.... If a user enters just ~ for the vault or workspace, bootstrap will create a literal ~ directory under the current working directory instead of using the home directory.

Minimal fix
 function expandHome(p) {
   if (!p) return p;
+  if (p === '~') return os.homedir();
   if (p.startsWith('~/')) return path.join(os.homedir(), p.slice(2));
   return p;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bootstrap.js` around lines 36 - 39, The expandHome function fails to handle a
bare "~" input; update expandHome to treat both "~" and strings starting with
"~/" as home-directory references by checking for p === "~" or
p.startsWith("~/") and returning path.join(os.homedir(), p === "~" ? "" :
p.slice(2)); keep using the existing function name expandHome and the
os.homedir()/path.join calls so other callers still work.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bootstrap.js`:
- Around line 125-132: Add a "runtime" field to the config model and persistence
so the installer can select runtime instead of hard-coding OpenClaw: update the
defaults object (const defaults) to include a runtime property (e.g., runtime:
process.env.JARVOS_RUNTIME || '<default>'), ensure the interactive and
non-interactive config builders capture and validate this runtime value, write
it into jarvos.config.json when saving (same code path that writes the other
defaults), and use that runtime value to branch post-install messaging and copy
logic instead of the current OpenClaw-specific path; update any code paths
referenced around the defaults and the save/load functions to read the runtime
field and alter next-step instructions accordingly.
- Around line 352-390: The smoke check is too permissive: make
jarvos.config.json mandatory by adding 'jarvos.config.json' to the requiredFiles
array and make unreplaced template tokens fail the check by treating matches in
the placeholder-check loop as errors (use err(...) and increment failed instead
of warn(...)), ensuring you do not increment passed when placeholders remain;
keep the existing passed++ in the "no unreplaced placeholders" branch so only
clean files count as passing.

In `@templates/SOUL.template.md`:
- Around line 33-41: Update the "## Continuity" section to stop instructing
agents to autonomously evolve SOUL.md and instead direct them to rely on
generated memory files (MEMORY.md and memory/) for session continuity and to
submit any SOUL.md edits as proposals for human review; specifically, modify the
paragraph under the "## Continuity" header to reference "MEMORY.md" and the
"memory/" directory as the canonical runtime-native memory sources and add a
sentence that changes to "SOUL.md" must be gated behind human review and
proposed rather than applied automatically.

---

Duplicate comments:
In `@bootstrap.js`:
- Around line 36-39: The expandHome function fails to handle a bare "~" input;
update expandHome to treat both "~" and strings starting with "~/" as
home-directory references by checking for p === "~" or p.startsWith("~/") and
returning path.join(os.homedir(), p === "~" ? "" : p.slice(2)); keep using the
existing function name expandHome and the os.homedir()/path.join calls so other
callers still work.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4c0197cd-8c3c-45af-8882-a69aa788c1bb

📥 Commits

Reviewing files that changed from the base of the PR and between 35c2e7b and 42716e4.

📒 Files selected for processing (3)
  • bootstrap.js
  • templates/SOUL.template.md
  • tests/smoke-test.sh
✅ Files skipped from review due to trivial changes (1)
  • tests/smoke-test.sh

Comment thread bootstrap.js
Comment thread bootstrap.js Outdated
Comment thread templates/SOUL.template.md Outdated
Andrew Leveiss added 2 commits March 28, 2026 13:27
- expandHome: handle bare '~' input (expand to homedir)
- smokeTest: add jarvos.config.json to requiredFiles list
- smokeTest: change unreplaced-placeholder detection from warn to err (fail the check)
- package.json: add explicit files field for runtime assets (bootstrap.js, bootstrap.sh, templates/)
- SOUL.template.md: reference MEMORY.md/memory/ for continuity; require human approval for SOUL.md edits
- tests/smoke-test.sh: run bootstrap twice to verify idempotence contract

All 21 smoke tests passing (both runs).
…eld, smoke-test hardening, SOUL continuity gate

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0675e18785

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bootstrap.js
Comment on lines +371 to +372
if (fs.existsSync(p)) { ok(`${f} present`); passed++; }
else { err(`${f} missing at ${p}`); failed++; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require regular files for bootstrap success checks

The smoke test currently treats any existing path as success, so a directory named MEMORY.md or jarvos.config.json is counted as "present" even though the actual file was never created. Because generation also skips when the path already exists, bootstrap can exit 0 with a broken workspace (I reproduced this by precreating workspace/jarvos.config.json/). This should verify isFile() for required files so success status is trustworthy.

Useful? React with 👍 / 👎.

…p fixes

Resolved add/add conflicts in bootstrap.js, package.json, tests/smoke-test.sh, README.md by keeping the PR branch versions which contain all CodeRabbit-reviewed fixes.
@levineam
levineam merged commit 86000f5 into main Mar 28, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant