npm.io
1.97.1 • Published 27m agoCLI

create-principles-disciple

Licence
MIT
Version
1.97.1
Deps
8
Size
23.5 MB
Vulns
0
Weekly
1.2K

create-principles-disciple

MVP-First Prerequisite Installer for Principles Disciple.

What This Installer Delivers

Component Status Description
Runtime integration Installed & verified OpenClaw plugin with MVP activation channels
Operator CLI (pd) Installed & verified Command-line tool for diagnostics and demo
Review console Installed & configured Local web UI for principle review (loopback only)

MVP Activation Channels

Three MVP-Core channels are always enabled and cannot be disabled:

  • prompt — soft principle injection
  • code_tool_hook — RuleHost hard enforcement
  • defer_archive — graceful deferral

Quiet and gone capabilities (gfi, nocturnal, idle_trigger) are not surfaced to users.

Usage

Interactive
npx create-principles-disciple
Non-interactive / JSON
npx create-principles-disciple --yes --workspace "/path/to/workspace" --json

--json implies non-interactive. Output is exactly one parseable JSON object on stdout.

Options

--lang <en|zh>          Language preference (default: zh)
--force                 Force overwrite existing installation
--smart                 Smart merge mode (generate .update files)
--yes                   Non-interactive mode with defaults
--non-interactive       Skip prompts
--workspace <path>      Workspace directory
--json                  Output result as JSON (implies non-interactive)

Post-Install Verification

The installer automatically verifies the installation during setup:

  1. Feature flags.pd/feature-flags.yaml is generated and validated
  2. Story A demopd demo story-a is executed to confirm runtime integration
  3. Console health/api/health is checked on the local console instance

After a successful install, you can re-verify at any time:

pd runtime canary --workspace "<path>" --json

Console

The installer delivers a local pd-console web UI for principle review.

Starting the Console
pd console --workspace "/path/to/workspace" --no-auth

The console listens on 127.0.0.1 only (loopback) — it is not accessible from other machines on the network. When using --no-auth, loopback binding is enforced; the server will refuse to start if --no-auth is combined with a non-loopback host.

Open http://127.0.0.1:3100 in your browser to access the console.

Console Security
  • Default binding: 127.0.0.1 (loopback only)
  • --no-auth is only permitted with loopback binding
  • For network access, use --host <ip> with --token <secret> or set PD_CONSOLE_TOKEN environment variable

Rerun / Reinstall

Re-running the installer updates the feature-flags.yaml. All three MVP-Core channels are always enabled — the installer does not allow partial disabling of core channels. The installer reads actual enabled channels from disk and reports them in the output.

Update Failure Recovery

If an update fails, the installer automatically restores the previous working installation from backup. No manual recovery steps are needed.

If the installer cannot restore the backup (rare), re-run the installer with --force.

Updating

PD supports updating through the Web UI:

  1. Open PD Console (http://localhost:3100)
  2. Navigate to Settings → Update
  3. Check for updates and review version info
  4. Click "Update Now" to apply
Update Options
  • Merge Strategy: How to handle workspace file changes
    • smart: Generate .update files for manual merge
    • overwrite: Force overwrite workspace files
    • keep: Keep existing workspace files unchanged
  • Backup: Create backup before update (recommended for rollback support)
API Endpoints
  • GET /api/update/check — Check for available updates
  • POST /api/update/apply — Apply an update
  • GET /api/update/status — Get current update status
  • POST /api/update/rollback — Rollback to previous version

Commands

  • install — Install PD (default command)
  • uninstall — Remove PD (preserves user data)
  • status — Show installation status

Requirements

  • Node.js >= 18.0.0

License

MIT

Keywords