| name | agentic-memory-archive |
| description | Archive solved work with Agentic Memory context by wrapping the imported agentic-memory-compound skill without modifying imported knowledge-plugin skills. |
| argument-hint | [optional: --spec-id ID | --spec PATH | --plan PATH] [optional compound context] |
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
-
Resolve the target work from explicit arguments when provided:
--spec-id <id>
--spec <path>
--plan <path>
-
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.
-
Parse the JSON:
spec_id
confidence
context
-
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.
-
Invoke the imported agentic-memory-compound skill with the memory context as supplementary evidence.
-
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.
-
After compound completes and any path normalization is done, collect created or updated docs/solutions/**/*.md paths from the compound final report.
-
If confidence is high or medium and at least one output path exists, run:
agentic-memory mark-archived --spec-id <spec_id> --source skill:agentic-memory-archive --output <path> [--output <path> ...]
-
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.
-
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:
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.