Files
APAW/.kilo/rules/session-persistence.md
NW f01e2064fb feat(evolution): Kilo Code release sync & APAW system hardening (v2026-05-07)
Security & Permissions:
- All 30 agents: task[*]=deny, task[subagent]=deny (cascade prevention)
- orchestrator & release-manager: bash=ask (hardening)
- New .kilo/rules/subagent-security.md with audit rules
- Updated .kilo/rules/global.md with Security & Permissions section
- Updated .kilo/agents/orchestrator.md with Security Enforcement block

Session Management:
- New .kilo/rules/session-persistence.md (checkpoint format, worktree isolation)
- Updated .kilo/rules/branch-strategy.md (worktree per agent)
- pipeline-runner.ts: Checkpoint interface + save/load/resume methods

Plan Persistence:
- Updated .kilo/rules/lead-developer.md (plan handover section)

Per-Agent Reasoning:
- capability-index.yaml: reasoning_effort for all 30 agents (xhigh/high/medium/low)

MCP Cleanup:
- New .kilo/skills/docker-security/SKILL.md (--rm, orphaned process cleanup)

Config Validation:
- Updated .kilo/rules/docker.md (startup checks, commit scoping, location awareness)

Docs:
- README.md: v2026-05-07 evolution badges
- .kilo/EVOLUTION_LOG.md: Entry #6 with full metrics
- .gitignore: ignore dist/ + bun.lock

Gitea: Milestone #66, Issues #91-#98
Architect: 9/9 sections fresh (express project type)
2026-05-08 18:54:08 +01:00

30 lines
1.3 KiB
Markdown

# Session Persistence & Checkpoint Rules
## Session State Preservation
1. After each pipeline phase completes, the orchestrator MUST write a checkpoint to `.kilo/logs/checkpoints/{issue}-{phase}.json`.
2. The checkpoint JSON must contain:
- `issue_number`
- `phase` (e.g., `designing`, `testing`, `implementing`)
- `agent_name`
- `files_modified`
- `status` (`success`, `fail`, `blocked`)
- `timestamp` (ISO 8601)
- `next_agent`
3. If the pipeline is interrupted (orchestrator restart), the orchestrator MUST read the latest checkpoint and resume from the next phase instead of restarting.
## Session Fork
1. Before any agent that performs destructive edits (`lead-developer`, `the-fixer`, `frontend-developer`), the orchestrator SHOULD create a git stash or worktree to allow rollback.
2. The stash/worktree name format: `checkpoint/{issue}-{agent}-{timestamp}`.
## Diff Viewer
1. After any edit tool execution, the orchestrator MUST log the diff to `.kilo/logs/diffs/{issue}-{agent}.patch`.
2. Diff files are available for per-file revert decisions.
## Worktree Isolation
1. Each agent task SHOULD run in its own git worktree when the agent performs file edits.
2. Worktrees are created under `.kilo/worktrees/{issue}/{agent}/`.
3. After task completion, worktree is merged back or discarded based on checkpoint status.