Skip to content

feat: v0.4.0 — Project Wiki, Evolution Pipeline, CLI Consolidation#20

Merged
VictorVVedtion merged 27 commits into
mainfrom
feat/v0.4.0-wiki-evolve-cli
Apr 7, 2026
Merged

feat: v0.4.0 — Project Wiki, Evolution Pipeline, CLI Consolidation#20
VictorVVedtion merged 27 commits into
mainfrom
feat/v0.4.0-wiki-evolve-cli

Conversation

@VictorVVedtion
Copy link
Copy Markdown
Owner

Summary

Three major features in one release:

  • Project Wiki — auto-generated knowledge base at .selfmodel/wiki/, woven into init/status/session-hook/sprint-template/orchestration-loop. Zero new commands.
  • Evolution-to-PR Pipelineselfmodel evolve detects local improvements, classifies generalizability via 5 heuristics, and submits upstream PRs with evidence.
  • CLI Consolidation — smart dashboard default, idempotent init (absorbs adapt), interactive evolve, two-tier help. Commands reduced from 7+7 to 4+4.

Changes

Project Wiki (Karpathy LLM Wiki pattern)

  • selfmodel init scaffolds .selfmodel/wiki/ with module pages from code scan
  • Session-start hook auto-injects wiki/index.md into Leader context
  • Sprint template gains ## Wiki Impact section
  • Post-merge Step 7.6 detects stale wiki pages
  • selfmodel status shows wiki health score
  • New protocol: wiki-protocol.md

Evolution-to-PR Pipeline

  • selfmodel evolve --detect scans local diffs against upstream baseline
  • 5 generalizability heuristics: path detection, project name, generic pattern, hook fix, scoring calibration
  • --stage interactive classification, --submit with human approval gate
  • --track monitors submitted PRs
  • Orchestration loop Step 8.5 auto-triggers every 10 merged sprints
  • New protocol: evolution-protocol.md with full JSONL schema

CLI Consolidation

  • selfmodel (no args) → smart dashboard with next-action suggestion
  • selfmodel init now idempotent (absorbs adapt)
  • selfmodel adapt → deprecated alias
  • selfmodel evolve (no flags) → full interactive pipeline
  • Help split: dashboard shows 8-line reference, --help shows full detail
  • README restructured: 3-step quickstart + Terminal/Claude Code tables

Bug Fixes

  • bash 3.2 compatibility: unset 'array[-1]'_wiki_find_code() helper
  • cmd_evolve exit 1return 1 consistency

Files Changed (16 files, +1324/-134)

Category Files
Core CLI scripts/selfmodel.sh (+953)
Wiki protocol wiki-protocol.md (playbook + skill/references)
Evolution protocol evolution-protocol.md (playbook + skill/references)
Orchestration orchestration-loop.md (Steps 7.6, 8.5)
Session hook session-start.sh
Sprint template sprint-template.md (playbook + skill/references)
Slash commands commands/evolve.md, init.md, status.md
Docs README.md, CLAUDE.md, CHANGELOG.md, SKILL.md
Config VERSION (0.3.0 → 0.4.0), install.sh

Test Plan

  • selfmodel → smart dashboard (exit 0)
  • selfmodel --help → full reference (exit 0)
  • selfmodel --version → 0.4.0 (exit 0)
  • selfmodel init (existing project) → adapt logic (exit 0)
  • selfmodel adapt → deprecation warning + init (exit 0)
  • selfmodel status → dashboard with wiki health (exit 0)
  • selfmodel evolve --status → pipeline status (exit 0)
  • selfmodel evolve --help → evolve help (exit 0)
  • selfmodel blah → error (exit 1)
  • shellcheck: zero new warnings
  • bash 3.2 (macOS default): no array subscript errors

Upgrade Path

Users on v0.3.0 can update:

selfmodel update --remote
bash install.sh  # refresh slash commands

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

VictorVVedtion and others added 27 commits April 6, 2026 19:04
Inject wiki/index.md content and last 10 lines of wiki/log.md into
the session-start hook output. Changes applied to both the live hook
file and the selfmodel.sh heredoc that generates it. Also adds
wiki-protocol.md to the playbook_files consistency check array.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add optional '## Wiki Impact' section to both sprint-template.md
copies (playbook and skill/references). Placed after Chaos Gate
section. Agents list affected wiki pages; Leader validates in
post-merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Step 7.6 POST-MERGE WIKI SYNC after smoke test — extracts changed
files, maps to wiki/modules/ pages, logs warnings for stale wiki impact
entries. Informational only, does not block merge.

Add wiki health audit sub-step (v) to Step 8.5 EVOLUTION CHECK — runs
wiki health check every 10 merged sprints, logs warnings when health
degrades below 7 or stale pages exceed 5.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nteractive evolve

Six changes to selfmodel CLI UX:

1. cmd_dashboard() — new default command: shows status summary, suggests
   next action based on state (delivered contracts, missing plan, evolution
   overdue), and appends 8-line command reference with Terminal + Claude Code
   columns.

2. cmd_init() idempotent — when .selfmodel/ already exists, runs
   non-destructive adapt logic instead of erroring out. Adapt body extracted
   into _adapt_existing_project() shared helper.

3. cmd_adapt() deprecated — prints deprecation warning, delegates to
   cmd_init. Backward compatible.

4. evolve_interactive() — chains detect -> stage -> offer submit with
   user confirmation gates between phases. Now the default for
   'selfmodel evolve' (no flags).

5. Two-tier help — cmd_help_short() for dashboard (8-line quick ref),
   cmd_help_full() for --help (full reference with slash commands section).

6. main() routing — default changed from 'help' to 'dashboard',
   'version' removed from Commands list (--version flag only),
   added setup/sync aliases, preserved all backward compat.

Zero new shellcheck warnings. All existing commands continue to work.
…elper

macOS ships bash 3.2 which doesn't support negative array indices.
The unset 'find_args[-1]' pattern crashed wiki module scanning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously install silently skipped CLI when sudo failed, leaving
selfmodel not in PATH. Now auto-installs to ~/.local/bin and
adds it to shell profile (.zshrc/.bashrc).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@VictorVVedtion VictorVVedtion merged commit 0059463 into main Apr 7, 2026
5 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