
Trace
Rebuild the provenance chain for architectural decisions across sessions, git history, handoffs, and agent artifacts when onboarding or debugging why the system looks the way it does.
Overview
trace is an agent skill most often used in Operate (also Build pm, Ship review) that rebuilds architectural decision provenance across sessions, git, handoffs, and artifacts.
Install
npx skills add https://github.com/boshu2/agentops --skill traceWhat is this skill?
- Executable workflow: classify target (path vs git ref vs concept) then trace—do not only describe steps
- Searches CASS sessions when available; falls back to git log, handoffs, and .agents artifacts
- Outputs decision provenance to .agents/research/YYYY-MM-DD-trace-*.md with stdout contract result.json
- Depends on provenance skill for artifact lineage; use /provenance for learnings and tier files instead of /trace
- Hexagonal supporting skill with distributed-tracing, ADR, and ebpf-observability practice tags
- Output path pattern .agents/research/YYYY-MM-DD-trace-*.md
- Stdout output contract result.json
Adoption & trust: 824 installs on skills.sh; 384 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You inherited an agent-heavy repo and cannot tell which session, commit, or handoff introduced a design choice you are about to change.
Who is it for?
Solo builders running long-lived AgentOps repos who document decisions in git, handoffs, and .agents research folders.
Skip if: Simple one-off apps with no decision history or when you only need file-level artifact lineage—use provenance instead.
When should I use this skill?
User runs /trace on a concept, needs HOW/WHEN/WHY for architectural decisions, or targets git refs and keywords—not file artifact lineage.
What do I get? / Deliverables
You receive a dated trace research memo and result.json decision chain, with CASS search when installed or git and .agents fallbacks when not.
- Markdown trace report under .agents/research/
- result.json decision provenance on stdout
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Operate/iterate is the canonical shelf because tracing decisions is what you do when maintaining, extending, or auditing a live agentops codebase over time. Iterate covers post-ship learning loops where you need WHEN/WHY/HOW answers before changing architecture again.
Where it fits
Before rewriting a subsystem, trace the concept keyword to see which sessions and ADRs justified the original shape.
Confirm a release-bound refactor still matches the traced decision chain from prior handoffs.
Produce .agents/research/YYYY-MM-DD-trace-*.md after an incident so the next iteration starts from verified provenance.
Correlate observability practice tags with the commits and sessions that introduced tracing hooks.
How it compares
A decision-tracing workflow skill with CLI fallbacks, not a hosted APM dashboard or generic git blame one-liner.
Common Questions / FAQ
Who is trace for?
Indie builders and small teams on AgentOps-style repos who need provenance for architecture and concepts, not just the latest file version.
When should I use trace?
During Operate iteration when auditing WHY/WHEN/HOW; during Build pm when onboarding to a design; during Ship review when validating that a launch change matches recorded intent.
Is trace safe to install?
It can run Bash and search your repo; review the Security Audits panel on this Prism page and ensure cass and git access match your threat model.
Workflow Chain
Requires first: provenance
SKILL.md
READMESKILL.md - Trace
# Trace Skill > **Quick Ref:** Trace design decisions through CASS sessions, handoffs, git, and artifacts. Output: `.agents/research/YYYY-MM-DD-trace-*.md` **YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.** ## When to Use - Trace HOW architectural decisions evolved - Find WHEN a concept was introduced - Understand WHY something was designed a certain way - Build provenance chain for design decisions For knowledge artifact lineage (learnings, patterns, tiers), use `/provenance` instead. **CLI dependencies:** cass (session search). If cass is unavailable, skip transcript search and rely on git log, handoff docs, and `.agents/` artifacts for decision tracing. ## Execution Steps Given `/trace <concept>`: ### Step 1: Classify Target Type Determine what kind of provenance to trace: ``` IF target is a file path (contains "/" or "."): → Use /provenance (artifact lineage) IF target is a git ref (sha, branch, tag): → Use git-based tracing (Step 2b) ELSE (keyword/concept): → Use design decision tracing (Step 2a) ``` ### Step 2a: Design Decision Tracing (Concepts) Launch 4 parallel search agents (CASS, Handoff, Git, Research) and wait for all to complete. **Backend:** Agents use `Task(subagent_type="Explore")` which maps to `task(subagent_type="explore")` in OpenCode. See `skills/shared/SKILL.md` ("Runtime-Native Spawn Backend Selection") for the shared contract. Read `references/discovery-patterns.md` for agent definitions and prompts. ### Step 2b: Git-Based Tracing (Commits/Refs) Read `references/discovery-patterns.md` for git-based tracing commands. ### Step 3: Build Timeline Merge results from all sources into a single chronological timeline (oldest first). Deduplicate same-day/same-session events. Every claim needs a source citation. ### Step 4: Extract Key Decisions For each event in timeline, identify: - **What changed:** The decision or evolution - **Why:** Reasoning if available - **Who:** Session/author/commit author - **Evidence:** Link to source (session path, file, commit) ### Step 5: Write Trace Report **Write to:** `.agents/research/YYYY-MM-DD-trace-<concept-slug>.md` Read `references/report-template.md` for the full report format and deduplication rules. ### Step 6: Report to User Tell the user: 1. Concept traced successfully 2. Timeline of evolution (key dates) 3. Most significant decisions 4. Location of trace report 5. Related concepts to explore ## Handling Edge Cases Read `references/edge-cases.md` for handling: no CASS results, no handoffs, ambiguous concepts (>20 results), and all-sources-empty scenarios. General principle: continue with remaining sources and note gaps in the report. ## Key Rules - **Search ALL sources** - CASS, handoffs, git, research - **Build timeline** - chronological evolution is the goal - **Cite evidence** - every claim needs a source - **Handle gaps gracefully** - not all concepts are in all sources - **Write report** - trace must produce `.agents/research/` artifact ## Relationship to /provenance | Skill | Purpose | Input | Output | |-------|---------|-------|--------| | `/provenance` | Artifact lineage | File path | Tier/promotion history | | `/trace` | Design decisions | Concept/keyword | Timeline of evolution | Use `/provenance` for: "Where did this learning come from?" Use `/trace` for: "How did we decide on this architecture?" ## Examples ```bash # Trace a design decision /trace "three-level architecture" # Trace a role/concept /trace "Chiron" # Trace a