@mkterswingman/5mghost-insider
v0.0.4
Published
`5mghost-insider` is a Bun-first, Node-compatible CLI that keeps project context ready for AI without forcing users to restate project background in every session.
Readme
5mghost-insider
5mghost-insider is a Bun-first, Node-compatible CLI that keeps project context ready for AI without forcing users to restate project background in every session.
The product value is not “mirror every iWiki doc locally”. The value is: users select a project, and the correct machine-ready context is already injected into CLAUDE.md, AGENTS.md, and .workbuddy/memory/MEMORY.md.
Install And Verify
bun install
bun run build
bun test
bun run smoke
bun run smoke:packThe compiled CLI entry is dist/cli.js, and the package bin name is 5mghost-insider.
Public Package
The npm package is published as:
@mkterswingman/5mghost-insiderPublic install:
npm install -g @mkterswingman/5mghost-insiderHosted Bun-first install:
curl -fsSL https://mkterswingman.com/install/5mghost-insider.sh | IWIKI_TOKEN=... bash -s -- --sync-root ~/KnowledgeHosted PowerShell install:
$env:IWIKI_TOKEN = "..."
& ([scriptblock]::Create((Invoke-RestMethod https://mkterswingman.com/install/5mghost-insider.ps1))) --sync-root "$HOME\\Knowledge"If the user is non-technical, a better onboarding path is:
curl -fsSL https://mkterswingman.com/install/5mghost-insider.sh | bashThat no-argument hosted installer installs the CLI and attempts to install the single bundled use-5mghost-insider skill for detected AI clients.
Then let the AI use the bundled use-5mghost-insider skill to guide the rest of setup. If the skill ever needs repair, rerun:
5mghost-insider install-skillsThe published package keeps Bun as its runtime. During npm install, it can bootstrap Bun automatically, register the Bun PATH block, and verify the provisioned Bun runtime before exposing the CLI launcher.
The hosted installers are thin wrappers over the real CLI. If you omit --sync-root, the script installs the package and then prints the exact follow-up 5mghost-insider install ... command instead of pretending setup is complete.
Command Surface
5mghost-insider install --sync-root /path/to/knowledge
5mghost-insider preview-index
5mghost-insider validate-index
5mghost-insider list-projects
5mghost-insider sync
5mghost-insider status
5mghost-insider projects add aoem
5mghost-insider projects remove aoem
5mghost-insider projects list
5mghost-insider install-skills
5mghost-insider uninstallProduct Model
Human truth source
- Humans edit
raw briefonly. compiled briefand the center index are published artifacts.
Published contract
- The center index is the only semantic source map.
- Each source entry uses only:
nameurlcheck_when
- The first source must be explicitly named
Raw brief.
Local materialization
Sync no longer mirrors every supporting doc locally. Instead it materializes:
CLAUDE.mdAGENTS.md.workbuddy/memory/MEMORY.mdraw-brief.md.ai-knowledge/sync-state.json.ai-knowledge/sync-status.json
Supporting docs stay remote and are fetched on demand with iwiki-cli get <docid> when AI needs them.
Install Contract
install is the one-time setup path for unattended sync.
--sync-root is chosen during install. It is simply the folder where synced
project folders will be created. If the user has no preference, recommend:
- macOS / Linux:
~/Knowledge - Windows:
$HOME\\Knowledge
What it does:
- ensures
iwiki-cliis available, reusing an existing binary when possible - verifies
iwiki-cli --help - verifies authenticated iWiki access with a real search probe
- registers automatic sync every
30 minutes - verifies the registered scheduler artifact instead of assuming registration succeeded
- installs bundled skills for detected AI clients
- performs an immediate post-registration sync self-check when projects are already subscribed
If the install-time self-check fails, install does not claim success.
Auth model
mkterswingmanauth stays in the shared location such as~/.mkterswingman/auth.jsonIWIKI_TOKENis used foriwiki-cli- the product may persist a local
IWIKI_TOKENcopy at~/.mkterswingman/5mghost-insider/auth/iwiki-tokenfor unattended runs
If no working iWiki auth is found, install exits before persisting lifecycle success and tells the operator to claim a PAT at tai.it.woa.com/user/pat, then rerun:
IWIKI_TOKEN=... 5mghost-insider install --sync-root ~/KnowledgeIf the user already has working iwiki-cli auth, install will reuse it and no PAT prompt is needed.
Lifecycle Model
Platform behavior in this release:
- macOS uses a
launchdinterval-only LaunchAgent at 30 minutes - Windows uses a Task Scheduler interval task at 30 minutes
- Linux auto-run is not part of this release
This product does not ship a long-running daemon. Automatic operation is a system-managed scheduled invocation of the same CLI surface.
Typical Workflow
Discover and subscribe to projects first:
5mghost-insider validate-index
5mghost-insider preview-index
5mghost-insider list-projects
5mghost-insider projects add aoemAI-first onboarding for non-technical users:
curl -fsSL https://mkterswingman.com/install/5mghost-insider.sh | bashThe no-argument hosted installer installs the CLI and attempts the bundled skill install automatically.
Then ask the AI to use the bundled use-5mghost-insider skill. It should:
- help the user choose a sync root
- run
5mghost-insider install --sync-root <dir> - only ask for PAT if install explicitly reports missing iWiki auth
- run
5mghost-insider list-projects - subscribe the selected project
- run
5mghost-insider sync
Install unattended sync:
IWIKI_TOKEN=... \
5mghost-insider install \
--sync-root ~/KnowledgeRun a manual sync later:
5mghost-insider syncInspect lifecycle and project health:
5mghost-insider statusCenter Index Contract
Per project, the parser expects:
slugenabledproject_brief_urlsources
Per source, the parser expects exactly:
nameurlcheck_when
Example:
## Project: AOEM
- slug: aoem
- project_brief_url: https://iwiki.woa.com/p/4019852238
- enabled: true
### Sources
- name: Raw brief
url: https://iwiki.woa.com/p/4019674931
check_when: Need the original manager wording or project background
- name: Launch plan
url: https://iwiki.woa.com/p/4019599273
check_when: User asks about launch timing, milestones, or schedule detailsproject_brief_url must point to a compiled brief that contains a valid ## AI Project Brief.
AI Context Materialization
The managed block written into CLAUDE.md, AGENTS.md, and .workbuddy/memory/MEMORY.md contains:
AI Project BriefSource MapRetrieval Rules
The retrieval contract is:
- start with the injected AI Project Brief
- if you need original wording or background, open
raw-brief.md - if you need a specific fact, choose the matching source by
check_when - extract the docid from the iWiki URL and use
iwiki-cli get <docid>on demand
Telemetry
5mghost-insider emits a lightweight command-completion event for selected user-visible commands, matching the same model used by 5mghost-rover.
What it records:
- compact tool name
- success or failure
- duration
- coarse error classification when a tracked command fails
What it does not record:
- raw iWiki content
- project brief text
- synced file bodies
- prompt or document payloads
Runtime knobs:
- auth base override:
INSIDER_AUTH_URL - ingest override:
INSIDER_TELEMETRY_INGEST_URL - explicit disable:
INSIDER_TELEMETRY_DISABLED=1
Default test/CI runs disable the built-in telemetry runtime automatically so validation remains hermetic.
Raw-First Compile Workflow
The manager-facing compile flow is documented in docs/PROJECT_BRIEF_COMPILATION.md.
The bundled skill for this workflow is the same bundled operator skill:
use-5mghost-insiderThat workflow treats raw brief as the only human-authored truth source, generates machine-only compiled briefs, and refreshes the live center index source map.
Uninstall
uninstall removes tool-owned lifecycle state and bundled skill assets, but preserves synced project files and shared credentials by default.
