Skill: Archive Analysis
Purpose
Save a completed analysis to the knowledge system's analysis archive for future recall. Captures key findings, metrics used, agents invoked, and output file paths so that past work can be referenced in future sessions.
When to Use
- •After completing an L3+ analysis (post-validation)
- •After
/run-pipelinecompletes successfully - •User says "save this analysis" or "archive this"
- •Automatically triggered at the end of Step 18 (Close the Loop)
Instructions
Step 1: Gather Analysis Metadata
Collect from the current session:
- •Title: Derive from the original question or business context
- •Question: The original user question
- •Question level: From the Question Router classification (L1-L5)
- •Dataset ID: From
.knowledge/active.yaml - •Key findings: Extract top 3-5 findings from the analysis output or validation report
- •Metrics used: List metric IDs referenced during analysis (match against metric dictionary if available)
- •Agents used: List agent names that were invoked
- •Output files: List paths to files in
outputs/andworking/ - •Tags: Auto-generate from question keywords + metric names
- •Confidence: From the validation agent's confidence score, if available
Step 2: Create Archive Entry
Generate a unique ID: analysis_{YYYYMMDD}_{HHMMSS}
Build the entry dict following .knowledge/analyses/_schema.yaml.
Step 3: Append to Index
- •Read
.knowledge/analyses/index.yaml - •Append the new entry to the
analyseslist - •Increment
total_analyses - •Update
last_updatedto current date - •Write back to
index.yaml
Step 4: Update Dataset Stats
- •Read
.knowledge/datasets/{active}/manifest.yaml - •Increment
analysis_count - •Update
last_usedto current date - •Write back
Step 5: Confirm
Report to user:
code
Analysis archived: {title}
ID: {id}
Findings: {count} key findings captured
Use `/history` to browse past analyses.
Rules
- •Never overwrite an existing archive entry — always append
- •Key findings should be one sentence each, factual, with numbers
- •Tags should be lowercase, no spaces (use hyphens)
- •If validation was not run, set confidence to null and note it
- •Archive even partial analyses — mark as
partial: true
Edge Cases
- •No outputs exist: Archive with metadata only, note "no output files"
- •Pipeline was interrupted: Archive what's available, mark as partial
- •Duplicate question: Still archive — different runs may find different things
- •Analysis index doesn't exist: Create it from template