@uluops/setup 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +56 -53
  2. package/assets/agents/anxiety-reader-agent.md +464 -0
  3. package/assets/commands/agents/anxiety-reader.md +160 -0
  4. package/assets/commands/agents/api-contract.md +1 -0
  5. package/assets/commands/agents/architect.md +1 -0
  6. package/assets/commands/agents/aristotle-analyst.md +1 -0
  7. package/assets/commands/agents/aristotle-explorer.md +1 -0
  8. package/assets/commands/agents/aristotle-forecaster.md +1 -0
  9. package/assets/commands/agents/aristotle-validator.md +1 -0
  10. package/assets/commands/agents/assumption-excavator.md +1 -0
  11. package/assets/commands/agents/audit.md +1 -0
  12. package/assets/commands/agents/{validate.md → code-validate.md} +6 -5
  13. package/assets/commands/agents/docs-validate.md +1 -0
  14. package/assets/commands/agents/frontend.md +1 -0
  15. package/assets/commands/agents/mcp-validate.md +1 -0
  16. package/assets/commands/agents/optimize.md +1 -0
  17. package/assets/commands/agents/pattern-analyzer.md +1 -0
  18. package/assets/commands/agents/prompt-quality.md +1 -0
  19. package/assets/commands/agents/prompt-validate.md +1 -0
  20. package/assets/commands/agents/public-interface.md +1 -0
  21. package/assets/commands/agents/release.md +1 -0
  22. package/assets/commands/agents/security.md +1 -0
  23. package/assets/commands/agents/test-review.md +1 -0
  24. package/assets/commands/agents/type-safety.md +1 -0
  25. package/assets/commands/agents/workflow-synthesis.md +1 -0
  26. package/assets/commands/pipelines/aristotle.md +143 -0
  27. package/assets/commands/pipelines/ship.md +188 -0
  28. package/assets/commands/workflows/prompt-audit.md +37 -747
  29. package/dist/cli.js +251 -207
  30. package/dist/harnesses/claude-code.d.ts +8 -0
  31. package/dist/harnesses/claude-code.js +72 -0
  32. package/dist/harnesses/codex.d.ts +15 -0
  33. package/dist/harnesses/codex.js +53 -0
  34. package/dist/harnesses/gemini-cli.d.ts +16 -0
  35. package/dist/harnesses/gemini-cli.js +54 -0
  36. package/dist/harnesses/index.d.ts +18 -0
  37. package/dist/harnesses/index.js +45 -0
  38. package/dist/harnesses/opencode.d.ts +14 -0
  39. package/dist/harnesses/opencode.js +130 -0
  40. package/dist/harnesses/types.d.ts +87 -0
  41. package/dist/harnesses/types.js +24 -0
  42. package/dist/lib/agent-transform.d.ts +12 -0
  43. package/dist/lib/agent-transform.js +129 -0
  44. package/dist/lib/asset-catalog.d.ts +9 -0
  45. package/dist/lib/asset-catalog.js +56 -0
  46. package/dist/lib/atomic-write.d.ts +11 -0
  47. package/dist/lib/atomic-write.js +28 -0
  48. package/dist/lib/config-merger.d.ts +7 -1
  49. package/dist/lib/config-merger.js +34 -5
  50. package/dist/lib/display.d.ts +14 -0
  51. package/dist/lib/display.js +66 -0
  52. package/dist/lib/file-ops.d.ts +6 -0
  53. package/dist/lib/file-ops.js +22 -1
  54. package/dist/lib/hash.d.ts +1 -0
  55. package/dist/lib/hash.js +1 -0
  56. package/dist/lib/health.d.ts +2 -0
  57. package/dist/lib/health.js +10 -0
  58. package/dist/lib/manifest.d.ts +22 -5
  59. package/dist/lib/manifest.js +148 -13
  60. package/dist/lib/paths.d.ts +15 -3
  61. package/dist/lib/paths.js +71 -13
  62. package/dist/lib/settings-merger.d.ts +9 -1
  63. package/dist/lib/settings-merger.js +45 -17
  64. package/dist/steps/agents.d.ts +5 -1
  65. package/dist/steps/agents.js +59 -9
  66. package/dist/steps/auth.js +26 -10
  67. package/dist/steps/commands.d.ts +6 -1
  68. package/dist/steps/commands.js +87 -9
  69. package/dist/steps/detect.d.ts +3 -0
  70. package/dist/steps/detect.js +7 -0
  71. package/dist/steps/mcp.d.ts +6 -2
  72. package/dist/steps/mcp.js +46 -21
  73. package/dist/steps/metrics.d.ts +14 -10
  74. package/dist/steps/metrics.js +59 -89
  75. package/dist/steps/shell.d.ts +2 -0
  76. package/dist/steps/shell.js +16 -9
  77. package/dist/steps/signup.d.ts +6 -3
  78. package/dist/steps/signup.js +26 -14
  79. package/dist/steps/verify.d.ts +2 -2
  80. package/dist/steps/verify.js +84 -117
  81. package/package.json +32 -7
  82. package/assets/commands/workflows/aristotle.md +0 -543
  83. package/assets/commands/workflows/ship.md +0 -721
  84. package/dist/test/auth.test.d.ts +0 -1
  85. package/dist/test/auth.test.js +0 -43
  86. package/dist/test/config-io.test.d.ts +0 -1
  87. package/dist/test/config-io.test.js +0 -56
  88. package/dist/test/config-merger.test.d.ts +0 -1
  89. package/dist/test/config-merger.test.js +0 -94
  90. package/dist/test/detect.test.d.ts +0 -1
  91. package/dist/test/detect.test.js +0 -25
  92. package/dist/test/file-ops.test.d.ts +0 -1
  93. package/dist/test/file-ops.test.js +0 -100
  94. package/dist/test/hash.test.d.ts +0 -1
  95. package/dist/test/hash.test.js +0 -14
  96. package/dist/test/manifest.test.d.ts +0 -1
  97. package/dist/test/manifest.test.js +0 -78
  98. package/dist/test/paths.test.d.ts +0 -1
  99. package/dist/test/paths.test.js +0 -30
  100. package/dist/test/settings-merger.test.d.ts +0 -1
  101. package/dist/test/settings-merger.test.js +0 -167
  102. package/dist/test/shell-profile.test.d.ts +0 -1
  103. package/dist/test/shell-profile.test.js +0 -40
  104. package/dist/test/shell.test.d.ts +0 -1
  105. package/dist/test/shell.test.js +0 -71
  106. package/dist/test/signup.test.d.ts +0 -1
  107. package/dist/test/signup.test.js +0 -83
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: anxiety-reader
3
+ description: Reads from the position of someone afraid of the artifact's failure modes. Surfaces concerns hiding beneath confident language — classified by anxiety register (tactical/structural/epistemic). Decision CONFIDENCE_WARRANTED/FRAGILITY_MASKED.
4
+ ---
5
+
6
+ # Anxiety Reader
7
+ Reads from the position of someone afraid of the artifact's failure modes. Surfaces concerns hiding beneath confident language — classified by anxiety register (tactical/structural/epistemic). Decision CONFIDENCE_WARRANTED/FRAGILITY_MASKED.
8
+
9
+ ## Arguments
10
+
11
+ **Usage:** `/agents:anxiety-reader <directory>`
12
+
13
+ **Examples:**
14
+ - `/agents:anxiety-reader src/services/auth.ts`
15
+ - `/agents:anxiety-reader udl/adl/v3/code-validator.agent.yaml`
16
+ - `/agents:anxiety-reader infrastructure/`
17
+ - `/agents:anxiety-reader docs/architecture.md`
18
+
19
+ **Target Directory:** $ARGUMENTS
20
+
21
+
22
+ ---
23
+
24
+ ## Pre-Flight
25
+
26
+ ```bash
27
+ echo "Running anxiety reader analysis on $ARGUMENTS..."
28
+ echo "================================================"
29
+ ```
30
+
31
+ Verify the target directory exists:
32
+
33
+ ```bash
34
+ test -d "$ARGUMENTS" && echo "✓ Directory exists: $ARGUMENTS" || echo "ERROR: Directory '$ARGUMENTS' not found"
35
+ ```
36
+
37
+ Enter and confirm location:
38
+
39
+ ```bash
40
+ cd "$ARGUMENTS" && pwd
41
+ ```
42
+
43
+ Check path exists:
44
+
45
+ ```bash
46
+ [ -e "$ARGUMENTS" ] && echo "✓ $ARGUMENTS exists" || echo "Target file or directory does not exist"
47
+ ```
48
+
49
+
50
+ ---
51
+
52
+ ## Agent Invocation
53
+
54
+ Run the Anxiety Reader agent on the validated target directory:
55
+
56
+ **Agent:** anxiety-reader-agent.md
57
+ **Model:** Opus
58
+ **Target:** $ARGUMENTS
59
+
60
+
61
+ ---
62
+
63
+ ## Auto-Fail Conditions
64
+
65
+ Critical issues that trigger immediate FAIL regardless of score:
66
+
67
+ | ID | Condition |
68
+ |----|-----------|
69
+ | **AF-001** | Generic risk assessment presented as anxiety reading |
70
+ | **AF-002** | All fears at the same register |
71
+ | **AF-003** | Hostility presented as anxiety |
72
+
73
+ ---
74
+
75
+ ## Decision Thresholds
76
+
77
+ | Score | Decision | Meaning |
78
+ |-------|----------|---------|
79
+ | **>=70** | ✅ PASS | Validation passed, proceed to next phase |
80
+ | **<70** | ❌ FAIL | Validation failed, fix issues before proceeding |
81
+
82
+ **Note:** Any critical issue triggers FAIL regardless of score.
83
+
84
+ ---
85
+
86
+ ## Post-Flight Actions
87
+
88
+ ### On Success
89
+
90
+ Artifact CONFIDENCE_WARRANTED — claims survive anxious scrutiny, robustness matches presentation
91
+
92
+ ```bash
93
+ exit 0
94
+ ```
95
+
96
+ ### On Failure
97
+
98
+ Artifact FRAGILITY_MASKED — confident language hides fragility the anxious reader can see
99
+
100
+ ```bash
101
+ exit 1
102
+ ```
103
+
104
+
105
+ ---
106
+
107
+
108
+ ## PERSIST TO TRACKER (Required)
109
+
110
+ > **IMPORTANT:** Save to tracker IMMEDIATELY after agent completes, BEFORE presenting the summary to the user. The workflow is not complete until results are persisted.
111
+ **1. Get token metrics from buffer:**
112
+ ```bash
113
+ agent-metrics buffer list --since 5m -f tracker
114
+ ```
115
+
116
+ **2. Save to tracker (DO THIS FIRST):**
117
+
118
+ mcp__uluops-tracker__save_features_list
119
+
120
+ **3. Verify saved:** Compare `json.summary.total_issues` with saved count.
121
+
122
+ **4. THEN present summary to user.**
123
+
124
+ ### Field Mappings
125
+
126
+ **Definition identity (REQUIRED for execution tracking):**
127
+ | Tracker Field | Value | Notes |
128
+ |---------------|-------|-------|
129
+ | `definition_type` | `command` | From CDL interface |
130
+ | `definition_name` | `anxiety-reader` | From CDL interface |
131
+ | `definition_version` | `1.0.0` | From CDL interface |
132
+
133
+ **From JSON OUTPUT to Tracker:**
134
+ | Source | Tracker Field | Notes |
135
+ |--------|---------------|-------|
136
+ | `json.result.score` | `agents[].score` | Total score |
137
+ | `json.result.decision` | `agents[].decision` | PASS/FAIL |
138
+ | `buffer.model` | `validators[].model` | From agent-metrics buffer |
139
+ | `buffer.tokens.input_tokens` | `input_tokens` | Raw input tokens |
140
+ | `buffer.tokens.output_tokens` | `output_tokens` | Output tokens |
141
+ | `buffer.tokens.cache_creation_tokens` | `cache_creation_tokens` | Cache creation |
142
+ | `buffer.tokens.cache_read_tokens` | `cache_read_tokens` | Cache reads |
143
+ | `buffer.tokens.total_effective_tokens` | `total_effective_tokens` | Effective total |
144
+ | `json.categories[].findings[].issues[]` | `recommendations[]` | Flatten nested structure |
145
+ | `json.analysis.records[]` | `analysis_records[]` | Structured analysis records (v1.4.0) |
146
+ | `json.analysis.system_metrics` | `analysis_summary.system_metrics` | Agent-type-specific metrics |
147
+ | `json.analysis.category_scores[]` | `analysis_summary.category_scores[]` | Category score breakdown |
148
+ | `json.analysis.epistemic_assessment` | `analysis_summary.epistemic_assessment` | Failure signature risk ratings |
149
+ | `json.analysis.audit_implications[]` | `analysis_summary.audit_implications[]` | Trajectory projections |
150
+
151
+ **Note:** `json` = agent's JSON OUTPUT, `buffer` = `agent-metrics buffer list -f tracker`
152
+ **Note:** `analysis_records` and `analysis_summary` are optional (v1.4.0). Omit if agent output has no `analysis` section.
153
+
154
+ ---
155
+
156
+ ## Source
157
+
158
+ **CDL Schema:** `udl/definition-languages/cdl-schema-v1_3_0.json`
159
+ **CDL Source:** `/Users/aself/uluops/uluops-agent-workflows/udl/cdl/v1/anxiety-reader.command.yaml`
160
+ **Agent:** `agents/anxiety-reader-agent.md`
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: api-contract
3
3
  description: Run API Contract Validator to check consistency between docs, types, and implementation. Use after any API endpoint changes.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # API Contract Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: architect
3
3
  description: Run Pre-Implementation Architect to validate design before coding. Reviews architectural fit, complexity, scope. Use BEFORE starting implementation.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Pre-Implementation Architect
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: aristotle-analyst
3
3
  description: Performs Aristotelian four-cause decomposition on any artifact. Identifies material, formal, efficient, and final causes. Distinguishes essential from accidental properties. Assesses telos coherence. Decision: TELEOLOGICAL/ATELEOLOGICAL.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Aristotle Analyst
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: aristotle-explorer
3
3
  description: Performs Aristotelian categorical mapping on any artifact. Identifies what KIND of thing each element is, determines genus and differentia, distinguishes necessary from accidental properties. Produces a taxonomic map of the problem domain.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Aristotle Explorer
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: aristotle-forecaster
3
3
  description: Performs Aristotelian potentiality-to-actuality projection on any artifact. Maps trajectory from current state to full actualization, identifies impediments to telos realization. Decision: HIGH_CONFIDENCE/MODERATE_CONFIDENCE/LOW_CONFIDENCE.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Aristotle Forecaster
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: aristotle-validator
3
3
  description: Performs Aristotelian teleological alignment validation on any artifact. Checks whether means are properly ordered toward ends, whether components fulfill their natural function, and whether category errors exist. Decision: ALIGNED/MISALIGNED.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Aristotle Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: assumption-excavator
3
3
  description: Surfaces implicit assumptions buried in any artifact — agent definitions, prompts, specs, plans, workflows, or documents. Produces a ranked assumption inventory with fragility scores.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Assumption Excavator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: audit
3
3
  description: Deep runtime correctness audit. Catches async bugs, null dereferences, silent failures, and edge cases that pass all other validators. Use as FINAL gate before ship.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Code Auditor
@@ -1,6 +1,7 @@
1
1
  ---
2
- name: validate
2
+ name: code-validate
3
3
  description: Validates code quality, standards compliance, and test coverage. Use after each implementation phase.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Code Validator
@@ -8,12 +9,12 @@ Validates code quality, standards compliance, and test coverage. Use after each
8
9
 
9
10
  ## Arguments
10
11
 
11
- **Usage:** `/agents:validate <directory>`
12
+ **Usage:** `/agents:code-validate <directory>`
12
13
 
13
14
  **Examples:**
14
- - `/agents:validate ./services/auth-service`
15
- - `/agents:validate ./packages/api`
16
- - `/agents:validate .`
15
+ - `/agents:code-validate ./services/auth-service`
16
+ - `/agents:code-validate ./packages/api`
17
+ - `/agents:code-validate .`
17
18
 
18
19
  **Target Directory:** $ARGUMENTS
19
20
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: docs-validate
3
3
  description: Validates comprehensive documentation quality including JSDoc/TSDoc, API specs, changelog, and markdown. Complements public-interface for projects with significant documentation.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Documentation Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: frontend
3
3
  description: Validates React/Tailwind frontend code including accessibility, theme consistency, component composition, and performance. Use AFTER code-validator passes.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Frontend Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: mcp-validate
3
3
  description: Validate Model Context Protocol (MCP) server implementation. Validates tools, resources, prompts, transport, and security.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # MCP Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: optimize
3
3
  description: Run Optimizer agent on a project/directory. Analyzes structure, performance, bundle hygiene, and maintainability. Reports only - does not auto-apply changes.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Code Optimizer
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: pattern-analyzer
3
3
  description: Analyzes ecosystem-wide patterns across all agents, commands, and workflows. Detects conventions, identifies inconsistencies, and learns from validation failures.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Pattern Analyzer
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: prompt-quality
3
3
  description: Validates prompts against prompt engineering best practices for clarity, context, structure, and effectiveness.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Prompt Quality Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: prompt-validate
3
3
  description: Validates AI agent prompts for quality and consistency before deployment. Run before adding new agents to the project.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Prompt Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: public-interface
3
3
  description: Validates public-facing quality - README accuracy, unused imports, dead code, export hygiene, error messages. Use AFTER test-architect passes.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Public Interface Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: release
3
3
  description: Final release gate for packages and CLI tools. Validates version consistency, CLI --version, package.json, and docs. Detects semantic-release CI/CD vs manual publishing.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Release Readiness
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: security
3
3
  description: Run comprehensive security audit on a project. Use as FINAL gate before deployment. Scans for vulnerabilities, OWASP compliance, and security best practices.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Security Analyst
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: test-review
3
3
  description: Run Test Architect agent to validate test quality and coverage. Use after implementation passes code validator.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Test Architect
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: type-safety
3
3
  description: Run Type Safety Validator on TypeScript projects. Validates beyond tsc—catches any abuse, unsafe assertions, type holes that pass compilation but cause runtime failures.
4
+ model: sonnet
4
5
  ---
5
6
 
6
7
  # Type Safety Validator
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: workflow-synthesis
3
3
  description: Synthesizes cross-cutting insights from multiple upstream agent outputs. Identifies convergence, divergence, blind spots, and emergent patterns across independent analyses.
4
+ model: opus
4
5
  ---
5
6
 
6
7
  # Workflow Synthesis
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: aristotle-pipeline
3
+ description: Sequential four-phase Aristotelian analysis. Explorer maps categories, Analyst decomposes four causes, Validator checks teleological alignment, Forecaster projects actualization trajectory. Each phase builds on the previous.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: opus
6
+ ---
7
+
8
+ # Aristotle Pipeline
9
+
10
+ > Sequential four-phase Aristotelian analysis. Explorer maps categories, Analyst decomposes four causes, Validator checks teleological alignment, Forecaster projects actualization trajectory. Each phase builds on the previous.
11
+
12
+ | Field | Value |
13
+ |-------|-------|
14
+ | Name | `aristotle-pipeline` |
15
+ | Version | 1.0.0 |
16
+ | Domain | software |
17
+ | Subdomain | cognitive-lens |
18
+ | Tags | `cognitive-lens`, `aristotle`, `philosophy`, `sequential` |
19
+
20
+ ## Triggers
21
+
22
+ - **Manual**
23
+ - Parameters:
24
+ - `target`: string
25
+
26
+ ## Stage Dependency Graph
27
+
28
+ ```
29
+ explore (Categorical Mapping)
30
+ -> analyze (Four-Cause Decomposition)
31
+ -> validate (Teleological Alignment)
32
+ -> forecast (Actualization Projection)
33
+ -> synthesis (Cross-Phase Synthesis)
34
+ ```
35
+
36
+ ## Stages
37
+
38
+ ### Stage 1: Categorical Mapping
39
+
40
+ - **ID:** `explore`
41
+
42
+ **Agents:**
43
+ - `aristotle-explorer`
44
+
45
+ **Gate:**
46
+ - Threshold: 70
47
+ - On failure: warn
48
+
49
+ ### Stage 2: Four-Cause Decomposition
50
+
51
+ - **ID:** `analyze`
52
+ - **Depends on:** `explore`
53
+
54
+ **Agents:**
55
+ - `aristotle-analyst`
56
+
57
+ **Gate:**
58
+ - Threshold: 70
59
+ - On failure: warn
60
+
61
+ ### Stage 3: Teleological Alignment
62
+
63
+ - **ID:** `validate`
64
+ - **Depends on:** `analyze`
65
+
66
+ **Agents:**
67
+ - `aristotle-validator`
68
+
69
+ **Gate:**
70
+ - Threshold: 70
71
+ - On failure: warn
72
+
73
+ ### Stage 4: Actualization Projection
74
+
75
+ - **ID:** `forecast`
76
+ - **Depends on:** `validate`
77
+
78
+ **Agents:**
79
+ - `aristotle-forecaster`
80
+
81
+ **Gate:**
82
+ - Threshold: 70
83
+ - On failure: warn
84
+
85
+ ### Stage 5: Cross-Phase Synthesis
86
+
87
+ - **ID:** `synthesis`
88
+ - **Depends on:** `forecast`
89
+
90
+ **Agents:**
91
+ - `workflow-synthesis`
92
+
93
+ **Gate:**
94
+ - Threshold: 0
95
+ - On failure: warn
96
+
97
+ ## Postflight
98
+
99
+ ### Tracker Persistence
100
+
101
+ After all stages complete, save results to the tracker using `save_features_list`:
102
+
103
+ - **definition_type:** `pipeline`
104
+ - **definition_name:** `aristotle-pipeline`
105
+ - **definition_version:** `1.0.0`
106
+ - **workflow_type:** `cognitive-lens`
107
+ - **project:** `$ARGUMENTS` (the target project name)
108
+ - **validators:** Collect each validator/agent result with name, score, status, model, and token usage
109
+ - **recommendations:** Collect ALL issues from ALL stages into a single recommendations array with validator, title, priority, severity, failure_code, file_path, line_number, description, and type
110
+ - **summary:** `{ all_gates_passed: <true if all abort-gates passed>, average_score: <mean of all validator scores> }`
111
+
112
+ This MUST be a single bulk call — do NOT create individual issues. The `save_features_list` tool auto-increments the run number and detects regressions from prior runs.
113
+
114
+ **Token Metrics:**
115
+
116
+ Get token metrics from the agent-metrics buffer before saving:
117
+ ```bash
118
+ agent-metrics buffer list --since 15m -f tracker
119
+ ```
120
+
121
+ Map buffer fields to tracker: `input_tokens`, `output_tokens`, `cache_creation_tokens`, `cache_read_tokens`, `total_effective_tokens`, and `model`.
122
+
123
+ **Field Mappings:**
124
+
125
+ | Source | Tracker Field | Notes |
126
+ |--------|---------------|-------|
127
+ | `stage.gate.score` | `agents[].score` | Total score |
128
+ | `stage.gate.decision` | `agents[].decision` | Agent decision |
129
+ | `agent-metrics` | `agents[].model` | Model identifier |
130
+ | `stage.output.issues` | `recommendations[]` | Flatten nested structure |
131
+
132
+ **Verification:** After saving, compare `json.summary.total_issues` with the saved count. Alert if mismatch.
133
+
134
+ ### On Success
135
+
136
+ - **ACTUALIZED — Full Aristotelian analysis complete.**
137
+
138
+ ### On Failure
139
+
140
+ - **POTENTIAL — Significant ontological gaps remain.**
141
+
142
+ ---
143
+ *Generated from PDL v1.0.0 | Pipeline: aristotle-pipeline*