Commit graph

14 commits

Author SHA1 Message Date
Snider
d3bbda3698 fix(plugin): prefix commands with core: namespace to avoid clashes
/dispatch → /core:dispatch, /status → /core:status, etc.
Prevents collision with built-in Claude commands.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 14:50:35 +00:00
Snider
6045805dfc feat(plugin): add dispatch, status, recall, scan commands
New slash commands for the agentic system:
- /dispatch — dispatch subagent to sandboxed workspace
- /status — show workspace status (running/blocked/completed)
- /recall — search OpenBrain memories
- /scan — find actionable Forge issues

Fix MCP URL: api.lthn.sh/mcp → mcp.lthn.sh (subdomain routing).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 14:47:17 +00:00
Snider
9f2253cd9b fix(brain): improve session-start recall queries with type filters
Tuned OpenBrain recall queries to use type-filtered searches (decision,
plan, convention) instead of generic keyword matching. Increased content
truncation from 300 to 600 chars. Added roadmap/priorities query.
Renamed MCP server from openbrain to core in mcp.json.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 13:14:58 +00:00
Snider
8e63c19137 fix: debounce session-save hook to once per 10 minutes
Prevents flooding OpenBrain with near-identical context memories
during long sessions. Uses per-project timestamp file for debounce.
Also includes recent commits in saved context.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 11:50:49 +00:00
Snider
93415257f3 feat: OpenBrain integration for session hooks
SessionStart: query OpenBrain for recent activity + project context,
inject into Claude's context window on every new session.

Stop: async save session context to OpenBrain when git changes exist.

PreCompact: save working state to OpenBrain before context compaction.

API key read from ~/.claude/brain.key or CORE_BRAIN_KEY env var.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 11:44:04 +00:00
Snider
2e8e071d75 fix: reduce hook false positives
- Allow go mod tidy, go work sync, go get, go run (no core wrapper)
- Only block sed -i on local files (allow via ssh/docker)
- grep -l only blocked when piped to destructive commands
- Remove sed > and awk > blocks (too aggressive)
- check-debug: only flag fmt.Print* not log.Println (go-log is valid)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 11:39:23 +00:00
Snider
ad00214104 fix: remove block-docs hook — blocks legitimate spec/doc work
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:05:15 +00:00
Snider
a607a49287 refactor: consolidate plugin marketplace — remove duplicates, add repo-native plugins
Remove claude/qa/ and claude/ci/ plugins (replaced by go-build and
go-devops repo-native plugins). Strip duplicate qa command from code
plugin. Marketplace now references plugins at their source repos.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-13 10:06:58 +00:00
Snider
63cb1e31bb feat(workspace): add Go-native prep command, align PHP to .core/ convention
Go cmd_prep.go mirrors PHP PrepWorkspaceCommand — pulls wiki KB, copies
specs, generates TODO from issue, recalls context from OpenBrain. PHP
output dir changed from ./workspace/ to ./.core/ with lowercase filenames.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-13 09:29:43 +00:00
Snider
1aa1afcb0f fix: use HTTPS repository URL in plugin.json
SSH URLs don't work for plugin installation from remote.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-12 18:56:58 +00:00
Snider
e3eac36b05 feat: migrate CI commands to Forge API, add hooks.json, fix prefer-core heredoc handling
- Update CI skill commands (status, fix, run, workflow) to detect Forge vs GitHub
  and use Forge API with curl + FORGE_TOKEN instead of gh CLI
- Add detect-forge.sh script for CI provider detection from git remote
- Add hooks.json with PreToolUse, PostToolUse, PreCompact, SessionStart hooks
- Fix prefer-core.sh false positives: strip heredoc content before checking commands,
  tighten wildcard matching for mv/cp to only block bare wildcards
- Update plugin.json: rename to "code", bump to v0.1.3, point URLs to Forge
- Update block-docs.sh with improved blocking rules

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-12 18:55:04 +00:00
Snider
d7b1478c51 feat(review): add 5-agent review pipeline plugin + tailor agent personas
Review pipeline (/review:pipeline):
- pipeline.md command — orchestrates 5-stage sequential review
- 5 skills: security-review, senior-dev-fix, test-analysis, architecture-review, reality-check
- Each skill dispatches a tailored agent persona as subagent

Agent personas:
- Tailor all retained agents to Host UK/Lethean stack (CorePHP, Actions, lifecycle events)
- Rewrite Reality Checker as evidence-based final gate (defaults to NEEDS WORK)
- Remove irrelevant agents (game-dev, Chinese marketing, spatial computing, integrations)

Plugin housekeeping:
- Update author to Lethean across all 5 plugins
- Bump review plugin to v0.2.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:56:20 +00:00
Snider
5e0a18a110 test: add Claude plugin contract verification suite
18 tests validate the full plugin contract before tagging:
- Marketplace: valid JSON, required fields, unique names, versions
- Plugins: directory exists, manifest present, version consistency
- Commands: .md format, YAML frontmatter with name:
- Hooks: valid events, scripts exist + executable
- Scripts: executable, shebangs present
- Skills: SKILL.md present, scripts executable
- Cross-refs: all claude/ dirs listed in marketplace

fix: chmod +x on 8 skill scripts caught by contract tests

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:06:05 +00:00
Snider
9942ab8081 refactor: restructure as plugin monorepo
Reorganise as a marketplace with multiple focused plugins:
- claude/code: Core development (hooks, scripts, data collection)
- claude/review: Code review automation
- claude/verify: Work verification
- claude/qa: Quality assurance loops
- claude/ci: CI/CD integration

Structure:
- .claude-plugin/marketplace.json lists all plugins
- Each plugin has its own .claude-plugin/plugin.json
- Commands namespaced: /code:*, /review:*, /qa:*, etc.

Install individual plugins or all via marketplace:
  claude plugin add host-uk/core-agent
  claude plugin add host-uk/core-agent/claude/code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:44:26 +00:00