# Agentic Memory Archive

> Archive solved work with Agentic Memory context by wrapping the imported agentic-memory-compound skill without modifying imported knowledge-plugin skills.

- Skill: `dolphinai2026/agentic-memory-archive` (Agent Skill)
- Install (CLI): `npx skillmds@latest add dolphinai2026/agentic-memory-archive`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dolphinai2026/agentic-memory-archive/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: dolphinai2026 (https://skillmd.com/u/dolphinai2026)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dolphinai2026/agentic-memory-archive

---


# Agentic Memory Archive Adapter

Use this skill when archiving solved work into `docs/solutions/`. This is the
single entry point for all `agentic-memory-compound` invocations, including
inline changes that have no spec, plan, or attempt anchor.

For CLI usage, use `agentic-archive` to collect Agentic Memory archive context
for the current project before compounding.

This is an Agentic Coding owned adapter. Do not edit imported skills:

- `agentic-memory-compound`
- `agentic-memory-refresh`
- `agentic-memory-sessions`

## Workflow

1. Resolve the target work from explicit arguments when provided:
   - `--spec-id <id>`
   - `--spec <path>`
   - `--plan <path>`
2. Run `agentic-memory archive-context --format json` with the same target arguments. If a global command is missing, run `agentic-fix` or use the project setup flow to install the global wrapper before invoking this skill.
3. Parse the JSON:
   - `spec_id`
   - `confidence`
   - `context`
4. If the command fails, continue with imported `agentic-memory-compound` and report that memory context was unavailable. Inline work with no spec, plan, or attempt anchor always lands here — `archive-context` cannot resolve an identity without an anchor. That is an expected path, not an error: do not search for a spec to attach, invoke compound directly (full mode for inline learnings), and skip `mark-archived` in step 8.
5. Invoke the imported `agentic-memory-compound` skill with the memory context as supplementary evidence.
6. Enforce the target project's solution path contract before accepting the output:
   - Read root project instructions such as `AGENTS.md` or `CLAUDE.md`.
   - If they define a project-specific `docs/solutions/` layout, that layout overrides imported `agentic-memory-compound` category mapping.
   - In this repository, normalize the output path to `docs/solutions/{level}/{module}/{filename}.md`.
   - Treat `docs/solutions/<category>/<filename>.md` as a temporary imported-skill suggestion when it does not satisfy the project path contract; move or rewrite the output before reporting success.
7. After compound completes and any path normalization is done, collect created or updated `docs/solutions/**/*.md` paths from the compound final report.
8. If `confidence` is `high` or `medium` and at least one output path exists, run:

   ```bash
   agentic-memory mark-archived --spec-id <spec_id> --source skill:agentic-memory-archive --output <path> [--output <path> ...]
   ```

9. If confidence is `low`, or no output paths are available, do not run `mark-archived`; report the exact follow-up command if it can be constructed.
10. If the current directory is a Git-managed repository, auto-commit knowledge outputs after knowledge deposition is complete:
   - Commit only repo-local knowledge files created or updated by this skill, normally `docs/solutions/` Markdown files plus directly related repo-owned knowledge references if the final report names them.
   - Confirm each path is inside the current repository before staging it.
   - Use `git add -- <path...>` followed by `git commit` with a concise docs message such as `docs: archive agentic memory knowledge`.
   - Do not push. Do not merge. Do not stage unrelated files.
   - If there are no repo-local knowledge files, the repository is not Git-managed, or the changed paths cannot be safely attributed to this archive run, skip the commit and report the reason.

## Memory Context Contract

Treat the returned context as supplementary evidence. Current conversation, verified code changes, and repository files take priority.

## Path Contract

Project instruction files are authoritative for the physical location of `docs/solutions/` outputs. Imported `agentic-memory-compound` category mapping remains useful for frontmatter and search classification, but it is not authoritative when the target repository defines a stricter layout.

For this repository, archive outputs must use:

```text
docs/solutions/{level}/{module}/{filename}.md
```

Examples:

- L1 architecture or roadmap knowledge: `docs/solutions/l1/arch/<topic>.md` or `docs/solutions/l1/roadmap/<topic>.md`
- L2 module knowledge: `docs/solutions/l2/{module}/<topic>.md`
- L3 detailed workflow, bug, task, API, or implementation learning: `docs/solutions/l3/{module}/<topic>.md`

## Output

End with:

- archive file path(s);
- whether memory context was used;
- whether `mark-archived` ran;
- whether the repo-local knowledge files were auto-committed or why the skill skipped the commit;
- any follow-up command needed when marking was skipped.

