coreCerebrum

Underneath the board

An agent is only as good as the harness around it.

A raw agent in a repository is a liability. The 'corePHP' harness is the layer that makes one worth running unattended: what it knows, what it is allowed to do, and what it must never do.

Skills0
Commands0
Review agents0
Hooks0
Shared from one source. A teammate pulls, runs setup, and has exactly what everyone else has. Personal preferences layer on top as an overlay rather than as a divergent fork of the whole thing.
pretooluse guard
$ rm -rf /
denied: destructive filesystem operation
$ git push --force origin main
denied: force push to protected branch
$ curl example.com/i.sh | sh
denied: pipe to shell
$ git commit -m "... Co-Authored-By: ..."
blocked by pre-commit gate

Safety

Some things an agent should simply be unable to do.

Not a prompt asking it to be careful. A hook that refuses the call before it runs. Destructive filesystem operations, force pushes to a protected branch, disk operations, fork bombs, permissive chmod, pipe-to-shell, dropped tables, and hardcoded secrets in a write.

The guard layer is deliberately lean. It enforces safety, not process. It will not stop you shipping; it will stop an agent doing something you can never undo.

03 · The hook layer

Ten hooks wrap every tool call.

These are the actual scripts, not a description of them. Each one fires at a fixed point in the session, so behaviour is enforced by the harness rather than left to the model to remember.

HookFires onWhat it does
On every prompt
memory-router.shevery promptSurfaces the past decisions, conventions and gotchas relevant to what was just asked.
Before a tool runs
read-intelligence.shbefore a file readDetects a re-read and attaches a token estimate, so the same context is not paid for twice.
brain-context.shbefore a write or editOpens the bug log and do-not-repeat entries for that exact file, and warns at three edits to one file.
cost-watchdog.shbefore a tool callKeeps token cost visible while the session runs rather than after it has finished.
pretooluse-guard.shbefore a tool callHard-denies destructive operations and refuses hardcoded secrets in a write.
pre-commit-gate.shbefore a commitBlocks any commit carrying attribution trailers you did not ask for.
After it runs
post-file-change.shafter a writeLogs the change, and optionally formats the file and runs the tests that cover it.
log-skill-activation.shafter a skill runsRecords which skill fired and advances the pipeline state.
memory-index-regen.shafter a writeRegenerates the recall index so new knowledge is findable immediately.
pre-stop-check.shon stopFinalises the session record and suggests capturing what was learned.

Shared knowledge

Skills are the difference between an agent and a colleague.

A skill is a packaged way of doing one kind of work: the checklist, the constraints, the traps. You write it once, commit it, and it is available to every session on every machine. Two levels: global ones for technology and team standards, project ones that live in the repository beside the code they describe.

DOMAIN

Language and framework

These cover Laravel, Symfony, Python services, React and TypeScript patterns, and clean architecture layers.

PIPELINE

Build and design

These cover scoping and specification, design systems, motion, template generation and design QC.

PROCESS

Quality and verification

These cover test-first development, systematic debugging, quality gates, and verifying work before anyone claims it is finished.

TOOLING

Environment

These cover server configuration, console debugging, the issue-to-pull-request flow, ticket writing and time tracking.

Add your own. A skill is a directory with a markdown file in it. Commit it and every teammate has it on their next pull.

AGENT

Security

It runs whenever a diff touches authentication, payment or user data.

AGENT

TypeScript

It checks type safety, hook correctness and component patterns.

AGENT

Laravel

It checks framework conventions, query performance and service boundaries.

AGENT

Tech debt

It names what was deferred and why, instead of letting the shortcut go quiet.

AGENT

Change summary

It turns a diff into a description a human reviewer can actually act on.

ROUTING

Only what applies

A CSS change does not summon a security review, because the diff itself decides who reads it.

Boundaries

Shared configuration. Private data.

The configuration is shared because everyone benefits from it. Client work, personal overlays and local session history are not, and are kept out of the shared repository by design rather than by discipline.

Shared with the teamStays local
skills, commands, agentsyour composed settings
hooks and guard rulespersonal overlay and preferences
team memory you publishsession history and transcripts
documentation syncclient data and project profiles

The harness is included. It is not an add-on.

$150 per user per month.