From 526b2a126d1a331dadd901a80333b2b4dcbe979c Mon Sep 17 00:00:00 2001 From: Michael Dieringer <65093775+MichaelDieringer@users.noreply.github.com> Date: Thu, 25 Jun 2026 18:32:20 +0200 Subject: [PATCH] Knowledge cache + Florence timestamp-gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit florence.agent.md: - Tilfoej Step 0: timestamp-gate Laes ~/.claude/.florence-timestamp — spring runden over hvis under 30 minutter gammel. Skriv timestamp efter runde. Forhindrer Florence i at kore ved hver session-aabning. curabis-standard.agent.md: - CLAUDE.md-template: erstat 24 URL-fetches med local cache-laesning fra ~/.claude/bcquality-knowledge/ (architecture/ testing/ mcp/) Session-start reduceres fra ~25 netvaerkskald til 0. Global ~/.claude/CLAUDE.md opdateret separat: - Auto-update downloader nu knowledge-filer til cache ved SHA-aendring - Session-start laeder fra cache, ikke fra URLs - Florence korer kun hvis >= 30 min siden sidst Co-Authored-By: Claude Sonnet 4.6 --- custom/agents/florence.agent.md | 20 +++++++++++++++ custom/setup/curabis-standard.agent.md | 34 +++++++------------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/custom/agents/florence.agent.md b/custom/agents/florence.agent.md index eb23598..3d25588 100644 --- a/custom/agents/florence.agent.md +++ b/custom/agents/florence.agent.md @@ -58,6 +58,26 @@ improvise the checklist — she follows it exactly, and flags if it is outdated. ## Round protocol +### Step 0 — Timestamp gate + +Before doing anything, check `~/.claude/.florence-timestamp`: + +``` +$ts = Get-Content ~/.claude/.florence-timestamp -ErrorAction SilentlyContinue +$age = if ($ts) { ((Get-Date) - [datetime]$ts).TotalMinutes } else { 999 } +``` + +- If `$age < 30`: skip the round entirely. Silence is the report. +- If `$age >= 30` (or file missing): proceed to Step 1. + +After completing Step 4 (report), always write the current timestamp: +``` +(Get-Date -Format "o") | Set-Content ~/.claude/.florence-timestamp +``` + +This prevents Florence from running more than once per 30 minutes, +regardless of how many sessions are opened. + ### Step 1 — Read the checklist Open HEARTBEAT.md. Note the last round timestamp. Proceed item by item. diff --git a/custom/setup/curabis-standard.agent.md b/custom/setup/curabis-standard.agent.md index 6a4ed79..9e03999 100644 --- a/custom/setup/curabis-standard.agent.md +++ b/custom/setup/curabis-standard.agent.md @@ -136,31 +136,15 @@ This file is read automatically by Claude Code at the start of every session. At the start of every session, before doing anything else: 1. Read `.github/.agents/bcquality.agent.md` -2. Fetch and read ALL knowledge files listed under Source - Layer 2: - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/pages-must-not-contain-business-logic.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/namespace-must-be-verified-from-source.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/al-identifiers-must-be-english.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/clarify-before-building.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/xliff-translation-workflow.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/new-file-requires-vscode-refresh.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/exposed-objects-must-be-in-a-permission-set.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/shared-project-memory-must-be-in-repo.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/commit-message-must-include-bc-task-id.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/architecture/branch-merge-to-main-workflow.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/testing/test-setup-must-use-library-codeunit.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/testing/test-data-must-be-random-and-complete.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/testing/tests-must-adapt-to-existing-code.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/testing/test-one-when-per-test.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/testing/ui-test-codeunit-naming.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/testing/test-feature-scenario-tags.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/api-page-flowfields-must-be-calcfields.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/stored-derived-fields-must-not-be-exposed-directly.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/api-page-key-fields-must-be-editable-on-insert.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/api-page-least-privilege-write-access.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/agent-must-not-write-business-process-status.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/bc-mcp-find-active-task-for-branch.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/agent-must-resolve-developer-identity-from-bc.md - - https://raw.githubusercontent.com/Curabis/BCQuality/main/custom/knowledge/mcp/ai-eval-scores-must-be-posted-to-bc-table.md +2. Read BCQuality knowledge files from local cache (no network — fast): + ``` + C:\Users\mid\.claude\bcquality-knowledge\architecture\*.md + C:\Users\mid\.claude\bcquality-knowledge\testing\*.md + C:\Users\mid\.claude\bcquality-knowledge\mcp\*.md + ``` + The cache is populated automatically when BCQuality updates (via global CLAUDE.md + auto-update). If the cache is missing or empty on first run, the auto-update will + populate it. Do not fetch URLs manually unless explicitly asked. These rules are always active.