Commit graph

48 commits

Author SHA1 Message Date
Snider
4c0c5f6572 chore: update GEMINI.md
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:10:57 +00:00
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
7da0294100 refactor: restructure agents → prompts/personas, add plan templates
Move agent persona definitions from agents/ to prompts/personas/.
Add plan templates (bug-fix, code-review, feature-port, new-feature,
refactor) from the PHP PlanTemplateService into prompts/templates/.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 13:55:25 +00:00
Snider
9df5ed10f6 feat(docker): local development stack for community onboarding
Multistage Dockerfile (FrankenPHP + Octane + Horizon + Reverb) with
docker-compose wiring 6 services: app, mariadb, qdrant, ollama, redis,
traefik. All data mounts to .core/vm/mnt/{config,data,log}. Traefik
routes *.lthn.sh with self-signed TLS. Setup script handles first-run
bootstrap including cert generation and embedding model pull.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 13:15:05 +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
b317064c51 chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:49 +00:00
Snider
c5c50f310c feat(brain): improve recall quality and ingest deduplication
- Add source field to brain_memories (manual, ingest:claude-md, etc.)
- Pass Qdrant similarity scores through to API response
- Minimum 50-char content length filter during ingest
- Content hash deduplication prevents duplicate memories on re-ingest
- Update VALID_TYPES to include all 13 memory types
- Include score and source in toMcpContext response

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 07:42:38 +00:00
Snider
116fecb0d6 fix: align indirect dependency versions via go work sync
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 13:42:30 +00:00
Snider
3a2bc7c1f5 fix: update stale import paths and dependency versions from extraction
Resolve stale forge.lthn.ai/core/cli v0.1.0 references (tag never existed,
earliest is v0.0.1) and regenerate go.sum via workspace-aware go mod tidy.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 13:38: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
6442cb85ad refactor: update import path from go-config to core/config
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:22:39 +00:00
Snider
9071f28eb9 refactor(api): update import path from go-api to core/api
Part of the polyglot merge — forge.lthn.ai/core/go-api is now
forge.lthn.ai/core/api.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:10:39 +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
72c097ebcc docs: remove completed plan files
Webhook (implemented in core/php), review pipeline (commands + skills
exist), and OpenBrain (BrainService, BrainMemory, 4 MCP tools, Actions,
Commands all implemented) plans are all completed.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 08:21:58 +00:00
Snider
0a81a6046f feat(marketplace): add npm packages, revert to git URL for local use
Published @lthn/core-agent on npm. External plugins use git URLs
locally, npm for public distribution.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-13 10:49:19 +00:00
Snider
f0a5af2d93 fix(marketplace): use HTTPS URLs for external plugin sources
Claude Code uses git over HTTPS for plugin installation.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-13 10:18:44 +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
bdc617d48e docs: add Core\Webhook implementation plan (8 tasks)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:17:21 +00:00
Snider
0a12a6f32a docs: add Core\Webhook design — append-only webhook log + cron trigger
Replaces 4 AltumCode Docker cron containers with a single scheduled
action. Inbound webhooks stored as append-only log, no inline processing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:14:27 +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
d30a4c0d38 feat: add 153 agent personas from agency-agents
15 categories: design, engineering, game-development, marketing,
paid-media, product, project-management, sales, spatial-computing,
specialized, strategy, support, testing, examples, integrations.

Each agent has frontmatter (name, description, color, emoji, vibe)
and a detailed system prompt. Source: msitarzewski/agency-agents (MIT).

These feed into our content pipeline: agent personas drive strategy
and content generation through MixPost Enterprise, Bio.Host, and
the wider Host UK toolkit via MCP.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:34:27 +00:00
Snider
3c25feb78f docs: add human-friendly documentation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:02:40 +00:00
Snider
b75340b7fa fix: remove duplicate onApiRoutes method in Boot.php
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:01:34 +00:00
Snider
e894cd3a7a refactor: update MCP import to core/mcp
Change forge.lthn.ai/core/go-ai/mcp → forge.lthn.ai/core/mcp/pkg/mcp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:40:52 +00:00
Snider
e2d1d3266f feat: merge php-agentic into agent repo as src/php 2026-03-09 18:05:30 +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
c7c181ccf8 test: add contract verification for php-devops wishlist
18 tests verify the full workspace contract is implemented:
- repos.yaml: loads, required fields, valid types, deps exist,
  topological order, foundations, defaults, meta clone rules, domains
- workspace.yaml: loads, active package in registry
- .core/ folder: exists, has spec doc
- Scripts: setup.sh exists+executable, install scripts exist
- Plugins: marketplace.json exists, all plugins have manifests

Enables archival of core/php-devops and core/go-agent.

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:30:30 +00:00
Snider
e90a84eaa0 feat: merge go-agent + go-agentic + php-devops into unified agent repo
Combines three repositories into a single workspace:
- go-agent → pkg/orchestrator (Clotho), pkg/jobrunner, pkg/loop, cmd/
- go-agentic → pkg/lifecycle (allowance, sessions, plans, dispatch)
- php-devops → repos.yaml, setup.sh, scripts/, .core/

Module path: forge.lthn.ai/core/agent

All packages build, all tests pass.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 15:23:00 +00:00
Snider
b633ae81f6 feat: add README and flesh out all plugins
README.md:
- GitHub-friendly documentation
- Installation instructions
- Plugin overview with commands

review plugin:
- /review:security - Security-focused review
- /review:pr - PR review
- hooks.json - Post PR create suggestion
- scripts/post-pr-create.sh

verify plugin:
- /verify:ready - Quick readiness check
- /verify:tests - Test verification
- hooks.json - Pre-push warning
- scripts/pre-push-check.sh

qa plugin:
- /qa:check - Report only, no fixes
- /qa:lint - Lint with fix option
- hooks.json - QA output filtering

ci plugin:
- /ci:status - CI status display
- /ci:run - Trigger workflows
- /ci:fix - Analyse and fix failures
- hooks.json - Post-push CI hint
- scripts/post-push-ci.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:48:51 +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
Snider
ecefb8a952 refactor: restructure as Claude Code marketplace plugin
- Add .claude-plugin/plugin.json manifest for auto-updates
- Move claude/ contents to root level (commands/, hooks/, scripts/, skills/)
- Update hooks.json to use ${CLAUDE_PLUGIN_ROOT} for portability
- Add .gitignore for IDE files
- Update CLAUDE.md with new structure and installation instructions

Plugin can now be installed via:
  claude plugin add host-uk/core-agent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:35:06 +00:00
Snider
e130d5a8c4 chore: remove issue drafts (migrated to GitHub)
Issues #1-27 created on host-uk/core-agent.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:27:40 +00:00
Snider
e5de667849 feat(hooks): add hook scripts for /core:yes and /core:qa skills
Scripts:
- auto-approve.sh: PermissionRequest hook that allows all tools
- ensure-commit.sh: Stop hook that blocks with uncommitted changes
- qa-filter.sh: PostToolUse hook that extracts QA failures only
- qa-verify.sh: Stop hook that runs QA and blocks on failures

Updated skill files to reference script paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:15:51 +00:00
Snider
1b8f4de543 feat(skill): implement /core:yes and /core:qa skills
Add skill files for autonomous workflows:
- yes.md: Auto-approve mode with commit requirement
- qa.md: Iterative QA fix loop for Go/PHP projects

Both skills use skill-scoped hooks to modify Claude's behavior
during execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:09:55 +00:00
Snider
fd84bf2bd1 docs: add skills section to overview (018, 019)
Added Skills (autonomous workflows) section:
- #018: /core:yes - auto-approve, ensure commit
- #019: /core:qa - iterative QA fix loop

Updated implementation phases to include skills in Phase 4.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:06:59 +00:00
Snider
42f536b351 docs: add /core:qa iterative QA fix loop skill task
Skill that runs QA and fixes issues iteratively:
- Detects Go/PHP project type
- Runs core go qa / core php qa
- Parses output, extracts actionable issues
- Fixes in priority order: fmt → lint → test
- Re-runs QA until all checks pass
- Stop hook prevents stopping until QA clean

Hooks:
- PostToolUse: qa-filter (suppress verbose, show failures only)
- Stop: qa-verify (block if QA still failing)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:03:32 +00:00
Snider
e16aff7162 docs: add /core:yes auto-approve skill task
Skill that enables "just do it" mode:
- Auto-approves all permission requests via PermissionRequest hook
- Ensures work completes with commit via Stop hook
- Skill-scoped hooks (only active during skill)
- Still respects safety blocks from prefer-core.sh

Usage: /core:yes fix the failing test and commit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:00:25 +00:00
Snider
8fed5bc6ef docs: add hook improvement tasks for better feedback cycle
6 new issues for Claude Code hook improvements:

- 012: Test output filtering (reduce noise, show failures only)
- 013: Stop verification (verify work complete before stopping)
- 014: Auto-test on edit (async tests after code changes)
- 015: Session context injection (git/issues/CI on startup)
- 016: Silent auto-formatting (suppress formatter output)
- 017: Expose/hide policy (define what to show vs suppress)

Based on Claude Code hooks documentation:
- PostToolUse with suppressOutput for noise reduction
- Stop hooks with agent verification
- Async hooks for background testing
- SessionStart for context injection
- additionalContext for exposing important info

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:57:16 +00:00
Snider
beb24f71d2 docs: add feature request issues for core CLI migration
12 issue files documenting features needed to replace shell scripts:

Claude Code hooks:
- 001: core ai session (state management)
- 002: core ai context (fact capture)
- 003: core ai hook (command validation)
- 004: core qa debug (debug statement detection)

Data collection:
- 005: core collect github (issues/PRs archive)
- 006: core collect bitcointalk (forum threads)
- 007: core collect market (CMC/CoinGecko)
- 008: core collect papers (whitepapers)
- 009: core collect excavate (project archaeology)
- 010: core collect process (HTML→MD)
- 011: core collect dispatch (event hooks)

000: Overview tracking issue

These will be submitted to host-uk/core when rate limit resets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:49:35 +00:00
Snider
39b2cbde09 docs: establish core CLI-first philosophy
Document the approach of using `core` CLI instead of raw commands:
- Command mapping table (go/php/git → core equivalents)
- Key commands reference for dev, go, php, build, ai, qa
- Missing features → raise issues on host-uk/core
- TDD approach: code as if functionality exists

Every agent using core tests the framework, making it bulletproof.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:31:54 +00:00
Snider
9f1950c231 refactor: unify claude-cowork into claude directory
Consolidates the repository structure:
- Move skills/ to claude/skills/
- Move collection hooks to claude/collection/
- Update CLAUDE.md to reflect unified structure

Public version remains at core-claude; this is the advanced in-house version.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:23:41 +00:00
Snider
7faa974546 feat: add Claude Code plugin and CLAUDE.md documentation
Initial commit establishing core-agent repository with:
- Claude Code plugin hooks (safety checks, auto-formatting, context preservation)
- Collection skills for blockchain research archival (claude-cowork/)
- CLAUDE.md documenting repository structure and development patterns

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