Architecture decision and design pattern persistence. Use when preserving architectural context across sessions or creating design handoffs. Trigger with session start.
npx claudepluginhub emasoft/emasoft-plugins --plugin emasoft-architect-agentThis skill uses the workspace's default tool permissions.
This skill defines how the Architect agent (EAA) handles session memory and context persistence. Session memory ensures that architecture decisions, design patterns, technology choices, and discovered constraints survive across multiple sessions, preventing loss of critical design context and enabling seamless session continuity.
README.mdreferences/op-create-handoff.mdreferences/op-load-session-state.mdreferences/op-record-constraint.mdreferences/op-record-decision.mdreferences/op-record-open-question.mdreferences/op-record-pattern.mdreferences/op-record-stack-choice.mdreferences/op-resume-from-handoff.mdreferences/record-keeping-formats.mdManages persistent memory across sessions with .claude/memory/ for state and .ai/ for architecture/patterns. Guides scratchpad updates, session workflows, and live docs.
Manages cross-session handoff, durable learning, and memory persistence by storing session logs, decisions, patterns, and project context in .claude/memory/. Internal for session/memory workflows only.
Persists architectural decisions, conventions, and progress across sessions by auto-saving to .rune/ files. Loads state at session start for continuity when skills establish patterns.
Share bugs, ideas, or general feedback.
This skill defines how the Architect agent (EAA) handles session memory and context persistence. Session memory ensures that architecture decisions, design patterns, technology choices, and discovered constraints survive across multiple sessions, preventing loss of critical design context and enabling seamless session continuity.
The Architect role involves deep analysis and iterative refinement of designs. Without session memory, each new session would start from zero, forcing re-discovery of decisions already made. This skill provides the mechanisms to persist and retrieve architectural context.
Session memory serves four critical functions for the Architect agent:
| Function | Description |
|---|---|
| Decision Preservation | Architecture decisions and their rationale persist across sessions |
| Context Continuity | Design patterns, technology choices, and constraints are not lost |
| Handoff Enablement | Complete context can be transferred to other agents or sessions |
| Progress Tracking | Open questions and pending decisions are tracked explicitly |
docs_dev/design/, .claude/)When to persist:
Copy this checklist and track your progress:
.claude/eaa-session-state.local.mddocs_dev/design/index.jsondocs_dev/design/decisions/patterns.md when pattern is selectedstack.md when technology is chosenconstraints.md when constraint is discoveredopen-questions.md when question arises| Output Type | Location | Purpose |
|---|---|---|
| Architecture Decisions | docs_dev/design/decisions/ADR-NNN-*.md | Document each decision with rationale and alternatives |
| Design Patterns | docs_dev/design/patterns.md | Track patterns applied to system |
| Technology Stack | docs_dev/design/stack.md | Record technology choices |
| Constraints Registry | docs_dev/design/constraints.md | Track discovered constraints |
| Open Questions | docs_dev/design/open-questions.md | Track unresolved questions |
| Session State | .claude/eaa-session-state.local.md | Current session context |
| Design Index | docs_dev/design/index.json | Quick lookup of all artifacts |
| Handoff Documents | docs_dev/design/handoffs/handoff-{timestamp}.md | Context transfer documents |
The Architect agent MUST persist the following categories of information:
Every architecture decision that affects system structure or behavior.
Required fields for each decision:
Example decision types:
All design patterns selected for the system architecture.
Required fields for each pattern:
Pattern categories:
All technology choices that form the implementation foundation.
Required fields for each technology choice:
All constraints discovered during design analysis.
Required fields for each constraint:
Constraint types:
All unresolved questions requiring future decisions.
Required fields for each open question:
All session memory is persisted to file-based storage in the project directory:
| Content Type | Location | Format |
|---|---|---|
| Architecture decisions | docs_dev/design/decisions/ | Markdown files |
| Design patterns | docs_dev/design/patterns.md | Markdown |
| Technology stack | docs_dev/design/stack.md | Markdown |
| Constraints registry | docs_dev/design/constraints.md | Markdown |
| Open questions | docs_dev/design/open-questions.md | Markdown |
| Session state | .claude/eaa-session-state.local.md | YAML frontmatter + Markdown |
| Handoff documents | docs_dev/design/handoffs/ | Markdown files |
Memory retrieval is triggered by state changes, not by time intervals:
| Trigger | Condition | Action |
|---|---|---|
| Session Start | New Claude Code session begins | Load session state and design index |
| Design Work Request | Receiving a design request | Retrieve relevant decisions, constraints, and questions |
| Architecture Decision Needed | Design choice requires explicit decision | Retrieve existing decisions and constraints |
| Design Review Request | Design document submitted for review | Verify consistency with decisions and constraints |
| Handoff Creation Request | Session handoff needed | Package complete session context |
Memory updates are triggered by state changes in the design process:
| Trigger | Condition | Action |
|---|---|---|
| Architecture Decision Made | New architecture decision finalized | Create decision record, update index |
| Design Pattern Selected | Pattern chosen for component/module | Add pattern entry, update index |
| Technology Stack Choice Made | Technology selected for stack | Add entry to stack.md |
| Constraint Discovered | New constraint identified | Add to constraints.md, update index |
| Open Question Identified | Question arises that cannot be resolved | Add to open-questions.md |
| Open Question Resolved | Previously open question resolved | Update status to RESOLVED |
| Session State Change | Any significant session activity | Update session state file |
Handoff documents enable session continuity across context clears or agent transitions.
Create a handoff document when:
| Type | Purpose | Target |
|---|---|---|
session_continuity | Continue work in new session | Future EAA session |
orchestrator_handoff | Design approved, ready for implementation | EOA (via EAMA) |
context_clear | Save state before context window reset | Future EAA session |
Location: docs_dev/design/handoffs/handoff-{timestamp}.md
Sections:
| Error | Cause | Solution |
|---|---|---|
| Session state file not found | First session or file deleted | Initialize new session state file |
| Design index corrupted | Manual edit or system error | Regenerate index from decision files |
| Handoff document incomplete | Interrupted creation | Re-run handoff creation procedure |
| Decision file missing | Referenced but not found | Check file path, restore from backup if available |
| Constraint ID conflict | Duplicate ID generated | Use higher sequence number, update index |
EAA: Checking for existing session state...
Found: .claude/eaa-session-state.local.md
Session ID: eaa-session-20260203-091500
Last Activity: architecture_decision_made
Decisions: 4
Constraints: 6
Open Questions: 2
Loading design index...
Index loaded: 4 decisions, 2 patterns, 6 constraints, 2 open questions
Context retrieved. Active design: design-payments-xyz789
Current phase: architecture
Next recommended action: Resolve OQ-002 (Payment processor selection)
Ready to continue design work.
EAA: Recording architecture decision...
Creating: docs_dev/design/decisions/ADR-005-session-storage.md
---
id: ADR-005
title: Session Storage Selection
status: ACCEPTED
date: 2026-02-04
---
# ADR-005: Session Storage Selection
## Decision
Use Redis for session storage with 24-hour TTL.
## Rationale
- High read/write performance for session data
- Built-in expiration support
- Cluster mode for horizontal scaling
- Team familiarity with Redis
## Alternatives Considered
- PostgreSQL sessions: Rejected due to higher latency
- In-memory sessions: Rejected due to no horizontal scaling
## Impact
- Affects: auth-module, user-service
- Requires: Redis cluster setup in infrastructure
---
Updating design index... Done.
Updating session state... Done.
Decision ADR-005 recorded. Session state: 5 decisions, 6 constraints, 2 open questions.
EAA: Creating handoff document for context preservation...
Gathering session context:
- Session ID: eaa-session-20260204-120000
- Decisions made: 3 (ADR-003, ADR-004, ADR-005)
- Constraints discovered: 1 (CON-007)
- Open questions: 1 resolved, 1 remaining
Generating handoff document...
Saved: docs_dev/design/handoffs/handoff-20260204-143022.md
Handoff document created. Type: context_clear
To resume: Read handoff document at docs_dev/design/handoffs/handoff-20260204-143022.md
Session state updated with handoff reference.
Ready for context clear.
Detailed reference documentation for session memory operations:
| Reference | Description |
|---|---|
| record-keeping-formats.md | Session record-keeping formats and file structure specifications |
| Resource | Location |
|---|---|
| Session state file | .claude/eaa-session-state.local.md |
| Design index | docs_dev/design/index.json |
| Decisions directory | docs_dev/design/decisions/ |
| Patterns registry | docs_dev/design/patterns.md |
| Technology stack | docs_dev/design/stack.md |
| Constraints registry | docs_dev/design/constraints.md |
| Open questions | docs_dev/design/open-questions.md |
| Handoff documents | docs_dev/design/handoffs/ |