Chapters

DOC-04 / Technical reference · Chapter 11

Overview of the Synedre OS agentic harness

This chapter describes the core architecture of the Synedre Claude Code harness, detailing the cohabitation and cumulative role of versioned and local configuration files, event hooks, skills, and sub-agents that orchestrate guardrails and memory injection.

Skills, agents and hooks — the Synedre OS agentic harness

This chapter describes how the Synedre OS harness is wired: the available skills, the delegatable sub-agents, and the event hooks that enforce doctrine (streaming commits, production/email/ship guardrails, memory injection). It is intended for the engineer taking over the harness who needs to understand what fires, when, and what the source of truth is.

1. Overview

The harness is organized around a central configuration directory that groups three families of components:

  • Skills — capability cards loaded on demand via the Skill tool.
  • Agents — named sub-agents, delegatable via the Agent tool, each described by a profile card.
  • Event hooks — commands attached to key moments in the session lifecycle (PreToolUse, PostToolUse, Stop, SessionStart, UserPromptSubmit, PreCompact), defined in two complementary settings files.

These three families rely on two layers of scripts: the guardrail and post-action scripts (several hundred shell and Python scripts) and the agentic facades — the central dispatcher that projects protections across all supported AI engines (Claude, Codex, Antigravity).

                 ┌───────────────── Harness configuration ─────────────────────┐
                 │                                                               │
  user ─────────▶│  versioned settings    +   local settings                    │
  / Atlas        │      └── hooks PreToolUse / PostToolUse / Stop /              │
                 │          SessionStart / UserPromptSubmit / PreCompact         │
                 │                                                               │
                 │  skills/<name>/SKILL.md  ──▶ invoked via the Skill tool      │
                 │  agents/<codename>.md   ──▶ delegated via the Agent tool     │
                 └───────────────────────────────────────────────────────────────┘
                                │                         │
                                ▼                         ▼
                   guardrail scripts              agentic facades
                   (hooks, nudges,                (central dispatcher,
                    post-actions)                  memory injection)

2. The two settings files

Two configuration files coexist and complement each other:

File Git-versioned Role and observed content
Versioned settings Yes 242 hook commands (172 PreToolUse, 37 PostToolUse, 18 Stop, 7 UserPromptSubmit, 7 SessionStart, 1 PreCompact), environment variables, permissions (defaultMode: bypassPermissions, 6 allow entries), skill listing budget fraction (0.02), skill overrides (56 skills in name-only mode).
Local settings No (host-machine-specific) 1,062 allow permission entries, ghost knowledge graph activation variable, list of enabled MCP servers, additional SessionStart / PreToolUse / PostToolUse hooks, automatic mode.

Both sets of hooks are cumulative: for a given event — for example PreToolUse targeting the Bash tool — the commands defined in the versioned settings and in the local settings all execute. Legacy guardrails (context marker injection, context window tracking) reside in the local file; the portable central dispatcher, which applies P0 protections across all supported AI engines, lives in the versioned file.

Architecture note: this versioned / local split is intentional. Shared doctrine rules (production guardrails, streaming commits, P0 protections) travel with the repository; host-machine-specific settings (fine-grained permissions, MCP servers, debug hooks) remain outside version control so as not to expose infrastructure details.

2. The skills catalogue

Each skill is defined by a structured description file (frontmatter name / description followed by a narrative body). Large skills add a sub-folder of reference snippets. In total, 182 entries coexist: 181 invocable skills and a group of engine-internal skills not intended for manual invocation by an agent.

The catalogue exposed to a session is budgeted: only a fraction of the available context is allocated to it. Fifty-six skills are forced into name-only mode — their description is not injected into the session list.

The portable skills (read by all harnesses: Claude, Codex, Antigravity, Muse, ZCode) are generated automatically from the master catalogue and the skills registry in the database. A protection hook prohibits any manual write to these generated files. The generator also projects per-harness hooks; for the DeepSeek harness in particular, each pre-tool hook receives a fail-closed suffix: if the dispatch bridge disappears, its abnormal exit code is interpreted as an explicit refusal rather than silence. The Antigravity plugin reads the portable skills directly from the workspace and no longer keeps a local copy — thus avoiding double-listing.

The propagation chain (commit guard, --skill and --check options, daily watchdog) is described in the portable meta-harness documentation.

2.1 Catalogue by category

Category Skill Role
Steering / worksites / runs chantier Worksite steering ("1 worksite = N tasks"): dashboard, drill-down, atomic creation with scaffold.
chantier-live Launches a worksite immediately and drives it through to done without intervention, with a pre-production review folder at the end.
chantier-audit Worksite audit (description not listed in the catalogue — name only).
run Opens a scoped run; default path for the lightweight unit. Distinct from the harness's native application launcher.
negociation Loads the context of a commercial negotiation; symmetric to the worksite for the lead → deal phase.
deal-spin When a deal moves to action: opens a dedicated pool, Atlas steers, the judgment agent evaluates.
livraison-tenant Delivery pool for a client: Atlas drives, back and front agents deliver to pre-production, the quality agent reviews every line.
portee-feature Before coding a request: determines whether the gain is general (product core) or specific (client flag or overlay). To be invoked before any edit to the core.
idee Creates an idea in the brainstorm registry.
service-tech / service-communication / service-croissance / jeu-synedre Pool recipes by operational arm (Tech, Communication, Growth, "la Tournée" game).
Tentacles / suckers / session tentacule-delegation Delegate a task to a tentacle (Claude, Codex, Antigravity, GLM) without interrupting the current turn.
ventouse-spawn / ventouse-temporaire Open a sucker in the chosen arm (B1–B8, T1–T2) with a persisted objective; one command opens, another closes.
harnais Switch the harness (Claude, Codex, GLM, Antigravity, Muse) or the model of a sucker or pool without closing it.
revue-interpool / revue-agents Review of live pools (wear, scars, risky gestures); review of the Parade Ground.
handoff Retrieves and displays the session handoff from the current directory (safety net for the SessionStart auto-resume).
fenetre-autonomie, context-status, apprendre, graver-victoire, cmd-une-ligne, lien-a-valider Nightly autonomy loop, context status, learning, recording a victory, single-line copyable command, URL to open manually.
Audit / health audit-hard-floor Anti-rot inspection of the P0 rules whitelist.
audit-lexicon Detects lexical registry drift (DB check, enums, forbidden synonyms). Dry-run mode; exit 0 = healthy, 1 = drift.
audit-i18n-slugs / audit-i18n-db EN↔FR parity and localised slugs for synedre.com; language columns and actual translation rate in the database (read-only).
audit-api-guards Verifies authentication guards on API routes.
audit-sql-escape Verifies SQL escaping in the codebase.
audit-modules / audit-doctrine PrestaShop module audits and internal doctrine audits.
audit-doc / audit-conduite / audit-infra-canon / audit-forum-seo Targeted audits: documentation, conduct, infra canon, forum SEO.
persona Detects agent persona drift relative to the stack; --fix option = refresh + review.
status, monitoring-live, crawlers, host, mac, windows System / site status, live monitoring, crawlers, host audits (infra / security / backups / updates), workstation attachment.
Email / inbox / client inbox / scan-attachment Reading received emails; antivirus scan of an attachment before opening (Mitnick agent).
reponse-client / reponse-client-annotee / charte-reponse-client / ton-client End-to-end client email reply (shown before sending), reply form and tone.
point-emails-client / boucles-client Status of ongoing exchanges, open loops.
question-referent / dossier-client Grouped question to the referent, client context file.
preparation-copil / traiter-demande Steering committee preparation, incoming request handling.
propal-verif / devis / relance QA of a commercial proposal, charter-compliant quote, overdue payment follow-up.
promouvoir-client Promotes a prospect to client status.
Acquisition / prospecting demarchage, prospect-qualifier, prospect-ecrire, preparation-rdv, pagespeed, malt, reponse-linkedin End-to-end outreach campaign, qualification on dated fact, first contact under seal, meeting preparation, field measurements, Malt, LinkedIn reply.
demo-prospect, clone, clone-site Prospect demo in pre-production, client site cloning.
compte-saas-client, compte-tiers, secure-owner-access-delivery, password Third-party account management without secret exposure, access delivery to the owner.
Distribution / community / content diffusion, meta-reel, video-flow, video-hero, sous-titres, transcript-video Automated social distribution via the dedicated queue, end-to-end reel, video clips, homepage video loop, subtitles, transcripts.
communautes, forum-article, forum-lecon, meta-forum-source, discord-serveur Forum / Facebook Page community support (validate, seal, queue slot), article derived from a published thread, Discord server.
publish, plan-editorial, relecture-blog, redaction-gemini, cicatrices-publish, wukong-post Blog publication, monthly editorial plan, code-reviewed proofreading, SEO copywriting by Gemini under seal, public scars.
SEO / catalogue seo-audit, meta-audit-seo, seo-enhance, seo-meta, seo-blog-performance, seo-coverage, seo-orphelines, seo-bascule-urls, gsc, gsc-raccorder, mots-cles, netlinking SEO audits and remediation for a tenant, Search Console, keywords, backlinks.
slug-optimizer, product-slug-optimizer, hierarchie-categories, structuration, url-change, ps-redirections, maillage-interne, cocon-linkmap-audit, covers-categorie, traduire-catalogue, import-woocommerce, fiche-agent, verifier-piece Slugs, category tree, URL change (301 + cache), internal linking, category covers, bulk translation, WooCommerce import, AI assistant readability, auto part verification.
Integration / design / QA charte, design-system, logo, vectorize-logo, figma, integration-maquette, integrer-maquettes-restantes, page-iso-figma, point-integration-maquette-iso, rythme-vertical, livrable-charte-synedre Tenant charter (tokens, WCAG contrast), Figma mockups → pixel-accurate render, vertical rhythm, deliverable charter.
qa-visuel, qa-responsive, qa-windows, parcours-client, simplifier-interface-dense Multimodal visual QA, responsive, Windows, purchase funnel replayed in a real browser.
3D / workshop atelier-3d-pilote, modelisation-3d, perso-3d, qa-ressemblance-3d, planche-prompt, auditer-shape-report, etendre-shape-report, installer-shape-report 3D character from reference board to rigged model, shape measurement in Blender, board prompts.
PrestaShop / tenants ps9-migration, ps9-module, ps9-charte, sensel-capteur, sensel-preprod, serveur-client, sortir-cloudflare Migration to PS 9, PS 9 module, Hummingbird charter, Sensel integration, client VPS commissioning, DNS takeover.
Infra / browser / Windows deploy Brings a site or client pre-production online (pre-flight, trunk revert, live proof). Client production deployment goes through ./ship.
browser, session-web, htpasswd Driven browser, web session resume, htpasswd protection.
domaines, domaine-libre, marque, marque-complete, marque-depot Domain management (OVH), trademark filing (EUIPO / INPI).
peritas, peritas-commande, peritas-entretien, peritas-fenetres, peritas-web Steering of the Péritas Windows box (PowerShell commands, maintenance, windows, browser).
Memory / knowledge memoire Semantic recall via vector search over internal memory, the documentary brain, and the scar, doctrine, and worksite tables.
notes-atomiques, notes-tenant, dictionnaire, sources-ouvrage, doc-tech Atomic notes, tenant state cross-referenced against the live source, dictionary, technical documentation generation (write → verify → correct, --refresh option).
Finance / admin bank, compta, compta-perso, facture, urssaf, budget-foyer, collecte-foyer, aides-foyer, protection-majeur, colis-non-recu, merci-facteur, sign-pdf Sole-trader accounting, invoices via the invoicing facade, URSSAF, household finances, registered mail. Canonical issuer = sole trader.
Miscellaneous soulseek, tuto-mcp, idee, shopify, worktree-merge Occasional skills. worktree-merge inventories and merges pending worktree branches toward pre-production. Skills without a description in the catalogue are in name-only mode.

The catalogue above groups 181 skills by family. The exhaustive list is obtained via the catalogue reader with the --list option. The native Anthropic plugin skills (update-config, loop, dataviz…) are not part of the Synedre catalogue.

2.2 Database sources of truth

Skills do not store business data: they query the mother-ship's PostgreSQL database. The following are the mappings between skills and business tables:

  • Chantier → the worksite and task tables.
  • Memoire → the scar, doctrine, and worksite tables.
  • Graver-victoire → the scar table, entries of type victory.
  • Idee → the brainstorm registry.
  • Persona → the persona drift history (audit) and the agent registry (--fix).
  • Inbox → the received emails table.
  • Negociation → the negotiation registry; Run → the run registry.

The skills registry in the database (columns: size in bytes, portability flag) is populated by a dedicated cron process. Session usage is tracked by a PreToolUse hook in an invocations table. A pre-invocation hook reads the recorded size (threshold at 3,000 bytes, with fallback to the local file size) and suggests the catalogue reader in lazy-loading mode (three levels) when the skill is large.

The catalogue reader (which delegates to a skill guide module) provides explicit reading of the canonical source:

bin/skill-view --canonical --list --json
bin/skill-view --canonical <skill-name> --json
bin/skill-view --canonical <skill-name> --full --json

The catalogue loads metadata only. Reading a skill returns the canonical source, timestamps, actual size, and a SHA-256 fingerprint of the body; --full includes the full body without modifying its bytes. Without --json, --full writes the body only. Each call re-reads the database, with no cache or local fallback.

An unavailable source, an unknown skill, or an empty body triggers exit code 1; in JSON mode, the error is structured under the error.code key. Usage errors exit with code 2 on stderr. The fingerprint identifies the version of the guide that was read; it does not certify the compatibility of the commands described with the installed CLI versions.

Legacy usage without --canonical continues to read the local skill files from the repository.

Delegable Sub-Agents

The system includes thirty-three agent files, each describing a delegable specialist. Each file is partially generated from the database: a regeneration script reads the active-agents view and overwrites a delimited zone within the file (between two start and end markers), leaving the hand-authored editorial zone intact (doctrine, operating mode). The automatically managed zone must never be edited by hand.

The regeneration script offers three modes:

  • No option — regenerates all active agents.
  • --dry-run — displays diffs without writing.
  • --check — exits with an error code if any file should have been modified (useful in CI).

A self-repair hook monitors every agent creation in the database: if the corresponding file is missing, it automatically triggers the generator, ensuring that no agent exists in the database without its profile file.

Architecture note: the agent view exposed to the generator is a read-only view built on top of the authoritative base table. The persona correction tool writes to the base table; the generator reads the view — both are perfectly consistent, with no risk of divergence between two separate tables.

The frontmatter of each agent file specifies: the display name, the description (the delegation criterion used by the orchestrator to select the right specialist), the list of authorized tools, and the target model (sonnet for all).

Executor Agents

These agents have write access and can execute system commands. They act directly on code, infrastructure, or data.

Public name Role Authorized tools
Brunel DevOps / Infrastructure — containers, reverse proxy, SSL certificates, DNS, servers Read, edit, write, search, system execution
Turing Backend SRE — application server, business modules, Python scripts, database integrity Read, edit, write, search, system execution
Eames Frontend — Nuxt 4 / Vue 3 / Tailwind framework, design system, hub pages Read, edit, write, search, system execution
Otlet Technical SEO — structured data, sitemap, Core Web Vitals, redirects, AI indexability Read, edit, write, search, system execution
Lovelace QA — last line of defence before production, Playwright acceptance tests, regressions Read, search, system execution (no write)
Mitnick Offensive/defensive security — attachment scanning, secret detection, OWASP Read, search, system execution (no write)
Pacioli FinOps / Management control — AI costs, infrastructure, services, reconciliation Read, search, system execution (no write)

Important distinction: Lovelace, Mitnick, and Pacioli have system execution capabilities for observation and measurement purposes, but cannot modify files — consistent with their control and audit roles.

Advisory and Knowledge Agents

These agents have read-only access (files, text search). They produce analyses, drafts, and recommendations, without ever executing a command or writing a file. All use the sonnet model. Marco Polo additionally has access to web search and retrieval.

Public name Role
Atlas Architect & Project Manager (Orchestration) — partitions work, dispatches to specialized agents
Audiard Audio author — rewriting for the ear (rhythm, orality, pacing)
Bernays Head of Commercial & Growth — commercial pipeline, leads, conversion funnels
Bernhardt Audio quality control — scoring (9.5/10 blocking threshold), diction, fidelity to source text
Braille Accessibility guardian — WCAG 2.2 AA (keyboard, contrast, ARIA)
Clausewitz Strategy Officer — consistency of product decisions against positioning
Coco Brand Guardian & Simplification — tonal refinement, cross-channel visual consistency
Colbert General Director — initiative prioritization, resource allocation, steering
Dumas Master Narrator — serialized storytelling, emotional arcs, episodes, characters
Escoffier Household steward — menus, recipes, shopping lists, waste reduction
Gauss Data Analyst — metrics (traffic, conversion, costs), insight reporting
Herriot Household veterinarian — animal care (diet, hygiene, health)
Hill Chief Vision Officer — long-term strategic direction, North Star
Hokusai Mangaka — character design & AI manga/manhwa illustration
Itten Art Director — colour palette, typography, design tokens
Marco Polo Intelligence Agent — technology, competitive & market monitoring (+ web search and retrieval)
Méliès Director — AI visual production (portraits, scenes, covers, prompt engineering)
Montesquieu Legal Counsel (EU Law) — GDPR, terms of service, digital law
Montessori Academy & Pedagogy — learning modules, glossary, learner pathways
Nightingale Customer Success — drafting client communications, no direct sending
Ogilvy Copywriter — persuasive tone, message clarity, cross-channel consistency, CTAs
Phidias 3D Sculptor — from 2D character sheet to rigged model via sculpting loop
Pulitzer Content Manager & Blog SEO — articles, covers, internal linking
Renoir Automation Supervisor — scheduling oversight, idle periods, timetables
Socrate Dialogue & Community Agent (Maieutics) — challenging assumptions, FAQ, clarity
Winnicott Mental Health Guardian — overload, balance, pace adjustments

Observations and Delegation Rules

  • Nightingale has no system execution access — strictly read-only, consistent with the absolute rule: the system never communicates directly with clients.
  • All advisory agents (previous section) share exactly the same rights: read-only, zero write, zero execution.
  • A context ceiling applies to every sub-agent: a preventive hook monitors current tool usage and interrupts processing if the context exceeds the authorized threshold — because a sub-agent never emits a stop signal on its own.
  • In an agent pool, the pool lead cannot directly open a native sub-agent: a blocking hook forces it to delegate to members of its pool, enforcing partitioning discipline.
  • Delegation doctrine (Atlas): for any workstream of significant scope, Atlas is required to involve at least two distinct agents and delegates via the sub-agent mechanism. Using Mitnick as a preliminary scan step is considered tooling (step 0b), not the recruitment of a full team member.
  • Known drift: the automatically managed zone may, for certain agents, display data that differs slightly from the hand-authored zone. The source of truth is always the base table, accessible via the persona audit and correction tool.

Hook Event Map

The harness relies on a series of anchor points (hooks) that intercept every phase of a turn's lifecycle: session start, prompt submission, tool use, turn end. Each hook receives the event context, applies its guards, then returns a verdict (block, warn, or pass).

Event Format Primary role
SessionStart json + local Context loading (journal, handoff, mailbox, tenant scope, tentacle persona); context counter reset; daily brief injection and memory markers.
UserPromptSubmit json DB schema sync, client tone detection, mailbox handoff, tenant scope, RAG memory warm-up.
PreCompact json Session splitting before context compaction.
PreToolUse * json Central dispatcher: translates the native event into a canonical contract and delegates to capability-scoped guards.
PreToolUse Read json Antivirus check on attachments; decentralised reflex engine.
PreToolUse Bash json Approximately 90 guards and nudges covering shell, Python, production, emails, SEO, infrastructure.
PreToolUse Edit|Write… json Trunk guards, quality, SQL, doctrine; reflex engine; memory marker injection (local).
PreToolUse Agent json + local Pool delegation, reactor, memory markers, tenant identity, reflex engine.
PreToolUse Skill json Pre-invocation check (preview suggestion); usage tracking.
PreToolUse WebFetch|WebSearch json Reflex engine; personal search guard.
PreToolUse mcp__.* json Per-tenant MCP write guard.
PostToolUse Bash json Reaction journal, post-commit deployment, tentacle page update, post-deployment checks.
PostToolUse Agent json Reactor, reaction journal, agent telemetry.
PostToolUse Edit|Write… json Tracking of files edited during the session; nudges, deduplication, sealed publications.
PostToolUse (all) json + local Event to the CLI cockpit; session-split tick; token counting (local).
Stop json Error detection, session splitting, handoff, cockpit, lock release, memory markers, pending-commits warning, worksite sync, end nudges.

SessionStart

Two configuration files each contribute their own set of commands at startup; they are cumulative.

Shared commands (versioned file)

  • Session context logging (max 8 s): records the current state for traceability.
  • Handoff resume (5 s): automatically reloads the last handoff — clean start, flush, or resume depending on state.
  • Mailbox read (6 s): injects relevant incoming messages at startup.
  • Tenant scope injection (6 s): constrains the action scope to the relevant tenant's space.
  • Tentacle page (5 s) and tentacle persona (10 s): load the active front-facing identity configuration.
  • Worktree nudge (3 s): if the session starts on the shared trunk, suggests opening a dedicated session branch.

Local commands (unversioned file)

  1. Context counter reset — reinitialises context size tracking for the starting session.
  2. Daily brief — reads the pre-computed report produced each morning at 05:00 UTC (a scheduled task of type audit daily-meet) and enriches it live: git state, cron tasks, client emails, backlog, memory markers. No npm dependency; the request is sent to the internal database engine.
  3. Memory marker injection — inserts the relevant memory markers for the session into the startup context.

⚠️ Both configuration files each carry a SessionStart hook; their commands accumulate — they do not replace one another.

UserPromptSubmit and PreCompact

On each prompt submission, seven guards execute in sequence:

  • DB schema sync: generates a snapshot of the current schema into an internal reference file.
  • Client tone detection (25 s): injects tenant-specific register instructions onto standard output.
  • Mailbox read: prompt-submit variant of the same guard used at startup.
  • Tenant scope injection: identical to SessionStart.
  • RAG memory warm-up (8 s): short recall of the memory shared across all three harnesses.
  • Worktree-first nudge: reminds the system to work on a session branch if not already doing so.
  • SEO/URL route: directs SEO operations to the intended channel.

ℹ️ IMAP synchronisation is no longer a UserPromptSubmit hook: it now runs as a scheduled task or continuous worker. The corresponding script remains permitted by the email guard (see next section).

The PreCompact hook triggers session splitting before the engine compacts the context. This same splitting mechanism is also invoked at the end of each turn (Stop) and after each tool use (tick).

PreToolUse

Central dispatcher (universal matcher)

A central component (dispatcher) runs on all PreToolUse events (max 20 s). It translates the native event into a canonical contract, then delegates to legacy guards or the decentralised reflex engine according to the required capability. Business rules are not duplicated here: only capability-based routing lives in this component. The same dispatcher serves all three harnesses (Claude, Codex, Antigravity).

A fail-closed mechanism blocks any unclassified tool from an unvalidated third-party provider before any write side-effect occurs — for example, an edit operation will be refused if it has not been explicitly classified as having no side effect.

A context ceiling guard limits sub-agent context size for all common tool types (read, write, edit, glob, search, skills, agents, tasks).

Read matcher

GuardEffect
Attachment antivirus check BLOCKING (exit 2): prevents any read of a file received as an attachment if the antivirus verdict (SHA-256 fingerprint + scan marker) is absent. Fail-closed reflex with no database dependency.
Decentralised reflex engine Loads active rules from the database, decides (deny / warn / pass) and writes the audit trail. See detail below.

Bash matcher — main guards

The main block comprises approximately 90 scripts grouped by family. The most structurally significant:

Family / GuardEffect
Attachment antivirus check (Bash) Same logic as for Read: blocks shell commands that would open an unscanned attachment.
Client go-live guard BLOCKING fail-closed, database-aware: extracts the target from the delivery command (isolating the executable portion — heredocs and bare mentions excluded), rejects internal targets (the hub itself → use the internal deployment command), then queries the client VPS configuration table: auto_ship_allowed = true passes, false or unknown target / unreachable database blocks. All tenants are subject to this rule uniformly since the historical exception was lifted.
git add global block BLOCKING: forbids git add -A and git add . — the git index is shared across parallel sessions.
Multi-session git hygiene Several guards: no rebase on a shared branch, worktree management, blocking artefacts from git, stash with explicit reference, merge-back verification, orphaned merge protection.
DB mutation guard Blocks a database mutation (UPDATE / INSERT / ALTER on management tables) without an aligned code commit within the last 5 minutes — "code before DB" doctrine.
Auto-commit before deployment Forces a commit before any ./deploy. Complemented by guards checking: build from trunk head, preprod lane included, no schema lag, no deployment from a worktree, correct hub targeting.
Worksite skeleton nudge Warns if a worksite is created via a raw SQL INSERT instead of the create_with_skeleton helper.
Pre-commit leak scan Analyses the diff before commit to detect secrets, credentials or sensitive data. Full family: inline secret paste, secret file printing, Docker inspection, environment file sourcing, secret redirection, third-party account plaintext entry.
Similar worksite reminder Non-blocking (30 s): on a call to create_with_skeleton, performs a hybrid lexical + semantic search and injects the 4 closest worksites or doctrines — prevents reinventing existing solutions.
Documentation link nudge Warning only: on each commit, cross-references staged files against documentation chapter contracts. If a linked file is modified, reminds the operator to verify that the corresponding chapter is still accurate.
Client email family About a dozen guards encoding the "zero automatic communication, show before send, internal copy" doctrine: prerequisite task check, recipient attestation, send window, mandatory copy, scheduled send prohibition, WhatsApp validation, em-dash absence, etc.
Prod / infra / SQL family Guards covering: production writes requiring an explicit declaration, client vhost isolation on the hub, tmux session protection, cron installation, Docker volume deletion, Docker folder copy prohibition, mandatory ON ERROR STOP in SQL, no inline SQL command-line arguments, SQL twin tables, tenant DB source of truth.
SEO / URL family Guards covering: URL deletion without a 301 redirect, URL modification without 301 + cache invalidation, SEO title check before deployment, taxonomy depth, routing SEO writes through the MCP channel.

ℹ️ Note for maintainers: a back-office security guard script exists on disk but does not appear in any active configuration file (grep = 0) — it is dormant. The exhaustive list of Bash guards is defined in the main configuration file; do not duplicate it here, it evolves with each patch.

Bash matcher — local guards (unversioned file)

GuardEffect
Production write guard BLOCKING: detects commands targeting a tenant's production database with a destructive SQL write pattern (TRUNCATE, DROP TABLE, DROP DATABASE, DELETE FROM, ALTER TABLE, RENAME TABLE, UPDATE … SET, pipe to the DB engine). Requires use of a dedicated safety script. Four-layer false-positive mitigation: (1) commands targeting the hub itself are short-circuited before any tenant test; (2) commands targeting a tenant's preprod pass without check; (3) another tenant hosted on the same VPS is exempt as long as its command does not also name the first tenant's container or domain; (4) non-destructive queries (SELECT, SHOW, INSERT INTO…) pass implicitly — there is no explicit allowlist for these cases, only the ten destructive patterns are blocking.
Email facade guard BLOCKING: prevents any bypass of the official email facade — direct calls to SMTP/IMAP libraries, unauthorised send functions. Only four official scripts are permitted: the send client, the IMAP sync script, the direct mailbox reader, and a secondary mailbox reader. Each script is accepted as a full path or bare filename.
Memory marker injection (Bash) Injects memory markers related to the current command (also active for edit and write tools).

Email facade — detailed behaviour

The official send script enforces the show-before-send doctrine in practice:

  • In draft mode (--draft): automatically sends an internal validation copy with the subject [TO VALIDATE → <recipient>] ….
  • In send mode (--send): automatically appends the HTML signature before SMTP delivery; rejects any signature manually written into the body.
  • Option --markdown: converts the body to email-compatible HTML before sending.
  • At draft time, displays the expected tone for the recipient (non-blocking, best effort).
  • Mode --validate --draft-id <N>: resends the validation copy of an existing draft.
  • For the internal channel (Atlas), a dedicated signature variant is used.

Edit | Write | MultiEdit | NotebookEdit matcher

GuardEffect
Trunk block (interactive session) BLOCKING fail-closed (3 s): an interactive session on the shared trunk cannot write any file. Exception: environment variable SY_TRUNK_OK=1 declared. The startup nudge announces this rule; to work: ./bin/wt session <name>.
Generated skills guard Prevents writing auto-generated skills into the dedicated folder. Fail-open if the payload is unreadable.
Doctrine / quality guards Founding manifest protection, publisher signature immutability, family scope isolation, LLM volume on GLM level, canonical skill conduct, prohibition of process.env in client composables, application levels, self-hosted assets, pivot-language rewrite entities, mandatory docstring, bounded CLI output, SQL guards, single DB source, worksite scope, conservation law (new files).
Decentralised reflex engine Loads active rules, decides, writes the audit trail. Targeted fail-closed: if the primary database is unreachable, blocks only sensitive areas of the product core; if the secondary database is unreachable with fail_mode=closed, blocks; otherwise passes. Regex timeout via signal → fail-open. Python error → exit 0 + stderr. Also active on Read, Agent, WebFetch|WebSearch.

Agent matcher

  • Pool delegation (8 s, blocking): verifies that the agent delegates to the intended pool.
  • Reactor: heartbeat and agent activity recorded in the tracking tables.
  • QA budget nudge: non-blocking reminder about the quality-assurance envelope.
  • Sub-agent memory marker injection (15 s): inserts relevant markers into the sub-agent's context.
  • Tenant identity injection (10 s): constrains the sub-agent's scope to the relevant tenant.
  • Reflex engine + local memory marker injection (5 s).

Skill matcher

  • Pre-invocation check (5 s, non-blocking): if the skill size exceeds 3,000 bytes, suggests previewing it first.
  • Usage tracking: records each skill invocation in the dedicated table.

Other matchers

  • AskUserQuestion: redirects to the email facade where relevant; forbids questions to the pool.
  • mcp__.*: per-tenant MCP write guard.
  • WebFetch|WebSearch: reflex engine + personal search guard.

PostToolUse

Bash

  • Mono-deal nudge for the orchestrator.
  • Post-tool reaction journal.
  • Tentacle page update.
  • Automatic post-commit deployment (10 s) — see dedicated section below.
  • Deliverable check after tenant deployment.
  • Warning if a tenant environment variable was written without a reload.
  • Bash write block on trunk (post-tool).
  • Second block of post-deployment checks: post-cache-TTL verification, front cleanup required, QA iso re-read, live browser probe.

Agent

  • Reactor + reaction journal.
  • Agent telemetry (5 s): records agent turn metrics.

Edit | Write | MultiEdit | NotebookEdit

  • Session edited-file tracking (3 s): feeds the session file used by the Stop hook.
  • Nudges and publications: sealed community publication (40 s), social publication (40 s), Malt seal validation, untrusted text guard (30 s), memory marker deduplication.

Write | Bash

  • Check that a new doctrine is correctly attached to a hook.
  • Check that a hub page is correctly linked in the navigation.
  • Automatic agent profile regeneration after insertion — nightly loop maintaining agent descriptors.

All tools (CLI cockpit)

A universal hook (10 s, non-blocking) mirrors session activity to the worksite tracking dashboard. It is inactive if the variable SY_CLI_COCKPIT_DISABLED=1 is set or if the binding is absent. It is coupled to a session-split tick (8 s) after each tool.

All tools — local

A counting hook (5 s) tracks token consumption and context size throughout the session.

Automatic post-commit deployment

After each successful commit, a post-processing hook triggers ./deploy <site> in the background — an intentional asymmetry: internal deployment is automated, client go-live remains manual (./ship).

Command filter

Only git commit and its recommended wrapper trigger the hook. The --amend option and commit-tree are ignored. The command is read on the first 8,000 characters.

Worktree awareness

  • Disposable session branch (worktree-agent-*) → no deployment.
  • Full-exercise lane (wt/sess-*, worktree-*) → waits for the merge-back to have reached the trunk (configurable ceiling, default 600 s; aborts without deployment if exceeded).
  • Fan-out candidate (fanout/*) → neither merge-back nor deployment before adjudication.
  • Client lane (wt/<client>) → no automatic deployment; explicit go-live required.

File-to-site mapping

  • Hub files (main application, scripts, Nuxt configuration, dependencies) → hub deployment.
  • Tenant files → deployment of the tenant's site.
  • Product core or community files → deployment of the demo site (three-step doctrine: demo first).
  • Studio workshop files (excluding tests) → additional deployment to the Studio pre-production environment.

Serialisation and batching

  • Atomic lock (flock) per site; the demo and its workshop share a lock.
  • Batching: if the commit is already included in the last successful deployment, nothing to redo — a deployment publishes the trunk head.

Quiet window (hub only)

Before deploying the hub itself, the hook waits for the trunk to be quiet for a configurable duration (default 120 s, ceiling 600 s). Reason: each hub restart interrupts it for 12 to 16 seconds. The delay can be cancelled by setting the variable to zero.

Skips

  • Commit message containing [skip-deploy] or [no-deploy], or starting with wip:.
  • Commit touching only documentation or internal context files.
  • Dirty working tree after the commit (excluding the hooks configuration file).

⚠️ For the hub itself, there is no pre-production environment: ./deploy builds directly to production. The word "preprod" in the hook name applies only to client tenants.

Stop — execution order

  1. Turn error detection (15 s): analyses the transcript and the list of benign rejections.
  2. Session splitting (10 s): splits the session if the context threshold is reached.
  3. Operator command prompt (8 s): suggests an action to be performed from the hub terminal dashboard.
  4. Handoff sync (5 s): ensures the handoff exists where the next session will look for it.
  5. End-of-turn cockpit event (9 s): active only if SY_CLI_COCKPIT_STOP_BEAT=1 and binding active — emits "— end of turn —" in the tracking dashboard timeline.
  6. Worksite lock release (3 s): releases the lock held by the session.
  7. Memory marker reminder: if the last user message contains closure keywords ("close", "end of session", "wrapping up"…), lists via stderr the corrective commits since the reference branch origin, then blocks with exit 2.
  8. Pending commits warning (5 s, BLOCKING): refuses Stop if the working tree is dirty — forces an in-flow commit. See detailed mechanics below.
  9. Return to trunk (10 s): repositions the session on the shared trunk.
  10. Worksite sync (8 s): reminds the operator to synchronise between the local worksite and the hub database.
  11. End nudges: API-first, AI-driven migrations, web action via the internal browser, conservation law, objective vs arbitration, session worktree cleanup.
  12. Second Stop group: direct source check before narrative.

Pending commits guard mechanics

  • Session awareness: on the trunk, the guard filters git status to only the files edited by the current session — multiple parallel Claude sessions do not block each other. In a session worktree, no filter: the entire worktree status belongs to the session.
  • Merge-back drain: at turn end, drains pending lanes and lists what has not yet reached the reference branch — a lane commit has no value until it has been integrated.
  • Anti-loop: if the hook is already running (second pass detected), switches to a non-blocking warning instead of blocking.
  • Automation sub-agent: if the session is a sub-agent spawned by an automation process, the guard cancels without blocking (see next section).
  • The hooks configuration file is excluded from the check (it may have been modified by the hook itself).

Worker-context convention

A shared library defines the notion of automation sub-agent: any session in which the environment variable SY_WORKER_CONTEXT is present (the value does not matter — only presence is checked) is treated as a sub-agent spawned by an automation process, not as an interactive user session.

Two known spawner types use this convention:

  • The task worker: executes scheduled jobs as a sub-agent.
  • The visual inspector: inspects visual renders as a sub-agent — without the variable, it was incorrectly committing the parent session's work in progress.

This library is sourced by all Stop hooks (pending commits, lock release, memory markers, worksite sync, end nudges) as well as trunk guards. General rule: a sub-claude spawned by an automation process does not trigger user-session hooks (in-flow commit, closure memory markers).

Other shared libraries

  • Executable portion extraction: isolates the command actually executed from a shell block (strips heredocs and non-executable options).
  • Delivery invocation isolation: removes bare mentions of the go-live command to evaluate only effective calls.
  • Handoff template verification: ensures the handoff conforms to the expected format.

Permissions & Environment

Agent Environment Variables

The agent configuration defines several environment variables that drive the behavior of the context engine and the session-splitting thresholds:

  • Maximum context window: capped at 400,000 tokens, with an automatic compaction window aligned to the same value.
  • Session splitting: the split trigger threshold is set at 200,000 tokens; the rearm threshold (after a split) at 150,000 tokens; the turn-count threshold at 400.
  • Experimental teams mode: disabled (0); display flicker suppression: disabled by default.
"env": {
  "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "0",
  "CLAUDE_CODE_NO_FLICKER": "0",
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "400000",
  "CLAUDE_CODE_MAX_CONTEXT_TOKENS": "400000",
  "SY_SESSION_SPLIT_CTX_THRESHOLD": "200000",
  "SY_SESSION_SPLIT_CTX_REARM": "150000",
  "SY_SESSION_SPLIT_TURN_THRESHOLD": "400"
}

Permission Policy

The default permission mode is bypassPermissions: the agent executes tools without interrupting the flow to request confirmation. This policy is consistent with autonomous orchestration via ./deploy. It is the hooks — not permission prompts — that carry the guardrails.

⚠️ The previously documented value was auto; it has been replaced by bypassPermissions.

The explicit allow-list covers in particular:

  • Execution of Python scripts from the repository (python3 <module> with a controlled prefix).
  • Mail client operations in draft mode and in send mode.
  • The safe commit script (bin/git-commit-safe.sh).
  • The public deployment command (./deploy).
"permissions": {
  "defaultMode": "bypassPermissions",
  "allow": [
    "Bash(python3 <repo-directory>/:*)",
    "Bash(python3 <email-client> --draft:*)",
    "Bash(python3 <email-client> --send:*)",
    "Bash(python3 -m <repo-module>.:*)",
    "Bash(bin/git-commit-safe.sh:*)",
    "Bash(./deploy:*)"
  ]
}

Local Configuration and Access Policy

The local configuration (not version-controlled) extends the allow-list to over 1,000 entries covering all pre-approved tools and commands. No explicit deny-list is defined at this level.

This local configuration also carries an access policy expressed in natural language, structured around two components:

  • Explicit authorization: read-only access to a client's staging environment (a client-dedicated VPS used for testing, with a database separate from production).
  • Soft denial: any write operation to the same client's production environment triggers an explicit confirmation prompt on each attempt.

⚠️ Both environments for a given client (staging and production) are hosted on separate VPS instances, with separate databases. Conflating them would be a critical error. The declarative policy is backed at the executable level by the write-protection guardrail (described in the hooks section), which blocks any unconfirmed write to production.

Secret Leak Prevention

No secret appears in plaintext in hooks, skills, or agents. Mail client credentials (login address, IMAP/SMTP password) are referenced solely by their environment variable name in a .env file excluded from version control — never as a literal value.

Several detection mechanisms actively guard against leaks:

  • A pre-commit hook that scans transcripts for sensitive data.
  • A hook that blocks inline pasting of secrets into the session.
  • A hook that prevents display of files containing secrets.
  • A hook that detects secret leaks via container inspection.
  • The offensive security specialist agent (Mitnick) and the attachment analysis skill also contribute to this detection perimeter.

Data Model — Summary of Persistent Components

The system relies on a set of tables and views in the central database. The table below presents each component by its functional role, its producer, and its consumer.

Component (functional role) Producer Consumer
Agent registry (base table + read view) Manual editing or persona correction command The agent file generator reads the view to produce configuration files
Project and task tracking The project management skill and the Project entity The project synchronization and locking hooks
Scar log The victory engraving skill, the session-end hook The memory module; injected at session start and before tool use
Daily audit reports The daily meeting audit task The session brief generator (executed at startup)
Skill index (size, portability) The skill indexing cron job The pre-skill-invocation hook; the canonical skill view; the meta-harness generator
Skill invocation traceability The skill usage tracing hook Skill registry management
Reflex engine (rules + audit) Rule editing and the reflex engine itself The reflex engine (rule reads); audit trail
Agent supervision (heartbeat & activity) The agent event reaction hook Agent supervision dashboard
Client VPS fleet (ship authorization) The fleet The unauthorized ship blocking hook
Persona drift history The persona command Drift review
Brainstorming workspace The idea skill The hub brainstorming panel
Tentacle sessions The hub (tentacles) The tentacle session scope guardrail
Email inbox The mail synchronization worker The inbox reading skill

✅ Architecture note: the agent registry is a read view over a single base table. The persona refresh command writes to the base table; the agent file generator reads the view — there are therefore no two diverging tables, which eliminates any risk of desynchronization during a refactoring. The number of agent files increased from 30 to 33 during a recent schema audit.