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.
1---2name: agentic-memory-archive3description: Archive solved work with Agentic Memory context by wrapping the imported agentic-memory-compound skill without modifying imported knowledge-plugin skills.4---56# Agentic Memory Archive Adapter78Use this skill when archiving solved work into `docs/solutions/`. This is the9single entry point for all `agentic-memory-compound` invocations, including10inline changes that have no spec, plan, or attempt anchor.1112For CLI usage, use `agentic-archive` to collect Agentic Memory archive context13for the current project before compounding.1415This is an Agentic Coding owned adapter. Do not edit imported skills:1617- `agentic-memory-compound`18- `agentic-memory-refresh`19- `agentic-memory-sessions`2021## Workflow22231. Resolve the target work from explicit arguments when provided:24 - `--spec-id <id>`25 - `--spec <path>`26 - `--plan <path>`272. 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.283. Parse the JSON:29 - `spec_id`30 - `confidence`31 - `context`324. 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.335. Invoke the imported `agentic-memory-compound` skill with the memory context as supplementary evidence.346. Enforce the target project's solution path contract before accepting the output:35 - Read root project instructions such as `AGENTS.md` or `CLAUDE.md`.36 - If they define a project-specific `docs/solutions/` layout, that layout overrides imported `agentic-memory-compound` category mapping.37 - In this repository, normalize the output path to `docs/solutions/{level}/{module}/{filename}.md`.38 - 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.397. After compound completes and any path normalization is done, collect created or updated `docs/solutions/**/*.md` paths from the compound final report.408. If `confidence` is `high` or `medium` and at least one output path exists, run:4142 ```bash43 agentic-memory mark-archived --spec-id <spec_id> --source skill:agentic-memory-archive --output <path> [--output <path> ...]44 ```45469. 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.4710. If the current directory is a Git-managed repository, auto-commit knowledge outputs after knowledge deposition is complete:48 - 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.49 - Confirm each path is inside the current repository before staging it.50 - Use `git add -- <path...>` followed by `git commit` with a concise docs message such as `docs: archive agentic memory knowledge`.51 - Do not push. Do not merge. Do not stage unrelated files.52 - 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.5354## Memory Context Contract5556Treat the returned context as supplementary evidence. Current conversation, verified code changes, and repository files take priority.5758## Path Contract5960Project 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.6162For this repository, archive outputs must use:6364```text65docs/solutions/{level}/{module}/{filename}.md66```6768Examples:6970- L1 architecture or roadmap knowledge: `docs/solutions/l1/arch/<topic>.md` or `docs/solutions/l1/roadmap/<topic>.md`71- L2 module knowledge: `docs/solutions/l2/{module}/<topic>.md`72- L3 detailed workflow, bug, task, API, or implementation learning: `docs/solutions/l3/{module}/<topic>.md`7374## Output7576End with:7778- archive file path(s);79- whether memory context was used;80- whether `mark-archived` ran;81- whether the repo-local knowledge files were auto-committed or why the skill skipped the commit;82- any follow-up command needed when marking was skipped.