Tend

From tyevans/tackline · View interactive version

Tend is an AI agent skill from the GitHub repository tyevans/tackline. 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.

How to use this skill

Skill file

Tend: Learning Lifecycle Orchestrator

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).

When to Use

Overview

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

Phase 0: Load Context

Before orchestrating, gather the inputs that both /curate and /promote need.

0a. Team Manifest

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."

0b. Determine Target Agents

0c. Upcoming Work Snapshot

Capture 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.

0d. Rules Inventory

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.


Phase 1: Curate Agent Learnings

1a. Assess Agent Count

Count the target agents determined in Phase 0b. This determines the dispatch mode for this phase.

1b. Invoke /curate

Single 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.

1c. Collect Results

After all curate invocations complete (directly or via TaskOutput for parallel), note for each agent:

1d. Progress Check

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] |
| ... | ... | ... | ... | ... |

Phase 2: Curate Rules

After agent learnings are curated, audit the project rules for health and relevance.

2a. Invoke /curate rules

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.

2b. Collect Results

Note from the rules curate output:

2c. Progress Check

### 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] |

Phase 3: Promote

After both agents and rules are curated, run /promote to graduate durable cross-agent patterns to rules.

3a. Invoke /promote

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.

3b. Collect Results

Note:


Phase 4: Demotion Pass

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).

4a. Renew Freshness for Active Rules

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."

4b. Scan Rule Freshness

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.

4c. Identify Demotion Candidates

| 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.

4d. Apply Demotions (with confirmation)

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).

4e. Report

Note how many rules had freshness renewed, how many were demoted, how many flagged for retirement, and how many were unchanged.


Phase 5: Summary Report

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]

Guidelines

  1. Compaction resilience: Per rules/memory-layout.md, checkpoint at phase boundaries to .claude/tackline/memory/scratch/tend-checkpoint.md.
  2. Run curate before promote. Curate ensures learnings are clean and relevant. Promote then works with high-quality input.
  3. Don't force promotions. If /promote finds no candidates meeting graduation criteria, that's fine. Better no rule than a premature one.
  4. Flag gaps as actionable items. If curate reveals knowledge gaps for upcoming work, surface them — they may warrant investigation tasks.
  5. Respect the cadence. Weekly or bi-weekly is a good rhythm. Running after every sprint is ideal. Running mid-sprint adds overhead without enough new signal.
  6. Single agent is fine. If one agent just finished heavy work, tend just that agent — no need to curate everyone every time.

See also: /curate (standalone learnings optimization), /promote (standalone rule graduation), /retro (session-level reflection that feeds learnings), /sprint (dispatch loop that generates learnings).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.