special-agents 0.3.0 → 0.3.2
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.
package/content/defaults.yaml
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-batch-testing
|
|
3
|
+
category: domain
|
|
4
|
+
description: "Batch execution and model comparison for any AI step."
|
|
5
|
+
condition: ai
|
|
6
|
+
template: false
|
|
7
|
+
---
|
|
8
|
+
## AI Batch Execution And Model Comparison
|
|
9
|
+
|
|
10
|
+
- Design every AI step — generation, classification, extraction, routing, validation, summarization, or any other model-driven operation — so it can be run in batch mode without code changes.
|
|
11
|
+
- Batch mode means: given a set of inputs, run all of them through the same step and collect results, scores, costs, and latency for each.
|
|
12
|
+
- Build batch execution as a first-class capability, not an afterthought. The ability to run a step over many examples should be available from day one.
|
|
13
|
+
- Support running a batch across multiple models simultaneously so outputs can be compared side-by-side for the same inputs.
|
|
14
|
+
- For each batch run, record: input, model/provider, parameters, output, scoring result, cost, latency, total step duration, and timestamp. Store results in a format that supports filtering, sorting, and aggregation.
|
|
15
|
+
- Record step timing at every level: time-to-first-token, total generation time, and end-to-end step duration including pre/post-processing. This allows latency regressions to be caught the same way correctness regressions are.
|
|
16
|
+
- Track step timing trends over time — not just per run, but across runs — so gradual latency drift is visible before it becomes a user-facing problem.
|
|
17
|
+
- Define a scoring function for each AI step before implementing it. Scoring may be rule-based, model-judged, human-reviewed, or a combination — but it must be explicit and repeatable.
|
|
18
|
+
- Use batch comparison results as the primary evidence for model selection decisions at each step. Document the winning model, the runner-up, and the margin by which the winner was chosen.
|
|
19
|
+
- Allow batch runs to use golden examples, synthetic inputs, real sampled inputs, adversarial cases, or any combination.
|
|
20
|
+
- Make it easy to add new inputs to the batch suite for a step — especially real-world cases that caused problems in production.
|
|
21
|
+
- Track batch suite coverage: the suite should include common cases, edge cases, known failure modes, and adversarial inputs for each step.
|
|
22
|
+
- Support partial batches and incremental runs so new models or parameter changes can be tested against a subset of the suite before a full run.
|
|
23
|
+
- Automate batch runs in CI when prompts, models, parameters, or scoring functions change.
|
|
24
|
+
- Produce a diff-friendly summary report for each batch run: pass/fail per example, score distributions, cost and latency comparisons, and a clear recommendation.
|
|
25
|
+
- When batch results show a regression, block the change and require explicit sign-off with a documented rationale before merging.
|
|
26
|
+
- Keep batch suite inputs, expected outputs (or scoring criteria), and historical results versioned in the repository alongside the prompts they test.
|
|
27
|
+
|
|
@@ -8,18 +8,28 @@ template: false
|
|
|
8
8
|
## AI Quality, Confidence, And Evals
|
|
9
9
|
|
|
10
10
|
- Always plan AI generation workflows for high-confidence outputs, not just plausible outputs.
|
|
11
|
-
- Define quality gates, confidence scoring, QA checks, and acceptance thresholds for AI-
|
|
11
|
+
- Define quality gates, confidence scoring, QA checks, and acceptance thresholds for every AI-driven step before implementing it.
|
|
12
12
|
- Assume the project will include custom QA steps for important AI generations.
|
|
13
|
-
- When an AI
|
|
14
|
-
- For prompts used in AI generation
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
13
|
+
- When an AI step is important or user-facing, include tests, evals, review workflows, or human approval steps that match the risk level.
|
|
14
|
+
- For prompts used in AI generation, QA, and correction steps, instruct the model to check its work three times by default. Make the number of self-checks configurable and toggleable so it can be disabled when cost, latency, or workflow requires it.
|
|
15
|
+
- During planning, consult the user about where self-checking prompts should be used, how many checks are appropriate, and when extra checks may be turned off.
|
|
16
|
+
|
|
17
|
+
### Correct-Example Libraries
|
|
18
|
+
|
|
19
|
+
- For every AI step, build and maintain a library of correct, high-quality examples that demonstrate what a good output looks like. This library serves two purposes: it is injected into prompts as few-shot context to guide the model, and it anchors the eval suite.
|
|
20
|
+
- Seed the example library with at least one correct example before writing any AI step. Prefer many high-quality, diverse examples that cover common cases, edge cases, and tricky inputs.
|
|
21
|
+
- Examples should show the full input-to-output mapping for the step — not just an answer, but the reasoning or format the model is expected to follow.
|
|
22
|
+
- Include negative examples (clearly wrong outputs with an explanation of why they are wrong) where they meaningfully help the model avoid common failure modes.
|
|
23
|
+
- Version the example library alongside prompts. A prompt change and its associated example changes should be reviewed together.
|
|
24
|
+
- During planning, identify which AI steps will use injected examples, how many to inject at runtime, and whether the selection should be static, retrieved by similarity, or chosen by another model.
|
|
25
|
+
- Build the ability to toggle example injection per step so it can be disabled when cost or latency requires it.
|
|
26
|
+
- Track which examples were injected for each production generation as part of the replay record so failures can be traced back to example quality.
|
|
27
|
+
- Review and prune the example library over time: retire examples that no longer represent correct behavior and add examples from corrected production failures.
|
|
28
|
+
|
|
29
|
+
### Eval Suites
|
|
30
|
+
|
|
23
31
|
- Keep AI eval suites, golden examples, adversarial cases, and regression results updated in `docs/ai-evals.md`.
|
|
24
|
-
-
|
|
32
|
+
- Maintain eval sets that cover: correct common cases, edge cases, known failure modes, adversarial inputs, and cases drawn from corrected production failures.
|
|
33
|
+
- Track AI failures, correction rates, confidence levels, approval outcomes, and quality trends.
|
|
34
|
+
- Promote prompt, parameter, or model changes only when required eval suites meet documented thresholds, or document the explicit user-approved reason for accepting the risk.
|
|
25
35
|
|
|
@@ -133,45 +133,51 @@ packs:
|
|
|
133
133
|
condition: ai
|
|
134
134
|
template: false
|
|
135
135
|
order: 22000
|
|
136
|
+
- name: ai-batch-testing
|
|
137
|
+
category: domain
|
|
138
|
+
path: domain/ai-batch-testing.md
|
|
139
|
+
condition: ai
|
|
140
|
+
template: false
|
|
141
|
+
order: 23000
|
|
136
142
|
- name: release
|
|
137
143
|
category: process
|
|
138
144
|
path: process/release.md
|
|
139
145
|
condition: always
|
|
140
146
|
template: false
|
|
141
|
-
order:
|
|
147
|
+
order: 24000
|
|
142
148
|
- name: accessibility
|
|
143
149
|
category: domain
|
|
144
150
|
path: domain/accessibility.md
|
|
145
151
|
condition: frontend
|
|
146
152
|
template: false
|
|
147
|
-
order:
|
|
153
|
+
order: 25000
|
|
148
154
|
- name: observability
|
|
149
155
|
category: domain
|
|
150
156
|
path: domain/observability.md
|
|
151
157
|
condition: always
|
|
152
158
|
template: false
|
|
153
|
-
order:
|
|
159
|
+
order: 26000
|
|
154
160
|
- name: business-docs
|
|
155
161
|
category: process
|
|
156
162
|
path: process/business-docs.md
|
|
157
163
|
condition: always
|
|
158
164
|
template: false
|
|
159
|
-
order:
|
|
165
|
+
order: 27000
|
|
160
166
|
- name: architecture
|
|
161
167
|
category: process
|
|
162
168
|
path: process/architecture.md
|
|
163
169
|
condition: always
|
|
164
170
|
template: false
|
|
165
|
-
order:
|
|
171
|
+
order: 28000
|
|
166
172
|
- name: definition-of-done
|
|
167
173
|
category: base
|
|
168
174
|
path: base/definition-of-done.md
|
|
169
175
|
condition: always
|
|
170
176
|
template: false
|
|
171
|
-
order:
|
|
177
|
+
order: 29000
|
|
172
178
|
- name: response-expectations
|
|
173
179
|
category: base
|
|
174
180
|
path: base/response-expectations.md
|
|
175
181
|
condition: always
|
|
176
182
|
template: false
|
|
177
|
-
order:
|
|
183
|
+
order: 30000
|