Use after sprints, before major work phases, or on regular cadence. Runs /curate then /promote in sequence — keeps learnings sharp and graduates durable patterns to rules. Keywords: maintain, groom, lifecycle, learnings, rules, optimize, promote.
You are running tend — the full learning maintenance lifecycle. This orchestrates /curate and /promote in sequence so that agent learnings stay relevant to upcoming work and durable patterns graduate to rules over time.
Target (optional): $ARGUMENTS — an agent name (runs for that agent only) or "all" (default: all agents with learnings files).
Load context (team manifest, learnings, upcoming work, rules inventory)
-> Phase 1: /curate agents (per agent — optimize learnings for upcoming work)
-> Phase 2: /curate rules (audit project rules for health)
-> Phase 3: /promote (cross-agent — graduate patterns to rules)
-> Phase 4: Demotion pass (downgrade stale rules)
-> Phase 5: Summary report
Before orchestrating, gather the inputs that both /curate and /promote need.
Read .claude/team.yaml. If it doesn't exist, check for learnings files directly:
ls .claude/tackline/memory/agents/*/learnings.md 2>/dev/null
If neither exists, stop: "No team manifest or agent learnings found. Nothing to tend."
$ARGUMENTS names a specific agent, validate that agent has a learnings file$ARGUMENTS is "all" or empty, collect all agents with learnings filesCapture what work is coming so /curate has the signal it needs:
ls .claude/tackline/memory/epics/*/epic.md 2>/dev/null
Check your project's task tracker for ready and in-progress work. If no task tracker is available, note that curate will rely on git signals and conversation context only.
List existing rules so /promote can detect overlap:
ls rules/*.md .claude/rules/*.md 2>/dev/null
Read CLAUDE.md to understand what's already in passive context.
Count the target agents determined in Phase 0b. This determines the dispatch mode for this phase.
/curate directly using the Skill toolSingle agent: Use the Skill tool to invoke /curate <agent-name> directly.
Multiple agents (parallel): Dispatch one background Task per agent concurrently. Each Task receives everything /curate needs self-contained in its prompt:
Task({
subagent_type: "general-purpose",
run_in_background: true,
model: "sonnet",
prompt: "Run /curate for agent <agent-name>.
Agent: <agent-name>
Learnings file: .claude/tackline/memory/agents/<agent-name>/learnings.md
Upcoming work snapshot:
<paste task tracker ready / in_progress / epic output from Phase 0c>
Rules inventory:
<paste ls rules/*.md .claude/rules/*.md output from Phase 0d>
Invoke the curate skill with argument '<agent-name>' and return its full pipe-format output."
})
Launch all agent Tasks in a single batch. Limit to 4 concurrent Tasks to avoid API throttling; if there are more than 4 agents, launch in batches of 4 and wait for each batch before launching the next.
After all curate invocations complete (directly or via TaskOutput for parallel), note for each agent:
After curating all agents, summarize before moving to rules:
### Agent Curate Phase Complete
**Mode**: direct | parallel (N agents)
| Agent | Kept | Archived | Added | Gaps Found |
|-------|------|----------|-------|------------|
| [name] | [n] | [n] | [n] | [n] |
| ... | ... | ... | ... | ... |
After agent learnings are curated, audit the project rules for health and relevance.
Use the Skill tool to invoke /curate rules. The curated learnings from Phase 1 are already in context, which helps /curate detect PASSIVE rules (internalized by agents) and gap-area promote candidates.
Note from the rules curate output:
### Rules Curate Phase Complete
| Metric | Value |
|--------|-------|
| Rules scored | [n] |
| Relevance high + medium | [n] |
| Relevance low + passive (review) | [n] |
| Freshness stale | [n] |
| Total lines | [n] |
| Potential savings | [n] lines |
| Gaps found | [n] |
After both agents and rules are curated, run /promote to graduate durable cross-agent patterns to rules.
Use the Skill tool to invoke /promote. The curated learnings from Phase 1 and curated rules from Phase 2 are already in context, so /promote can read both.
Note:
After promotion, check existing rules for staleness and consider strength downgrades. This is the bidirectional lifecycle — rules can be promoted (via /promote) and demoted (via this pass).
Before scanning for demotions, bump freshness: on rules whose governed files have recent activity. This prevents actively-relevant rules from being demoted just because no one edited the rule file itself.
For each rule with paths: patterns, check if governed files had commits in the last 90 days:
git log --oneline --since="90 days ago" -- <paths patterns> 2>/dev/null
If there is activity, update the rule's freshness: frontmatter to today's date. This resets the 90-day demotion clock.
Rules without paths: (unconditional rules) are not auto-renewed — they require manual review or edit to stay fresh.
Report renewals:
### Freshness Renewed
| Rule | Governed Files Activity | Previous Freshness | New Freshness |
|------|------------------------|--------------------|---------------|
| [filename] | [n] commits in 90 days | [old date] | [today] |
If no rules qualify for renewal, note "No freshness renewals — no governed-file activity detected."
For each rule file with strength: and freshness: frontmatter:
git log --oneline --since="90 days ago" -- rules/*.md .claude/rules/*.md 2>/dev/null
Cross-reference each rule's freshness: date with git activity on files the rule governs (using paths: patterns if present). Rules renewed in 4a will naturally pass this check.
| Condition | Action |
|---|---|
freshness: >90 days AND no git activity in governed files | Downgrade strength one level: must → should → may |
strength: may AND freshness: >180 days | Flag for retirement review |
A rule is "governed" by the files matching its paths: patterns. Rules without paths: (unconditional) use their topic area — check if any files in that domain had recent commits.
Present demotion candidates:
### Demotion Candidates
| Rule | Current Strength | Freshness | Governed Activity | Proposed Action |
|------|-----------------|-----------|-------------------|-----------------|
| [filename] | [strength] | [date] | [last activity] | downgrade to [new strength] |
| [filename] | may | [date] | [last activity] | flag for retirement review |
Ask: "Apply these demotions? (y/n/select)"
If approved, update the strength: field in each rule's frontmatter and set freshness: to today's date (the demotion is itself a freshness event).
Note how many rules had freshness renewed, how many were demoted, how many flagged for retirement, and how many were unchanged.
Present a unified report of the full lifecycle run:
## Tend Report
### Scope
- **Agents tended**: [list]
- **Upcoming work considered**: [count] ready tasks, [count] in-progress, [count] epics
### Agent Curate Results
| Agent | Before | After | Archived | Added | Gaps |
|-------|--------|-------|----------|-------|------|
| [name] | [n] | [n] | [n] | [n] | [n] |
### Rules Curate Results
| Metric | Value |
|--------|-------|
| Rules scored | [n] |
| Relevance high + medium | [n] |
| Relevance low + passive (review) | [n] |
| Freshness stale | [n] |
| Total passive context lines | [n] |
| Potential savings | [n] lines |
| Rule gaps | [n] |
### Promote Results
- **Candidates identified**: [n]
- **Promoted to rules**: [n] ([list rule names/files])
- **Deferred**: [n] ([brief reasons])
### Demotion Results
- **Freshness renewed**: [n] ([list: filename old-date→today])
- **Rules demoted**: [n] ([list: filename strength→strength])
- **Flagged for retirement**: [n] ([list filenames])
- **Unchanged**: [n]
### Net Effect
- **Learnings optimized**: [total items curated across all agents]
- **New rules created**: [count]
- **Rules demoted**: [count]
- **Knowledge gaps flagged**: [count] (create tasks with /bug or your task tracker if actionable)
### Recommended Next Steps
- [Any gaps that need investigation tasks]
- [Any deferred promotions that need more evidence]
- [Suggested next /tend cadence based on learnings velocity]
rules/memory-layout.md, checkpoint at phase boundaries to .claude/tackline/memory/scratch/tend-checkpoint.md.See also: /curate (standalone learnings optimization), /promote (standalone rule graduation), /retro (session-level reflection that feeds learnings), /sprint (dispatch loop that generates learnings).