Self-Improving Agent
Use this skill after a workflow task has completed review in this Android repository. It extracts reusable lessons, writes them into the skill's own memory/, and recommends whether a follow-up docs/skills workflow should adopt those lessons.
Purpose
- Extract one structured episode from the current workflow's active task state file,
Execution Contract,Evidence, andGaps - Identify reusable workflow / docs / skills lessons and turn them into candidate patterns
- Maintain repo-local memory instead of taking over active workflow state
- Recommend an adoption path without directly modifying other rule assets
When To Use
Use this skill when:
ac-reviewhas completed and the task is moving into summary- Repeated mistakes, repeated unfreezes, cross-document drift, or recurring validation gaps appear
- Review has produced stable lessons worth turning into checklist or rule suggestions
- The user explicitly asks for a retrospective, self-improvement, or skill improvement
Do not use this skill when:
ac-reviewhas not happened yet- The task is still in
ac-execute - The signal is one-off noise with no reusable lesson
- Someone is trying to use it as a background auto-corrector or auto-submission pipeline
Inputs
Required inputs:
.agents/state/INDEX.md- the active task state file under
.agents/state/tasks/ AGENTS.md.agents/skills/ac-workflow/SKILL.md.agents/skills/ac-memory/SKILL.md.agents/skills/ac-plan/SKILL.md.agents/skills/ac-execute/SKILL.md.agents/skills/ac-review/SKILL.md
Optional inputs:
- Files listed in the current
Execution Contract - Related
docs/*.mdfiles or targetSKILL.mdfiles when the task touches workflow / docs / skills assets
Primary evidence sources:
Key decision logEvidenceGapsExecution Contract- Actual changed files
Process
- Confirm review is complete.
- If the active task state file does not contain enough
EvidenceorGaps, stop and return to the caller.
- Extract one episode.
- Task type
- Route (
single/single + reviewer/planner -> executor -> reviewer) - Key files
- Key decisions
- Checks that actually ran
- Residual risks
- Evaluate reusable knowledge.
- Generate a candidate pattern only when:
- The same class of issue repeats
- A rule omission caused rework or confusion
- A clear cross-document inconsistency was found
- A checklist improvement has sufficient evidence behind it
- Persist only self-owned memory.
- Write to
memory/episodes/YYYY/YYYY-MM-DD-<slug>.json - Update
memory/pattern-candidates.json - Update
memory/working/latest-summary.md - Update
memory/semantic-patterns.jsononly when a pattern is validated
- Recommend adoption path.
nonemanual-reviewstart-docs-workflow
Outputs
Episode
Record one structured retrospective for a workflow task, including at least:
- Task summary
- Route
- Changed files
- Decisions and evidence
- Residual risks
- Related candidate patterns
Candidate Patterns
Each candidate pattern must include at least:
idtitlesummaryconfidenceevidence_sourcesuggested_targetsadoption_status
Learning Summary
Output a short user-facing summary that includes:
- What was learned
- Why it is reusable
- Which files are the suggested targets
- Whether another docs/skills workflow is recommended
Hard Rules
- Do not modify
AGENTS.md,.agents/state/INDEX.md, active task state files,docs/*.md, or other skills directly. - Do not auto-commit, auto-push, or auto-create PR.
- Do not invent evidence that is not present in the active task state file or changed files.
- Do not generalize from one-off noise.
- Treat the active task state file as the workflow source of truth for the current task.
- If adoption requires repo rule changes, ask for a separate docs/skills workflow task.
Pattern Quality Bar
A candidate pattern must meet all of the following:
- Clear provenance
- A problem statement and solution that can be restated plainly
- Clear applicability boundaries
- A mapping to concrete target files
- No conflict with current
AGENTS.mdorac-*workflow rules
Suggested Targets In This Repo
Prioritize these assets in this repository:
AGENTS.md.agents/skills/ac-workflow/SKILL.md.agents/skills/ac-memory/SKILL.md.agents/skills/ac-plan/SKILL.md.agents/skills/ac-execute/SKILL.md.agents/skills/ac-review/SKILL.mddocs/*.mdin the workflow / review / template area
See Also
references/integration.mdreferences/appendix.mdmemory/semantic-patterns.jsonmemory/pattern-candidates.json