chore: gitignore FPLAN and DPLAN files — plans are local, not tracked (#28)

Plans are runtime artifacts managed by flow. They stay on disk but don't belong in the repo.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AIPass
2026-03-08 13:05:51 -07:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 9579c27139
commit ca8b3a2912
15 changed files with 4 additions and 4469 deletions
@@ -1,92 +0,0 @@
# DPLAN-0001: System Bootstrap
Tag: bootstrap
> Get all 15 modules operational with citizenship, comms, and branch awareness.
## Vision
Every module has citizenship (.trinity/), can receive email, and can be woken via dispatch. DevPulse has full visibility. The system runs as a coordinated multi-agent team.
## Current State
- All 15 branches registered, discoverable, and fully scaffolded
- All citizens are builder class (except devpulse = manager)
- 13/15 respond to `drone @branch --help` (devpulse has no apps/ by design, commons DB init fails)
- Import fixes complete: backup (16 files), daemon (8 files), skills (5 files)
- Commons entry point renamed (the_commons.py → commons.py)
- Wake + round-trip comms verified on @memory and @backup
- Seedgo audit: all branches passing (77-98%)
- gh CLI installed and authed for PR workflow
- 3 PRs merged: #17 (bootstrap), #18 (builder scaffold), #19 (commons/skills scaffold)
## What Needs Building
### Phase 1: Test Spawn Safety
- [x] Create mock test branch with apps/ to verify spawn passport doesn't clobber existing code
- [x] Verify birthright grants .trinity/ without touching apps/
- [x] Clean up test branch after verification
### Phase 2: Grant Citizenship
- [x] Grant birthright to backup (has apps/, is builder — but existing code, use passport)
- [x] Grant birthright to daemon (has apps/, same situation)
- [x] Grant birthright to memory (has apps/, same situation)
- [x] Grant birthright to skills (src/skills/, external)
- [x] Grant birthright to commons (src/commons/, external)
- [x] Clean stale test entries from registry (sync-registry --fix removed 6 stale)
### Phase 3: Drone Discovery
- [x] Verify `drone systems` shows all 15 branches
- [x] Test `drone @backup --help` — FIXED: agent converted 16 files relative→absolute imports
- [x] Test `drone @daemon --help` — FIXED: agent converted 8 files relative→absolute imports
- [x] Test `drone @memory --help` — WORKS
- [x] Test `drone @skills --help` — FIXED: added __main__ block + converted relative→absolute imports
- [x] Test `drone @commons --help` — FIXED: renamed the_commons.py → commons.py (DB init still fails, separate issue)
- [ ] Fix commons DB initialization (ported code, SQLite path issue)
### Phase 4: Wake & Comms
- [x] Send test email to each new citizen (all 5 delivered)
- [x] Verify inboxes receive messages (confirmed all 5)
- [x] Test wake on @memory — agent spawned successfully via dispatch
- [x] Confirm round-trip communication — memory replied to both emails, replies in devpulse inbox.json
- [ ] Fix `drone @ai_mail inbox` display — shows stale cached message, doesn't reflect actual inbox.json content
### Phase 5: Branch Prompts
- [x] Update devpulse local prompt (fixed paths, added all 15 modules with descriptions)
- [x] Fix devpulse passport (builder → manager)
- [ ] Build local prompts for new citizens (backup, daemon, memory, skills, commons)
- [x] Update global prompt branch count (10 → 15)
- [x] Disabled stale aipass_local_prompt.md
## Design Decisions
| Decision | Options | Leaning | Notes |
|----------|---------|---------|-------|
| commons/skills location | Move to src/aipass/ vs keep outside | Keep outside | They're not aipass system apps, they're external projects with their own namespace |
| Citizenship for existing code | spawn create vs spawn passport | passport | Passport adds .trinity/ without touching apps/ |
| Registry cleanup | Manual vs sync-registry --fix | sync-registry --fix | Let spawn's built-in tool handle it |
| Citizen class for ported code | birthright vs builder | builder | All branches with apps/ should be builder — birthright is for identity-only |
| External project scaffolding | spawn update vs manual | manual | spawn update can't reach outside src/aipass/, copy template files manually |
## Relationships
- **Related DPLANs:** None yet
- **Related FPLANs:** None yet
- **Owner branches:** devpulse (coordination), spawn (execution)
## Status
- [x] Planning
- [x] In Progress
- [ ] Ready for Execution
- [ ] Complete
- [ ] Abandoned
## Notes
Session 11. First DPLAN in AIPass. Patrick confirmed: commons and skills are NOT aipass system apps — they live outside src/aipass/ intentionally. Use spawn passport for existing directories to avoid clobbering code.
**Progress:** Phases 1-4 substantially complete. All 15 branches scaffolded as builder class. Wake + round-trip comms verified on @memory and @backup. Phase 5 partial — prompts need building for new citizens.
**Session 12:** Fixed skills (added __main__ + absolute imports), fixed commons routing (renamed entry point), cleaned registry stale entries manually, tested wake dispatch on @memory and @backup — both replied autonomously. Discovered passport was setting birthright instead of builder — fixed all 5, ran spawn update on backup/daemon/memory, manually scaffolded commons/skills. Installed gh CLI. PRs #17, #18, #19 merged.
**Remaining:** Commons DB init fix, ai_mail inbox display bug, branch prompts for new citizens, test registry isolation.
---
*Created: 2026-03-07*
*Updated: 2026-03-07*
@@ -1,129 +0,0 @@
# DPLAN-0002: Prompt Architecture & Standards
Tag: infrastructure
> Design the prompt system so every branch has exactly what it needs — no more, no less — and seedgo can enforce it.
## Vision
Every branch gets a local prompt that orients it instantly. The system prompt (CLAUDE.md) + hook-injected global prompt + branch local prompt work together without duplication. Seedgo has a standard to audit prompt quality. New branches get a prompt template from spawn.
## Current State
- **CLAUDE.md** — lean system prompt (startup, hard rules, navigation, memory, docker). ~30 lines. Good.
- **Hook-injected global prompt** — identity_injector.py injects AIPass system context every turn. Contains terminology, branch structure template, commands, dispatch syntax, hard rules, memories. ~80 lines. Heavy — overlaps with CLAUDE.md.
- **Devpulse local prompt** — rewritten session 14. Lean, operational. Has branch list (needed for orchestrator role). ~55 lines.
- **Other branch prompts** — vary wildly. Some copied from devpulse template, some minimal, some empty. No standard.
- **No seedgo standard** for prompt quality.
- **No spawn template** for local prompts — spawn scaffolds branches but doesn't generate a prompt.
### Key Insight: Three Prompt Layers
| Layer | File | Injected | Purpose |
|-------|------|----------|---------|
| System | `CLAUDE.md` | Every turn (by Claude Code) | Hard rules, startup, navigation |
| Global | Hook output (`identity_injector.py`) | Every turn (by hook) | AIPass context, terminology, commands |
| Local | `.aipass/aipass_local_prompt.md` | Every turn (by hook) | Branch identity, role-specific guidance |
**Problem:** System + Global overlap significantly. Both have commands, rules, structure. That's ~110 lines injected every turn with duplication.
## What Needs Building
### Phase 1: Prompt Templates
- [ ] Define what goes in each layer (system vs global vs local) — no overlap
- [ ] Create local prompt template for **worker branches** (most branches)
- [ ] Create local prompt template for **orchestrator** (devpulse only)
- [ ] Create local prompt template for **infrastructure** branches (drone, prax, seedgo — they serve others)
- [ ] Add template to spawn's scaffold so new branches get a prompt automatically
### Phase 2: Consolidate System + Global
- [ ] Audit overlap between CLAUDE.md and hook-injected global prompt
- [ ] Decide: merge into one, or split responsibilities cleanly
- [ ] Option A: CLAUDE.md has rules + startup, hook has AIPass context (no rules)
- [ ] Option B: Kill CLAUDE.md, put everything in hook (single source)
- [ ] Option C: Kill hook injection, put everything in CLAUDE.md (simpler)
- [ ] Reduce total injected tokens
### Phase 3: Seedgo Standard
- [ ] Add prompt standard to seedgo audit pack (e.g. `prompt_quality`)
- [ ] Checks: file exists, not empty, has Identity section, has Current Context, under max lines
- [ ] Checks: no directory structures (belong in README), no duplicated rules (belong in system prompt)
- [ ] Checks: has @branch address references where needed (orchestrator only)
### Phase 4: Migrate All Branches
- [ ] Audit all 15 branch prompts against the template
- [ ] Rewrite each to match template
- [ ] Run seedgo prompt_quality checker on all
## Design Decisions
| Decision | Options | Leaning | Notes |
|----------|---------|---------|-------|
| System + Global merge | A: split clean / B: merge to CLAUDE.md / C: merge to hook | A | Hook gives dynamic injection, CLAUDE.md is static. Both have value. |
| Branch list in prompts | Devpulse only / All branches / None | Devpulse only | Orchestrator needs awareness. Workers get instructions, don't need full map. |
| Prompt max lines | 30 / 50 / 80 | 50 | Worker branches ~30, orchestrator ~55, infra ~40. Ceiling at 80. |
| Seedgo enforcement | Advisory / Blocking | Advisory first | Start with checklist, not gate. Tighten later. |
| Local prompt sections | Fixed template / Flexible | Fixed core + flexible extras | Identity + How You Work + Current Context required. Rest optional per role. |
### What Goes Where
| Content | Layer | Why |
|---------|-------|-----|
| Startup protocol | System (CLAUDE.md) | Universal, rarely changes |
| Hard rules (imports, paths) | System (CLAUDE.md) | Universal, authoritative |
| Memory update guidance | System (CLAUDE.md) | Universal behavior |
| AIPass terminology | Global (hook) | Context, not rules |
| Branch structure template | Global (hook) | Shows what a branch looks like |
| Command reference | Global (hook) | Available to all, operational |
| Dispatch syntax | Global (hook) | Operational pattern |
| Branch identity/role | Local | Unique per branch |
| Branch-specific commands | Local | What THIS branch does |
| Branch list (15) | Local (devpulse only) | Orchestrator needs it |
| Current context/session | Local | Unique per branch |
### Worker Branch Template (draft)
```
# {BRANCH} — Branch Prompt
## Identity
You are {BRANCH} — {one-line role}. {What you do, what you don't do.}
## Your Commands
{Branch-specific commands from --help, just the key ones}
## How You Work
{Role-specific operational guidance — 3-5 bullets}
## Current Context (Session N)
**Date:** YYYY-MM-DD
{Active work, blockers, recent changes}
```
## Ideas
- Could generate prompt health report: `drone @seedgo prompt-audit` showing all branches, line counts, missing sections
- Prompt version tracking — when template changes, detect stale prompts across branches
- "Prompt diff" tool — compare branch prompt against template, show gaps
- Dynamic section injection — hook could inject inbox count, active plans, etc. (already does email count)
## Relationships
- **Related DPLANs:** DPLAN-0001 (system bootstrap — prompts are part of bootstrap)
- **Related FPLANs:** Will spawn FPLANs for Phase 2 (consolidation) and Phase 4 (migration)
- **Owner branches:** @devpulse (design), @seedgo (standard), @spawn (template)
## Status
- [x] Planning
- [ ] In Progress
- [ ] Ready for Execution
- [ ] Complete
- [ ] Abandoned
## Notes
- Session 14: Discovered prompt vs memory distinction through Patrick's feedback. "Prompts are signposts, memories are knowledge." Every-turn injection must be minimal.
- The hook-injected global prompt is the biggest opportunity — it's ~80 lines injected every single turn across every branch. Reducing that by even 30% saves significant tokens per session.
- Patrick's key insight: "branches take instructions from devpulse — they don't need the full map, just their own commands and identity."
---
*Created: 2026-03-08*
*Updated: 2026-03-08*
@@ -1,194 +0,0 @@
# FPLAN-001 - AIPass Path Rewire & Portability Fix (MASTER PLAN)
**Created**: 2026-03-06
**Branch**: src/aipass/devpulse
**Status**: Phase 5 (Final Verification)
**Type**: Master Plan (Multi-Phase)
**Reference**: DPLAN-047 (Path.home() Purge)
---
## Project Overview
### Goal
All 10 AIPass modules import cleanly on ANY system. Zero filesystem assumptions. Code runs after `pip install -e .` on Mac, Linux, CI runners, Docker — anywhere.
### CRITICAL: This is a Public Pip Package
AIPass is a PUBLIC pip package installable on ANY machine. There is NO `/home/aipass`. There is NO `aipass_core` directory. There is NO `.venv` at a known location. None of that exists outside Dev-Pass (the private source repo).
**Dev-Pass vs AIPass confusion is the #1 risk.** Code was ported from Dev-Pass where `/home/aipass` and `aipass_core` are real paths. Here, they are ghosts that crash on import.
### Only Valid Path Patterns
```python
# 1. Package-relative (where the code lives)
Path(__file__).resolve().parents[N]
# 2. Walk-up to repo root (finds AIPASS_REGISTRY.json)
def _find_repo_root() -> Path:
current = Path(__file__).resolve().parent
for parent in [current] + list(current.parents):
if (parent / "AIPASS_REGISTRY.json").exists():
return parent
return Path.cwd()
# 3. User's working directory
Path.cwd()
```
**Everything else is Dev-Pass baggage and MUST be removed or rewired.**
### Seedgo Standards Adjustment
Seedgo standards were built for Dev-Pass. Standards that don't align with public pip package reality MUST be adjusted:
- Shebang requirements: REMOVED (irrelevant for pip packages)
- `/home/aipass` reference paths in standards content: must be updated
- Any standard assuming filesystem structure beyond the package itself
### Reference Documentation
- `DPLAN-047_path_home_purge_portability_2026-03-06.md` (repo root)
- `docs/sub_agent_drops/path_home_audit.md` (full audit from session 1)
- `spawn/templates/agent.template/` (reference for correct patterns)
### Success Criteria
1. `pip install -e .` clean
2. All module top-level imports work (`from aipass.{module} import ...`)
3. `drone systems` shows 10 branches
4. `drone @seedgo verify` passes
5. `drone @seedgo audit aipass` runs without import crashes
6. Zero `Path.home()` or `/home/aipass` in functional code (comments/docstrings updated too)
7. Zero `aipass_core` references in functional code
---
## What We're Cleaning Up
This is a cleanup of Dev-Pass baggage. The code was ported from a private system that assumes `/home/aipass/aipass_core/` exists. We're making it universal.
### Fix Categories
1. **FUNCTIONAL** — `Path.home()`, `Path("/home/aipass/...")`, `aipass_core` in actual code logic → MUST fix or code crashes
2. **COMMENTS/DOCSTRINGS** — References to `/home/aipass` in documentation strings → Update to reflect package-relative reality
3. **STRING COMPARISONS** — Code checking for `aipass_core` in path parts → Adapt to new structure (`src/aipass/`)
### Fix Pattern
```python
# WRONG — Dev-Pass patterns (CRASH on any other system)
AIPASS_ROOT = Path.home() / "aipass_core"
ECOSYSTEM_ROOT = Path("/home/aipass")
SYSTEM_LOGS_DIR = Path("/home/aipass/system_logs")
# RIGHT — Package-relative
MODULE_ROOT = Path(__file__).resolve().parents[N] # N = depth to module root
# RIGHT — Walk-up finder (proven in drone/seedgo)
def _find_repo_root() -> Path:
current = Path(__file__).resolve().parent
for parent in [current] + list(current.parents):
if (parent / "AIPASS_REGISTRY.json").exists():
return parent
return Path.cwd()
# RIGHT — Logs go in package-relative location
LOGS_DIR = Path(__file__).resolve().parents[3] / "logs"
```
---
## Phase Definitions
### Phase 1: Safe Modules (drone, cli, spawn, devpulse) — COMPLETE
**Goal:** Fix LOW severity modules
**Result:** drone (2 files), cli (12 files), spawn (4 files) — all verified clean
**Remaining:** drone/config.py has 1 Path.home() for registry (quick fix), cli/__init__.py has 1 string comparison (cosmetic)
### Phase 2: Prax — COMPLETE
**Goal:** `from aipass.prax import logger` works AND deeper handler imports don't crash
**Scope:** ~47 hits across functional code, comments, and string comparisons. Key files: introspection.py (14), branch_detector.py (8), monitor_module.py (6), setup.py (5), log_watcher.py (4)
**Result:** 16 files functional fixes + 17 files comments/docstrings updated. All imports verified.
**Critical:** Unblocks all other modules since they import prax
### Phase 3: Trigger + Flow — COMPLETE
**Goal:** Fix CRITICAL import-time crashes + all Dev-Pass path references
**Scope:** trigger (~50 hits), flow (~70 hits). CRITICAL: plan_file.py ECOSYSTEM_ROOT, registry_monitor.py ECOSYSTEM_ROOT
**Result:** Trigger 23 files fixed, flow 37 files fixed. All CRITICAL crashes resolved.
**Parallel:** Yes, 2 agents
### Phase 4: AI Mail + API — COMPLETE
**Goal:** Fix the heaviest modules
**Scope:** ai_mail (~80 hits), api (~70 hits). CRITICAL: ai_mail/registry/read.py, api/log_streamer.py
**Result:** ai_mail 37 files fixed, api 35 files fixed. All CRITICAL crashes resolved.
**Parallel:** Yes, 2 agents
### Phase 5: Seedgo Standards + Verification — IN PROGRESS
**Goal:** Fix seedgo's own Dev-Pass references + full system test
**Scope:** ~60 hits in seedgo standards content (reference strings pointing to /home/aipass/standards/). Remove shebang standard. Update all reference paths. Run full import + drone verification.
**Critical:** Seedgo standards must reflect the public pip package reality
**Progress:**
- Seedgo standards: 30 files updated (Dev-Pass reference paths)
- Shebang standard: CREATED (new SHEBANG check that fails files with shebangs)
- Shebangs stripped: 205 files cleaned codebase-wide
- Meta docs: aligned to match checker format
- 4 bare import violations: FIXED
- Full verification: All 10 modules import clean, `drone systems` works
- Remaining: Running `seedgo audit` for final violations
---
## Phase Tracking
### Phase 1: Safe Modules
- **Status:** COMPLETE
- **Agents:** 4 (drone, cli, spawn, devpulse)
- **Result:** All verified clean. Minor residual hits (drone config.py, cli __init__.py)
### Phase 2: Prax
- **Status:** COMPLETE
- **Agents:** 1
- **Result:** 16 files functional fixes, 17 files comments/docstrings. All imports verified.
### Phase 3: Trigger + Flow
- **Status:** COMPLETE
- **Agents:** 2
- **Result:** Trigger 23 files, flow 37 files. All CRITICAL import crashes fixed.
### Phase 4: AI Mail + API
- **Status:** COMPLETE
- **Agents:** 2
- **Result:** ai_mail 37 files, api 35 files. All CRITICAL import crashes fixed.
### Phase 5: Seedgo Standards + Verification
- **Status:** IN PROGRESS
- **Agents:** 2 (1 for seedgo cleanup, 1 for final verification)
- **Progress:** 30 seedgo files updated, shebang standard created, 205 shebangs stripped, 4 bare imports fixed. All 10 modules import clean. Remaining: final seedgo audit pass.
---
## Issues Log
| Phase | Issue | Severity | Attempted | Status |
|-------|-------|----------|-----------|--------|
| 2 | Prax agent lost during session compaction | LOW | Retry deployed | RESOLVED |
| 3 | trigger/plan_file.py ECOSYSTEM_ROOT crash | CRITICAL | Phase 3 | RESOLVED |
| 3 | flow/registry_monitor.py ECOSYSTEM_ROOT crash | CRITICAL | Phase 3 | RESOLVED |
| 4 | ai_mail/registry/read.py import crash | CRITICAL | Phase 4 | RESOLVED |
| 4 | api/log_streamer.py import crash | CRITICAL | Phase 4 | RESOLVED |
| 5 | 4 bare import violations (missing aipass. prefix) | HIGH | Phase 5 | RESOLVED |
| 5 | 205 files with shebangs (irrelevant for pip pkg) | MEDIUM | Phase 5 | RESOLVED |
| 5 | Seedgo standards referencing Dev-Pass paths | HIGH | Phase 5 | RESOLVED |
| 5 | Final seedgo audit for remaining violations | MEDIUM | In progress | OPEN |
---
## Notes
- **PUBLIC PIP PACKAGE** — This is the core principle. Zero filesystem assumptions. Works on any machine.
- **Dev-Pass confusion is the #1 risk** — All code was ported from a system where /home/aipass exists. Be vigilant.
- Seedgo standards built for Dev-Pass MUST be adjusted: shebang standard removed, reference paths updated
- Shebangs are IRRELEVANT for pip packages — don't waste time on them, focus on functional path violations
- Some modules reference Dev-Pass infrastructure (AI_CENTRAL, MEMORY_BANK, telegram) — guard or remove
- 2-attempt rule: if a fix breaks something, note it and move on
- Comments/docstrings referencing /home/aipass should be updated too — clean break from Dev-Pass
---
## Definition of Done
All 5 success criteria pass in Docker container.