Files
flights_web/docs/agent-memory

Agent Memory And Prompt Evolution

This directory is the shared, reviewed memory layer for Pi-driven work on Aeroflot Flights Web.

The design follows a three-layer pattern:

  • Raw observations: local, append-only session notes and error/fix snippets. Keep private runtime files under .agent-memory/raw/.
  • Compiled memory: reviewed, structured Markdown under docs/agent-memory/.
  • Schema and workflows: .crew/agents/, .crew/workflows/, .pi/prompts/, and this README define how memory is captured, queried, and used to improve prompts.

Do not store secrets, API keys, customer data, credentials, or full private transcripts. Prefer short, sanitized lessons with enough evidence to reproduce the issue.

Daily Log Format

Daily entries live in docs/agent-memory/daily/YYYY-MM-DD.md when they are safe to share with the project.

# Daily Agent Memory: YYYY-MM-DD

## Sessions

### Session HH:MM - short-title

**Context:** One sentence about the work.

**Manual Prompts Worth Preserving:**
- Prompt or prompt pattern that improved results.

**Errors And Fixes:**
- Symptom:
- Cause:
- Fix:
- Evidence:

**Decisions Made:**
- Decision and rationale.

**Lessons Learned:**
- Stable lesson, not a one-off accident.

**Prompt/Agent Candidates:**
- Candidate update:
- Target file:
- Confidence:

Compiled Knowledge

  • index.md is the catalog. Read it first.
  • concepts/ contains stable lessons, preferences, project conventions, and recurring gotchas.
  • connections/ links multiple concepts or workflows.
  • qa/ stores useful answers that should compound into future work.
  • prompt-evolution/ stores proposed prompt and workflow changes before they are applied.
  • prompt-change-log.md records accepted prompt, agent, and workflow changes.

Guardrails

  • Memory can suggest prompt changes; it must not silently rewrite prompts.
  • Prompt changes require a critic/reviewer pass and /team-validate.
  • Commit prompt changes on a feature branch.
  • Prefer small, testable prompt changes over broad rewrites.
  • If a lesson is only true for one feature, store it with that scope.
  • If evidence is weak, classify it as hypothesis, not rule.