From tl
Use after /diagnose-agent when you have a struggle profile and need training challenges. Generates edge-case and commit-replay challenges calibrated to weak areas. Keywords: challenge, training, improvement, active-learning, edge-case, replay, agent, weakness.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tl:challenge-gen <agent-name><agent-name>This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are running **challenge-gen** — generating targeted challenges to exercise an agent's weak areas. Target agent: **$ARGUMENTS**
You are running challenge-gen — generating targeted challenges to exercise an agent's weak areas. Target agent: $ARGUMENTS
This skill requires the following infrastructure:
.claude/team.yaml with ownership patterns defining their domain (how to create)/diagnose-agent struggle profile for the target agent should exist in the current session context; without it the skill falls back to basic profiling from learnings alone, producing less calibrated challenges (how to generate).claude/tackline/memory/agents/<agent>/learnings.md should exist with accumulated history; used to extract Gotchas and known weaknesses when no upstream profile is available (populated by /retro and /active-learn)If the diagnose-agent profile is missing, the skill warns and continues with basic profiling — challenges will be generated but may not be well-targeted to the agent's actual weaknesses. If team.yaml is missing or the agent is not listed, the skill stops and asks the user to select an agent from the available list.
Serial (default):
Detect upstream /diagnose-agent output (or accept $ARGUMENTS)
-> Validate agent exists, extract ownership areas
-> Strategy A: Research domain edge cases (WebSearch + codebase)
-> Strategy B: Find commit-replay candidates (raw git)
-> Assemble 3-5 challenges with quality gate
-> Write challenges to .claude/tackline/memory/agents/<name>/challenges/
-> Emit pipe format output
Parallel mode (pass parallel in $ARGUMENTS):
Detect upstream /diagnose-agent output (or accept $ARGUMENTS)
-> Validate agent exists, extract ownership areas
-> [concurrently]
Agent A: Research domain edge cases (WebSearch + codebase)
Agent B: Find commit-replay candidates (raw git)
-> Collect results from both agents
-> Assemble 3-5 challenges with quality gate
-> Write challenges to .claude/tackline/memory/agents/<name>/challenges/
-> Emit pipe format output
Search conversation context for the pipe-format pattern:
## Struggle Profile: <agent-name>
**Source**: /diagnose-agent
If found:
**Pipeline** field for provenanceIf not found:
$ARGUMENTS provides an agent name, proceed with basic profiling (Phase 0b)$ARGUMENTS is empty, list available agents from .claude/team.yaml and ask the user which to target. Stop and wait./diagnose-agent <name> first.".claude/team.yaml and confirm the agent name exists in the members listowns patterns (file globs defining ownership areas).claude/tackline/memory/agents/<name>/learnings.md if it exists — scan for Gotchas and known weaknessesIn parallel mode ($ARGUMENTS contains parallel), run Phase 1 and Phase 2 as concurrent background Task agents after Phase 0 completes. This roughly halves wall-clock time because Strategy A (WebSearch + codebase) and Strategy B (git history) are fully independent.
When to use parallel mode: When the agent's owned area is broad (many files, many weaknesses) and both strategies are expected to yield candidates. For narrow profiles or small codebases, serial mode is cheaper and produces equivalent results.
Assessment before dispatch: After Phase 0 validates the agent and extracts ownership, confirm that both strategies have meaningful scope before launching both agents:
git log --oneline --since="60 days ago" -- <owns-patterns> returns ≥1 result)If only one strategy has scope, fall back to serial for the active strategy only.
After Phase 0 completes, launch both agents concurrently:
Strategy A agent:
Task({
subagent_type: "general-purpose",
run_in_background: true,
prompt: "<Strategy A agent prompt — see template below>"
})
Strategy B agent:
Task({
subagent_type: "general-purpose",
run_in_background: true,
prompt: "<Strategy B agent prompt — see template below>"
})
Collect results from both agents before proceeding to Phase 3.
You are running Strategy A of challenge-gen for agent: <agent-name>.
## Context
Agent owns: <owns-patterns>
Struggle profile source: <upstream source or "basic profiling">
Weaknesses to target:
<list each WEAKNESS item from struggle profile>
Gaps to target:
<list each GAP item from struggle profile>
Difficulty calibration: <novice | intermediate | expert | adversarial>
## Your Task
Research domain edge cases for the weaknesses and gaps listed above. You are Strategy A — do NOT use git history (that is Strategy B's job). Use WebSearch and codebase reading only.
### Step 1: Codebase Edge Cases
Search the agent's owned files for error-prone patterns:
- Files with high cyclomatic complexity (many conditionals, nested logic)
- Error handling paths that are rarely exercised
- Configuration edge cases (empty inputs, boundary values, unusual combinations)
- Cross-cutting concerns the agent's learnings don't mention
Use Grep and Glob to find files matching these patterns: <owns-patterns>
### Step 2: External Edge Cases
Use WebSearch to find real-world edge cases related to each weakness:
- Search for CVEs, security advisories, or known bugs in the technology stack
- Search Stack Overflow for highly-voted edge case questions in the domain
- Search GitHub issues for "unexpected behavior" or "edge case" in related projects
- Search for framework-specific gotchas the agent may not have encountered
For each external finding, verify it applies to the codebase by checking:
- Is the relevant technology/library actually used? (check package files, imports)
- Is the vulnerable pattern present in owned files?
- Has it already been addressed? (check git history for related fixes)
### Step 3: Select Best Edge Cases
From all candidates, select 2-3 that:
- Target a specific WEAKNESS or GAP from the profile above
- Have clear acceptance criteria (the "right answer" is verifiable)
- Contain a non-obvious trap (something that makes the naive solution wrong)
- Are grounded in real scenarios (not hypothetical)
## Output Format
Report your findings as a structured list. For each candidate:
**Edge Case <N>:** <title>
- targeted_weakness: <WEAKNESS or GAP name from profile>
- scenario: <what the agent is asked to do>
- trap: <the non-obvious thing that makes the naive solution wrong>
- acceptance_criteria: <how to evaluate pass/fail>
- grounding: <URL, file path, or CVE that makes this real>
If no candidates meet the quality bar, state: "No qualifying edge cases found — Strategy A produced 0 candidates."
You are running Strategy B of challenge-gen for agent: <agent-name>.
## Context
Agent owns: <owns-patterns>
Struggle profile source: <upstream source or "basic profiling">
Weaknesses to target:
<list each WEAKNESS item from struggle profile>
Gaps to target:
<list each GAP item from struggle profile>
Difficulty calibration: <novice | intermediate | expert | adversarial>
## Your Task
Find commit-replay challenge candidates in the agent's ownership area. You are Strategy B — use git history only. Do NOT use WebSearch (that is Strategy A's job).
### Step 1: Find Candidate Commits
Run these git commands against the owned file patterns:
```bash
# Recent fix commits in owned files
git log --oneline --since="60 days ago" -- <owns-patterns> | head -30
# Find fix: commits that follow feat: commits on same files
git log --format="%H %s" --since="60 days ago" -- <owns-patterns>
Scan for fix: commits. For each, check if a feat: commit on the same files preceded it within 7 days.
Prioritize:
fix_after_feat commits (the fix is the challenge — can the agent get it right the first time?)For each candidate commit:
git show --format="%B" --no-patch <commit-hash> # commit message -> challenge prompt
git show --format="" <commit-hash> # diff -> ground truth
git show <commit-hash>^:<file-path> # file before commit -> starting point
git rev-parse <commit-hash>^ # parent hash -> base_commit
Record the parent hash as base_commit — the state before the fix. This is what /challenge-run uses for worktree isolation.
From all candidates, select 1-2 that:
Report your findings as a structured list. For each candidate:
Commit Replay :
If no candidates meet the quality bar, state: "No qualifying commit-replay candidates found — Strategy B produced 0 candidates."
---
## Phase 1: Research Domain Edge Cases — Strategy A (default)
For each WEAKNESS and GAP item from the struggle profile, research real-world edge cases in that domain.
### 1a. Codebase Edge Cases
Search the agent's owned files for patterns that are commonly error-prone:
```bash
# Find complex or unusual patterns in owned files
git log --oneline --all --since="60 days ago" -- <owns-patterns>
Look for:
Use WebSearch to find real-world edge cases related to each weakness:
For each external finding, verify it applies to the codebase by checking:
From all candidates, select 2-3 that:
Identify real commits in the agent's ownership area that can be turned into replay challenges.
# Recent fix commits in owned files
git log --oneline --since="60 days ago" -- <owns-patterns> | head -30
# Find fix: commits that follow feat: commits on same files
git log --format="%H %s" --since="60 days ago" -- <owns-patterns>
Scan for fix: commits. For each, check if a feat: commit on the same files preceded it within 7 days.
Prioritize:
fix_after_feat commits (the fix is the challenge — can the agent get it right the first time?)Filter results to files matching the agent's owns patterns.
For each candidate commit:
# Get the commit message (this becomes the challenge prompt)
git show --format="%B" --no-patch <commit-hash>
# Get the diff (this is the ground truth, hidden from the agent)
git show --format="" <commit-hash>
# Get the file state BEFORE the commit (this is the starting point)
git show <commit-hash>^:<file-path>
# Get the parent commit hash (this is the base_commit for worktree isolation)
git rev-parse <commit-hash>^
Record the parent hash as the base_commit — the state of the repo before the fix was applied. This is the commit that /challenge-run will use to create a worktree at the pre-fix state.
From all candidates, select 1-2 that:
Combine edge-case and commit-replay candidates into a final set of 3-5 challenges.
In parallel mode, wait for both background agents to complete, then collect their structured output before proceeding. Treat agent output sections ("Edge Case N:" and "Commit Replay N:") as the candidate pool that feeds Phase 3a and 3b below.
Every challenge MUST pass these checks before inclusion:
Drop any challenge that fails a check. If fewer than 3 survive, return to Phase 1 or 2 for more candidates.
mkdir -p .claude/tackline/memory/agents/<name>/challenges
Write challenges to .claude/tackline/memory/agents/<name>/challenges/<timestamp>-challenges.md using this structure:
# Challenges for <agent-name>
Generated: <date>
Source profile: /diagnose-agent (or "basic profiling")
Difficulty level: <novice | intermediate | expert | adversarial>
## Challenge 1: <title>
**Strategy**: edge-case | commit-replay
**Base commit**: <parent-hash> *(commit-replay only)*
**Targeted weakness**: <WEAKNESS or GAP name from profile>
**Difficulty**: <level>
### Scenario
<What the agent is asked to do — this is what the agent sees>
### Acceptance Criteria
<How to evaluate the agent's output — pass/fail conditions>
### Hidden Trap
<The specific thing that makes this hard — NOT shown to the agent>
### Ground Truth
<The correct approach or actual diff — for evaluation only>
---
## Challenge 2: ...
Output the challenge set in pipe format for downstream consumption:
## Challenge Set: <agent-name>
**Source**: /challenge-gen
**Input**: <agent-name>
**Pipeline**: <upstream pipeline> -> /challenge-gen (N challenges)
### Items (N)
1. **<challenge-title>** — <one-line description>
- scenario: <brief scenario summary>
- targeted_weakness: <WEAKNESS or GAP name>
- difficulty: novice | intermediate | expert | adversarial
- acceptance_criteria: <how to evaluate>
- hidden_trap: <what makes it hard>
- strategy: edge-case | commit-replay
- base_commit: <hash> *(commit-replay only)*
2. ...
### Difficulty Calibration
Agent coverage: <percentage from upstream or estimated>
Challenge level: <novice | intermediate | expert | adversarial>
Strategy mix: <N edge-case, M commit-replay>
### Summary
<One paragraph synthesizing the challenge set: what weaknesses are targeted, what strategies were used, what difficulty level, and what growth the challenges are designed to produce.>
base_commit must be a real commit hash from git history (output of git rev-parse <commit>^), never fabricated or modified — /challenge-run depends on it for worktree isolation.See also: /challenge-run (execute the challenges produced here against the agent — uses base_commit for worktree isolation in commit-replay challenges); /diagnose-agent (generate the struggle profile that feeds this skill); /active-learn (run a full training cycle using challenge sets).
npx claudepluginhub tyevans/tackline --plugin tacklineUse when an agent's performance is uneven and you want systematic improvement. Runs diagnose -> challenge-gen -> challenge-run -> update learnings in a loop. Works with or without a team. Keywords: active-learn, training, adversarial, improve, agent, loop, capability, tuning, solo.
Captures learnings, errors, corrections, and feature requests to markdown files for continuous improvement. Pairs with self-healing for runtime recovery.
Applies RED-GREEN-REFACTOR TDD to test workflow instructions and commands: reproduces real failures with subagents, clarifies docs before deployment.