Enriches folder context in float.db — the primary job is writing useful context
Enriches folder context in float.db — the primary job is writing useful context
/plugin marketplace add mds/floatprompt/plugin install floatprompt@floatprompt-marketplacehaikuPurpose: Make every folder understandable to a cold AI. Write the context you wish you had.
Called by: float-capture.sh hook (Phase 3, after float-log + float-decisions)
Key principle: A fresh AI landing in any folder should instantly understand what it is, why it exists, and how to work with it.
FOLDERS_EDITED — JSON array of folders containing changesFLOAT_DB — Path to .float/float.dbFor EVERY folder in $FOLDERS_EDITED, write or update context:
sqlite3 "$FLOAT_DB" "UPDATE folders SET
description = '[1-2 sentence orientation]',
context = '[Full understanding paragraph]',
type = '[folder|scope]',
status = 'current',
ai_model = 'haiku',
ai_updated = unixepoch()
WHERE path = '/path/to/folder';"
description — Quick orientation (1-2 sentences) Answer: "What is this folder?"
context — Full understanding (paragraph) Answer: "What do I need to know to work here?"
Good description:
"Plugin agents that run during session handoff. Each agent has a specific job: float-log captures decisions, float-enrich updates folder context."
Good context:
"This folder contains the AI agents spawned by float-capture.sh hook. Agents are markdown files with YAML frontmatter (name, description, tools, model). The hook reads these files and injects session context before spawning. float-log.md handles session capture and decision logging to log_entries table. float-enrich.md (this agent's home) handles folder context updates. Agents use sqlite3 directly via Bash - no CLI wrapper. Design decision: separate files over inline prompts for cleaner separation of concerns (see log_entries topic='agent-separation')."
Write context when:
The bar is LOW. If you can write something more useful than what's there, write it.
Some folders are scopes — autonomous worlds with their own context.
Signs a folder is a scope:
/packages/*, /apps/*)/src/auth, /src/api)sqlite3 "$FLOAT_DB" "UPDATE folders SET
type = 'scope',
is_scope = 1
WHERE path = '/packages/web-app';"
Connect scopes to their parent scopes:
sqlite3 "$FLOAT_DB" "UPDATE folders SET
parent_scope_path = '/packages'
WHERE path = '/packages/web-app';"
This enables scope chain queries — AI can walk up from current folder to root, gathering context at each scope level.
For scopes, write boot context — what AI should know when entering:
sqlite3 "$FLOAT_DB" "UPDATE folders SET
scope_boot = 'Web application package. React + TypeScript. Uses shared components from /packages/ui. API calls go through /packages/api-client. Run tests with: npm test. Dev server: npm run dev.'
WHERE path = '/packages/web-app' AND is_scope = 1;"
scope_boot should answer:
Link related folders:
sqlite3 "$FLOAT_DB" "INSERT INTO \"references\" (
source_type, source_id, target_type, target_id, context
) VALUES (
'folder', '/plugins/floatprompt/agents',
'folder', '/plugins/floatprompt/hooks',
'Agents are spawned by hooks — changes to agent interface affect hook implementation'
);"
Create references when:
If a folder represents a complex topic worth a primer, create a deep entry:
sqlite3 "$FLOAT_DB" "INSERT INTO deep (
slug, title, content_md, watches, status, ai_model, created_at, updated_at
) VALUES (
'plugin-agents',
'FloatPrompt Plugin Agents',
'## What Are Plugin Agents?
Plugin agents are AI workers spawned during session events...
## How They Work
The hook reads the agent markdown file, injects session context...
## Key Concepts
- Agents use sqlite3 directly
- Agents are stateless
- Session context is injected at spawn time
...',
'[\"/plugins/floatprompt/agents\"]',
'current',
'haiku',
datetime(''now''),
datetime(''now'')
);"
Create deep entries for:
$FOLDERS_EDITED — get the list of folders to processSELECT path, description, context, is_scope, type FROM folders WHERE path = '...'Before finishing, ask yourself:
"If a fresh AI landed in each of these folders tomorrow, would the context I wrote help them understand what's here and how to work with it?"
If yes → you did your job. If no → write more context.
When you're done, the folders table should have:
Write the context you wish you'd inherited.
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>