sync-sessions.sh emits pending_items[] per session, the dropdown will populate with full item details.schedules.json (manual update).From any PowerShell (admin not required for read-only):
schtasks /Query /TN BrainzymeSnapshot /V /FO LIST
schtasks /Query /TN BrainzymeRetroQueue /V /FO LIST
Healthy: Status: Ready + Last Result: 0 (or 267009 = task running) + Next Run Time in the future. Sick: Last Result non-zero (HRESULT — Google it), Status: Disabled, or Next Run Time: N/A.
Check the artefact each task writes — if the file timestamp is fresh, the cron really fired:
F:/brainzyme-git/google-ads-audit/pipeline/latest.json — should update each day ~08:47 (Daily Audit tab also shows last-fetch time).F:/Claude Root/v4.0/retro-queue.json — checked_at field rotates each day ~09:00. Empty due_slugs[] is normal until first chain run is 14 days old.These fire while a Claude Code session is running. Verify registration:
/c/Python314/python.exe -c "import json,sys; d=json.load(open(r'C:/Users/PC/.claude/settings.json')); h=d.get('hooks',{}); [sys.stdout.write(f'{k}: {len(v)} matchers\n') for k,v in h.items()]"
Each script logs to its own file when it fires — tail the relevant log to confirm:
F:/Claude Root/.claude/sync-pinecone.log — Pinecone auto-syncF:/Claude Root/.claude/banned-copy-gate.log — Banned copy gateF:/Claude Root/.claude/headline-bank-schema-gate.log — Headline bank gateF:/Claude Root/.claude/matrix-lexicon-resync.log — Lexicon resyncF:/Claude Root/.claude/shopify-drift-check-{store}.lastrun — Shopify drift cache stampIf a log hasn't updated in days but you've done relevant edits, the hook may have detached — re-register via settings.json or run the script manually with HOOK_BYPASS=1 to test.
Fires when a Claude Code session ends. Verify backups exist:
ls -lt F:/Claude\ Root/_backups/ 2>/dev/null | head -5
If no recent backups after a known session-end, the Stop hook isn't wired — check .claude/settings.local.json Stop matcher.
Fires in Anthropic cloud, not on this machine. Verify via the routine page:
# Open the routine URL from schedules.json -> remote_trigger_url
# Status panel shows: scheduled / running / completed / failed
Successful runs deliver to (a) git commit on the configured repo, (b) Gmail to [email protected]. Email subject prefixed [Brainzyme QC]. Use Gmail filter from:[email protected] to find them.
One-liner that hits the four artefact paths in order — each line should print a timestamp from today (or yesterday for snapshot before 08:47):
stat -c '%y %n' \
"F:/brainzyme-git/google-ads-audit/pipeline/latest.json" \
"F:/Claude Root/v4.0/retro-queue.json" \
"F:/Claude Root/.claude/sync-pinecone.log" \
"F:/Claude Root/.claude/banned-copy-gate.log" 2>/dev/null
Anything bypassed via HOOK_BYPASS=1 appends a dated entry to v4.0/deployment-log.md. Search for BYPASSED there to see if anyone (or any process) skipped a gate.
Update schedules.json in this repo (google-ads-audit/pipeline/schedules.json) within the same session — that's what this dashboard reads. Cadence per _meta.update_policy: at end of session that touched any schedule. Also update memory/feedback_agent_hooks.md if the change is hook-related.
latest.json (daily 08:47 BrainzymeSnapshot) + ab-tests.json.Loading from ab-tests.json…
bash .claude/sync-sessions.sh to refresh.intel_driven campaign-layer stub in the matrix — promote manually after review (14-day SLA).Loading trends…
claude01-v2 RAG index + on-disk memory + working-context sessions. Four-node model with bank-and-trim lifecycle.sync-sessions.sh with two prior bugs fixed (unquoted session IDs, pending=00 double-emit). Throttle remains at 60s. Manual refresh: bash .claude/sync-sessions.sh.
The working context system saves each active session's state to a dedicated markdown file in memory/working-context/. Each file contains: the session's objective, progress checklist, key decisions, working data (IDs, budgets, account state), and the explicit next action.
When Claude's context window compacts mid-session, the post-compaction SOP (in CLAUDE.md) tells Claude to read _index.md, find the most recent ACTIVE session, load that file, and resume. This prevents the "silent drift" problem where Claude loses track of what it was doing after compaction.
Multiple sessions can run in parallel (e.g., campaign build + creative R&D + social media). Each gets its own file and status (ACTIVE/ENDED). The index shows all of them.
pending-tasks-registry.md: vague-verb checker, weekly stale-flagger, Calum decision packet. Plus Week 1 fan-out instrumentation: counts TaskCreate dispatches per session. Hook is live; data populates as sessions run.| Cadence | What to do | Where to look |
|---|---|---|
| Daily | Glance at the Triage hero KPIs (top of this tab). If Stale >21d jumps from 0, something is rotting. | Hero KPIs above |
| Weekly (Friday) | Open the Calum decision packet section. Each item has a keep / escalate / kill / clarify / do-now recommendation. Action the list in one sitting — that’s the whole point of batching. | Section 2 below |
| Weekly (Monday) | Run the 3 scripts to refresh the JSONs. Cron candidate. | python tools/triage_pending_tasks.py · calum_decision_packet.py · fanout_summary.py |
| Per session | When banking, the check_pending_task.py CLI flags vague verbs and missing acceptance criteria. Warn-only for now. | python tools/check_pending_task.py --text "..." |
.claude/settings.json — nothing else changes.
Loading triage report…
Loading decision packet…
Loading fan-out summary…
memory/working-context/. Each contains only: current objective, pending items not yet banked elsewhere, and residual context pointers. Not a full history \u2014 completed work is banked to permanent homes.',
detail: 'Lifecycle: CREATE (new session file) \u2192 UPDATE (at milestones) \u2192 BANK (move findings to permanent home) \u2192 TRIM (remove banked items) \u2192 END (3-line summary + pointers). On compaction, Claude reads _index.md and loads only ACTIVE files \u2014 never ENDED ones.',
detail2: 'Auto-sync hook \u2014 DISABLED (2026-04-21): The PostToolUse Write/Edit hook (.claude/sync-sessions.sh) that was supposed to auto-generate sessions.json and push to GitHub Pages is disabled pending re-statement. Until it is re-enabled, sessions.json is a manual sync target \u2014 run bash .claude/sync-sessions.sh to refresh the Kanban. The Kanban may be stale at any given moment.config/creative_vault.json, (2) memory/*.md, (3) v4.0/deployment-log.md, (4) v4.0/go-live-rundown.md.',
connections: ['MEMORY.md:memory-index', 'CLAUDE.md:claude-md', 'Creative Vault:vault', 'Go-Live Queue:go-live', 'sessions.json:logs']
},
'memory-index': {
title: 'MEMORY.md',
type: 'Index \u2014 Auto-Loaded Every Session',
desc: 'Master index file that is automatically loaded into every Claude session\'s context. Contains one-line pointers to 35+ individual memory files organised by type: user profile, feedback/behaviour rules, project state, references, strategy, competitors, and more.',
detail: 'Each memory file has YAML frontmatter (name, description, type) and focused content. Types: user (who Calum is), feedback (how Claude should behave), project (current state of initiatives), reference (where to find things). Memory files are the long-term knowledge base \u2014 they persist across all sessions and conversations.',
detail2: 'Key memory files: feedback_permissions.md (tool auto-approval), pending_tasks_registry.md (check on startup), customer_insights.md (review-based copy), strategic_observations.md (positioning angles), ref-google-ads-full.md (full Ads architecture).',
connections: ['Working Context:working-context', 'CLAUDE.md:claude-md', 'Pending Tasks:handover', 'All 35+ memory files:memory-index']
},
'handover': {
title: 'Handover File',
type: 'Emergency Recovery \u2014 Cross-Session',
desc: 'If a Claude session dies mid-deployment (rate limit, crash, context exhaustion), this file contains everything a new session needs to pick up immediately: pending tasks, completed work, script fixes applied, Python paths, credentials, and a ready-to-paste startup command.',
detail: 'Unlike working context (which is for same-session compaction recovery), the handover file is for new session recovery. It includes the exact bash commands to run, which task IDs are done, which are pending, and known warnings to ignore. It also documents all script fixes applied so a new session doesn\'t re-discover the same bugs.',
detail2: 'Current source-of-truth pointers: v4.0/go-live-rundown.md, v4.0/deployment-log.md, v4.0/agent-playbook.md, v4.0/campaign-architecture.json. Pending items tracked in the live session files under memory/working-context/.',
connections: ['Working Context:working-context', 'Go-Live Queue:go-live', 'Deploy Scripts:logs', 'CLAUDE.md:claude-md']
},
'go-live': {
title: 'Go-Live Build Queue',
type: 'Deployment Queue \u2014 Wave-Based',
desc: 'The single source of truth for what needs to be built, fixed, and launched. Ordered by priority scoring matrix. Wave 0 (blockers, DONE) \u2192 Wave 1 (quick wins) \u2192 Wave 1.5 (LP compliance) \u2192 Waves 2\u20137 (builds + translations + cleanup).',
detail: '38 campaigns total: 18 Search + 20 PMax across UK/DE/FR/US. Budget: \u00A3753/day. Each wave lists: task, priority score, effort, method, status, and who owns it. Campaign unpauses are blocked by Calum answering Q1\u2013Q6 (compliance decisions on ADHD/TDAH/ADHS page rewrites).',
detail2: 'Feeds from: priority reconciliation scoring, compliance checklist (traffic light), landing page audit. Feeds into: handover file, deployment log, session working context.',
connections: ['Handover File:handover', 'Compliance Checklist:logs', 'Landing Page Audit:logs', 'Deployment Log:logs', 'Working Context:working-context']
},
'logs': {
title: 'Session Logs (x3)',
type: 'Append-Only \u2014 Versioned per Session',
desc: 'Three parallel logs, each following strict versioning rules: Change Log (every account mutation with reversal instructions), Strategy Log (hypotheses, user decisions, competitive intel), Technical Log (API errors, tool reliability, workarounds).',
detail: 'Each session appends a new section. Before updating, the current file is archived to logs-old/ with a session suffix (e.g., _s22). This means every session\'s pre-update state is preserved \u2014 you can diff any two sessions to see exactly what changed.',
detail2: 'The strategy log includes a User Decisions & Rationale table (Q1\u2013Q64) that prevents future sessions from re-asking settled questions. The technical log includes a Tool Reliability Matrix that new sessions check before attempting operations.',
connections: ['Working Context:working-context', 'Go-Live Queue:go-live', 'Handover File:handover', 'CLAUDE.md:claude-md']
},
'vault': {
title: 'Creative Vault',
type: 'Permanent Home \u2014 Creative Findings',
desc: 'Single source of truth for all creative configuration: products (4 per market), regions (UK/DE/FR/US with locale-specific rules), guardrails (10 non-negotiable ad copy rules), image generation defaults (FLUX settings, shape lock, pose library), and model routing.',
detail: 'This is permanent home #1. When a session discovers new prompt techniques, pose libraries, guardrail rules, or model settings, they are banked here \u2014 not left in the session file. Both batch_generate.py and generate_image.py read directly from this vault at runtime.',
detail2: 'Key sections: products (name, slug, price, ingredients per market), regions (locale, currency, disclaimers, tone rules), guardrails (10 rules like no_treatment_claims, no_anti_coffee), image_generation (model routing, FLUX defaults, selfie prompt template, pose library), brand_voice (Poppins, navy, gold tokens).',
connections: ['Working Context:working-context', 'Batch Generate:logs', 'Image Gen:logs', 'Template Registry:memory-index']
},
'claude-md': {
title: 'CLAUDE.md',
type: 'Boot Config \u2014 Loaded Every Session',
desc: 'Master instruction file loaded into every Claude session\'s system prompt. Contains: brand rules, product info, compliance (non-negotiable), tool routing, creative pipeline specs, file locations, working context lifecycle rules, and the post-compaction self-audit SOP.',
detail: 'This is the root of all behaviour. It tells Claude who Calum is, what Brainzyme\u00AE is, how to handle compliance, which tools to use for which tasks, and where all key files live. Now includes the working context lifecycle documentation: CREATE \u2192 UPDATE \u2192 BANK \u2192 TRIM \u2192 END, plus the four permanent homes.',
detail2: 'Key sections: Session Startup (check permissions, check pending tasks, read only ACTIVE session files), Working Context Lifecycle (bank-and-trim pattern, four permanent homes), Post-Compaction SOP (4-step recovery), Compliance (never claim to treat/cure), Google Ads (CEP protocol, 3x Kill Rule), Creative Pipeline (matching principle, 3-stage production).',
connections: ['MEMORY.md:memory-index', 'Working Context:working-context', 'Creative Vault:vault', 'All Reference Files:memory-index']
}
};
function showMemDetail(key, evt) {
const d = MEM_DATA[key];
if (!d) return;
document.getElementById('md-title').textContent = d.title;
document.getElementById('md-type').textContent = d.type;
document.getElementById('md-desc').innerHTML = d.desc;
document.getElementById('md-detail').innerHTML = d.detail;
document.getElementById('md-detail2').innerHTML = d.detail2;
const conns = document.getElementById('md-connections');
conns.innerHTML = '