agentera 0.0.0 → 3.0.0-dev.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.
- package/README.md +6 -45
- package/bundle/.agentera-npx-bundle.json +4 -0
- package/bundle/references/adapters/cursor.md +213 -0
- package/bundle/references/adapters/opencode.md +530 -0
- package/bundle/references/adapters/package-manifest-interface-model.yaml +337 -0
- package/bundle/references/adapters/package-registry.yaml +247 -0
- package/bundle/references/adapters/package-surface-characterization.md +48 -0
- package/bundle/references/adapters/runtime-adapter-characterization.md +79 -0
- package/bundle/references/adapters/runtime-adapter-interface-model.yaml +200 -0
- package/bundle/references/adapters/runtime-adapter-registry.yaml +548 -0
- package/bundle/references/adapters/runtime-feature-parity.md +189 -0
- package/bundle/references/analysis/benchmark.md +267 -0
- package/bundle/references/analysis/startup-measurement-contract.yaml +424 -0
- package/bundle/references/artifacts/artifact-registry-interface-model.yaml +288 -0
- package/bundle/references/cli/agent-ready-state-contract.yaml +950 -0
- package/bundle/references/cli/app-lifecycle-vocabulary.yaml +233 -0
- package/bundle/references/cli/audience-namespace-cli-migration.yaml +355 -0
- package/bundle/references/cli/bundle-skill-vocabulary.yaml +278 -0
- package/bundle/references/cli/capability-instruction-contract.yaml +123 -0
- package/bundle/references/cli/capability-tool-classification.yaml +53 -0
- package/bundle/references/cli/routing-execution-vocabulary.yaml +281 -0
- package/bundle/references/cli/update-channels.yaml +120 -0
- package/bundle/references/cli/vocabulary-index.yaml +160 -0
- package/bundle/references/cli/vocabulary.md +562 -0
- package/bundle/references/meta/documentation-inventory.md +43 -0
- package/bundle/references/v1-section-mapping.md +47 -0
- package/bundle/registry.json +39 -0
- package/bundle/skills/agentera/.claude-plugin/plugin.json +27 -0
- package/bundle/skills/agentera/SKILL.md +470 -0
- package/bundle/skills/agentera/agents/dokumentera.toml +6 -0
- package/bundle/skills/agentera/agents/hej.toml +6 -0
- package/bundle/skills/agentera/agents/inspektera.toml +6 -0
- package/bundle/skills/agentera/agents/inspirera.toml +6 -0
- package/bundle/skills/agentera/agents/optimera.toml +6 -0
- package/bundle/skills/agentera/agents/orkestrera.toml +6 -0
- package/bundle/skills/agentera/agents/planera.toml +6 -0
- package/bundle/skills/agentera/agents/profilera.toml +6 -0
- package/bundle/skills/agentera/agents/realisera.toml +6 -0
- package/bundle/skills/agentera/agents/resonera.toml +6 -0
- package/bundle/skills/agentera/agents/visionera.toml +6 -0
- package/bundle/skills/agentera/agents/visualisera.toml +6 -0
- package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +428 -0
- package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +73 -0
- package/bundle/skills/agentera/capabilities/dokumentera/schemas/exit.yaml +35 -0
- package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +35 -0
- package/bundle/skills/agentera/capabilities/dokumentera/schemas/validation.yaml +139 -0
- package/bundle/skills/agentera/capabilities/hej/instructions.md +331 -0
- package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +69 -0
- package/bundle/skills/agentera/capabilities/hej/schemas/exit.yaml +32 -0
- package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +58 -0
- package/bundle/skills/agentera/capabilities/hej/schemas/validation.yaml +55 -0
- package/bundle/skills/agentera/capabilities/inspektera/instructions.md +514 -0
- package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +76 -0
- package/bundle/skills/agentera/capabilities/inspektera/schemas/exit.yaml +36 -0
- package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +38 -0
- package/bundle/skills/agentera/capabilities/inspektera/schemas/validation.yaml +113 -0
- package/bundle/skills/agentera/capabilities/inspirera/instructions.md +280 -0
- package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +24 -0
- package/bundle/skills/agentera/capabilities/inspirera/schemas/exit.yaml +33 -0
- package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +34 -0
- package/bundle/skills/agentera/capabilities/inspirera/schemas/validation.yaml +58 -0
- package/bundle/skills/agentera/capabilities/optimera/instructions.md +437 -0
- package/bundle/skills/agentera/capabilities/optimera/schemas/artifacts.yaml +69 -0
- package/bundle/skills/agentera/capabilities/optimera/schemas/exit.yaml +35 -0
- package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +39 -0
- package/bundle/skills/agentera/capabilities/optimera/schemas/validation.yaml +91 -0
- package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +433 -0
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +64 -0
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/exit.yaml +34 -0
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +42 -0
- package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +107 -0
- package/bundle/skills/agentera/capabilities/planera/instructions.md +368 -0
- package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +62 -0
- package/bundle/skills/agentera/capabilities/planera/schemas/exit.yaml +33 -0
- package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +34 -0
- package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +61 -0
- package/bundle/skills/agentera/capabilities/profilera/instructions.md +419 -0
- package/bundle/skills/agentera/capabilities/profilera/schemas/artifacts.yaml +18 -0
- package/bundle/skills/agentera/capabilities/profilera/schemas/exit.yaml +34 -0
- package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +45 -0
- package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +57 -0
- package/bundle/skills/agentera/capabilities/realisera/instructions.md +403 -0
- package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +80 -0
- package/bundle/skills/agentera/capabilities/realisera/schemas/exit.yaml +35 -0
- package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +39 -0
- package/bundle/skills/agentera/capabilities/realisera/schemas/validation.yaml +110 -0
- package/bundle/skills/agentera/capabilities/resonera/instructions.md +329 -0
- package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +47 -0
- package/bundle/skills/agentera/capabilities/resonera/schemas/exit.yaml +35 -0
- package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +46 -0
- package/bundle/skills/agentera/capabilities/resonera/schemas/validation.yaml +77 -0
- package/bundle/skills/agentera/capabilities/visionera/instructions.md +309 -0
- package/bundle/skills/agentera/capabilities/visionera/schemas/artifacts.yaml +57 -0
- package/bundle/skills/agentera/capabilities/visionera/schemas/exit.yaml +35 -0
- package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +41 -0
- package/bundle/skills/agentera/capabilities/visionera/schemas/validation.yaml +74 -0
- package/bundle/skills/agentera/capabilities/visualisera/instructions.md +400 -0
- package/bundle/skills/agentera/capabilities/visualisera/schemas/artifacts.yaml +44 -0
- package/bundle/skills/agentera/capabilities/visualisera/schemas/exit.yaml +34 -0
- package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +33 -0
- package/bundle/skills/agentera/capabilities/visualisera/schemas/validation.yaml +80 -0
- package/bundle/skills/agentera/capability_schema_contract.yaml +385 -0
- package/bundle/skills/agentera/protocol.yaml +463 -0
- package/bundle/skills/agentera/references/contract.md +1039 -0
- package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +60 -0
- package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +461 -0
- package/bundle/skills/agentera/schemas/artifacts/design.yaml +55 -0
- package/bundle/skills/agentera/schemas/artifacts/docs.yaml +402 -0
- package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +373 -0
- package/bundle/skills/agentera/schemas/artifacts/health.yaml +484 -0
- package/bundle/skills/agentera/schemas/artifacts/objective.yaml +399 -0
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +342 -0
- package/bundle/skills/agentera/schemas/artifacts/progress.yaml +325 -0
- package/bundle/skills/agentera/schemas/artifacts/todo.yaml +110 -0
- package/bundle/skills/agentera/schemas/artifacts/vision.yaml +262 -0
- package/bundle/skills/hej/.claude-plugin/plugin.json +6 -0
- package/bundle/skills/hej/SKILL.md +69 -0
- package/bundle/skills/hej/agents/hej.toml +11 -0
- package/bundle/skills/hej/agents/openai.yaml +8 -0
- package/dist/analytics/extractCorpus.js +1791 -0
- package/dist/analytics/extractCorpus.js.map +1 -0
- package/dist/analytics/usageStats.js +487 -0
- package/dist/analytics/usageStats.js.map +1 -0
- package/dist/bin/agentera.js +4 -0
- package/dist/bin/agentera.js.map +1 -0
- package/dist/cli/appContext.js +226 -0
- package/dist/cli/appContext.js.map +1 -0
- package/dist/cli/argvalidate.js +41 -0
- package/dist/cli/argvalidate.js.map +1 -0
- package/dist/cli/capabilityContext.js +2421 -0
- package/dist/cli/capabilityContext.js.map +1 -0
- package/dist/cli/commands/backfill.js +84 -0
- package/dist/cli/commands/backfill.js.map +1 -0
- package/dist/cli/commands/capability.js +44 -0
- package/dist/cli/commands/capability.js.map +1 -0
- package/dist/cli/commands/compact.js +148 -0
- package/dist/cli/commands/compact.js.map +1 -0
- package/dist/cli/commands/doctor.js +180 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/lint.js +179 -0
- package/dist/cli/commands/lint.js.map +1 -0
- package/dist/cli/commands/prime.js +545 -0
- package/dist/cli/commands/prime.js.map +1 -0
- package/dist/cli/commands/query.js +346 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/report.js +210 -0
- package/dist/cli/commands/report.js.map +1 -0
- package/dist/cli/commands/schema.js +306 -0
- package/dist/cli/commands/schema.js.map +1 -0
- package/dist/cli/commands/state.js +1012 -0
- package/dist/cli/commands/state.js.map +1 -0
- package/dist/cli/commands/upgrade.js +49 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/commands/validate.js +519 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/commands/verify.js +204 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/dispatch.js +962 -0
- package/dist/cli/dispatch.js.map +1 -0
- package/dist/cli/orientation.js +595 -0
- package/dist/cli/orientation.js.map +1 -0
- package/dist/cli/prime-blob.js +3 -0
- package/dist/cli/prime-blob.js.map +1 -0
- package/dist/cli/stateQuery.js +292 -0
- package/dist/cli/stateQuery.js.map +1 -0
- package/dist/cli/structured.js +18 -0
- package/dist/cli/structured.js.map +1 -0
- package/dist/core/difflib.js +274 -0
- package/dist/core/difflib.js.map +1 -0
- package/dist/core/git.js +43 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/paths.js +50 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/pyjson.js +101 -0
- package/dist/core/pyjson.js.map +1 -0
- package/dist/core/sourceRoot.js +72 -0
- package/dist/core/sourceRoot.js.map +1 -0
- package/dist/core/toml.js +11 -0
- package/dist/core/toml.js.map +1 -0
- package/dist/core/yaml.js +25 -0
- package/dist/core/yaml.js.map +1 -0
- package/dist/eval/evalSkills.js +258 -0
- package/dist/eval/evalSkills.js.map +1 -0
- package/dist/eval/semanticEval.js +148 -0
- package/dist/eval/semanticEval.js.map +1 -0
- package/dist/eval/semanticFixtures.js +227 -0
- package/dist/eval/semanticFixtures.js.map +1 -0
- package/dist/hooks/common.js +160 -0
- package/dist/hooks/common.js.map +1 -0
- package/dist/hooks/compaction.js +935 -0
- package/dist/hooks/compaction.js.map +1 -0
- package/dist/hooks/cursorPreToolUse.js +19 -0
- package/dist/hooks/cursorPreToolUse.js.map +1 -0
- package/dist/hooks/cursorSessionStart.js +71 -0
- package/dist/hooks/cursorSessionStart.js.map +1 -0
- package/dist/hooks/sessionStart.js +209 -0
- package/dist/hooks/sessionStart.js.map +1 -0
- package/dist/hooks/sessionStop.js +212 -0
- package/dist/hooks/sessionStop.js.map +1 -0
- package/dist/hooks/validateArtifact.js +933 -0
- package/dist/hooks/validateArtifact.js.map +1 -0
- package/dist/registries/artifactRegistry.js +206 -0
- package/dist/registries/artifactRegistry.js.map +1 -0
- package/dist/registries/capabilityContract.js +310 -0
- package/dist/registries/capabilityContract.js.map +1 -0
- package/dist/registries/packageRegistry.js +641 -0
- package/dist/registries/packageRegistry.js.map +1 -0
- package/dist/registries/runtimeAdapterRegistry.js +315 -0
- package/dist/registries/runtimeAdapterRegistry.js.map +1 -0
- package/dist/setup/codex.js +1052 -0
- package/dist/setup/codex.js.map +1 -0
- package/dist/setup/copilot.js +227 -0
- package/dist/setup/copilot.js.map +1 -0
- package/dist/setup/cursor.js +127 -0
- package/dist/setup/cursor.js.map +1 -0
- package/dist/setup/doctor.js +1269 -0
- package/dist/setup/doctor.js.map +1 -0
- package/dist/state/installRoot.js +279 -0
- package/dist/state/installRoot.js.map +1 -0
- package/dist/state/progressCommit.js +289 -0
- package/dist/state/progressCommit.js.map +1 -0
- package/dist/state/startupAnalysis.js +1953 -0
- package/dist/state/startupAnalysis.js.map +1 -0
- package/dist/upgrade/appModel.js +189 -0
- package/dist/upgrade/appModel.js.map +1 -0
- package/dist/upgrade/channels.js +197 -0
- package/dist/upgrade/channels.js.map +1 -0
- package/dist/upgrade/compatibility.js +197 -0
- package/dist/upgrade/compatibility.js.map +1 -0
- package/dist/upgrade/doctor.js +368 -0
- package/dist/upgrade/doctor.js.map +1 -0
- package/dist/upgrade/migrateArtifactsV2ToV3.js +412 -0
- package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -0
- package/dist/upgrade/upgradeCommands.js +40 -0
- package/dist/upgrade/upgradeCommands.js.map +1 -0
- package/dist/upgrade/upgradeOrchestrator.js +280 -0
- package/dist/upgrade/upgradeOrchestrator.js.map +1 -0
- package/dist/validate/appHomeContract.js +150 -0
- package/dist/validate/appHomeContract.js.map +1 -0
- package/dist/validate/capability.js +412 -0
- package/dist/validate/capability.js.map +1 -0
- package/dist/validate/crossCapability.js +145 -0
- package/dist/validate/crossCapability.js.map +1 -0
- package/dist/validate/lifecycleAdapters.js +772 -0
- package/dist/validate/lifecycleAdapters.js.map +1 -0
- package/dist/validate/selfAudit.js +107 -0
- package/dist/validate/selfAudit.js.map +1 -0
- package/package.json +28 -8
- package/LICENSE +0 -201
- package/bin/agentera.mjs +0 -50
- package/lib/exec.mjs +0 -116
- package/lib/resolve.mjs +0 -129
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
# INSPEKTERA
|
|
2
|
+
|
|
3
|
+
**Integrity Navigation: Systematic Pattern Evaluation, Knowledge Tracing. Examine, Report, Advise.**
|
|
4
|
+
|
|
5
|
+
Codebase health audit: multi-dimensional structural quality evaluation with evidence-based findings, confidence scores, and trajectory tracking. The retrospective counterpart to realisera's forward motion: is the codebase getting better or just bigger?
|
|
6
|
+
|
|
7
|
+
Each invocation = one audit. Findings feed realisera's work selection via TODO.md. Skill introduction: `─── ⛶ inspektera · audit ───`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Visual identity
|
|
12
|
+
|
|
13
|
+
Glyph: **⛶** (protocol ref: SG3). Used in the mandatory exit marker.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## State artifacts
|
|
18
|
+
|
|
19
|
+
One file in `.agentera/`, bootstrapped if absent.
|
|
20
|
+
|
|
21
|
+
| File | Purpose | Bootstrap |
|
|
22
|
+
|------|---------|-----------|
|
|
23
|
+
| `HEALTH.md` | Canonical health artifact, stored as `.agentera/health.yaml` unless mapped otherwise. Findings, dimension grades, trajectory. | First audit entry in YAML form. |
|
|
24
|
+
|
|
25
|
+
Use `agentera describe --format json` and its `artifact_schemas` entry for `health` to locate the active installed schema; do not search Agentera directories manually. Existing health artifacts provide repository-local examples of the shape.
|
|
26
|
+
|
|
27
|
+
### Artifact path resolution
|
|
28
|
+
|
|
29
|
+
Before reading or writing any artifact, check if `.agentera/docs.yaml` exists. If it has an Artifact Mapping section, use the path specified for each canonical filename. If `.agentera/docs.yaml` doesn't exist or has no mapping for a given artifact, use the default layout: TODO.md, CHANGELOG.md, and DESIGN.md at the project root; canonical VISION.md at `.agentera/vision.yaml`; other agent-facing artifacts at `.agentera/*.yaml`. This applies to all artifact references in this capability, including cross-capability reads (VISION.md, `.agentera/decisions.yaml`, TODO.md, `.agentera/progress.yaml`).
|
|
30
|
+
|
|
31
|
+
### Contract
|
|
32
|
+
|
|
33
|
+
Before starting, read `references/contract.md` (at v2 skill location `skills/agentera/references/contract.md`) for authoritative values: token budgets, severity levels, format contracts, and other shared conventions referenced in the steps below. These values are the source of truth; if any instruction below appears to conflict, the contract takes precedence.
|
|
34
|
+
|
|
35
|
+
### health.yaml
|
|
36
|
+
|
|
37
|
+
Open with your read on the codebase before the structured data: what's improving, what's sliding, what surprised you. 1-2 sentences of interpretation, then the grades and findings back it up. The colleague says what they think, then shows the evidence.
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
audits:
|
|
41
|
+
- number: 1
|
|
42
|
+
date: YYYY-MM-DD
|
|
43
|
+
dimensions: [architecture_alignment, test_health]
|
|
44
|
+
findings_summary: "X critical, Y warnings, Z info"
|
|
45
|
+
overall: stable
|
|
46
|
+
dimension_grades:
|
|
47
|
+
- dimension: architecture_alignment
|
|
48
|
+
grade: B
|
|
49
|
+
findings:
|
|
50
|
+
- severity: degraded
|
|
51
|
+
title: Finding title
|
|
52
|
+
confidence: 80
|
|
53
|
+
location: file:line
|
|
54
|
+
evidence: What was observed.
|
|
55
|
+
impact: Why this matters.
|
|
56
|
+
suggested_action: Specific fix or investigation.
|
|
57
|
+
trends: What improved, degraded, or changed.
|
|
58
|
+
patterns_observed: De facto architecture patterns.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
Step markers: display `── step N/7: verb` before each step.
|
|
64
|
+
Steps: orient, select, assess, distill, audit, report, connect.
|
|
65
|
+
|
|
66
|
+
### Evidence context startup
|
|
67
|
+
|
|
68
|
+
Before Step 1, start evaluation state gathering with:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
agentera prime --context inspektera --format json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use the returned `evidence_context` before raw plan, progress, docs, health, TODO, or decisions artifacts. If `evidence_context.source_contract.complete_for_evidence_context` is true, do not read raw PLAN, PROGRESS, DOCS, HEALTH, TODO, or DECISIONS artifacts merely to reconstruct evaluation target, plan criteria, progress verification, docs state, health state, TODO state, protected-state checks, version checks, residual risks, fallback commands, caveats, provenance, or non-empty evidence flags.
|
|
75
|
+
|
|
76
|
+
If `evidence_context` is absent, incomplete, or caveated for a state family you need, run the listed `evidence_context.fallback_commands` first. If those are unavailable, use `capability_context.state.fallback_commands` from the same prime response. Raw artifact reads are last-resort diagnostics after listed CLI fallbacks, not normal evaluation startup behavior.
|
|
77
|
+
|
|
78
|
+
Preserve caveats from `evidence_context.state_family_caveats`, `evidence_context.residual_risks.attributed_items`, `decision_context.caveats`, `protected_state_checks.caveats`, and `version_checks.caveats` when reporting evaluation results. Do not hide, flatten, or reconstruct stale app/profile state, compacted decisions, protected-state boundaries, unavailable version evidence, absent publication or remote evidence, manual-check states, or residual risks. These caveats calibrate confidence; they are not approval to refresh installed apps, refresh profile state, read or edit `.agentera/vision.yaml`, read or edit objective state, contact remotes or registries, or invent missing history.
|
|
79
|
+
|
|
80
|
+
### Decision satisfaction authority
|
|
81
|
+
|
|
82
|
+
When an audit touches decision satisfaction, agents may mark provisional
|
|
83
|
+
satisfaction with evidence only. Inspektera must not mark, infer, or
|
|
84
|
+
user-confirm final satisfaction; only the user confirms final satisfaction. If
|
|
85
|
+
decisions are compacted, missing satisfaction state, open, provisional, or
|
|
86
|
+
review-needed, preserve the caveat and review pressure in findings and residual
|
|
87
|
+
risks instead of reconstructing hidden outcomes or claiming automation proved
|
|
88
|
+
intent.
|
|
89
|
+
|
|
90
|
+
## Step 1: Orient
|
|
91
|
+
|
|
92
|
+
Use complete `evidence_context` first for the evaluated target, current plan criteria, latest progress verification, docs state, health state, TODO state, decision caveats, protected-state checks, version checks, and residual risks. Only run listed CLI fallbacks before raw artifact reads when the context is incomplete for the state needed.
|
|
93
|
+
|
|
94
|
+
1. **Health state**: use `evidence_context.health_state` for prior audit findings, grades, current-state status, and caveats.
|
|
95
|
+
2. **Protected-state boundary**: use `evidence_context.protected_state_checks` and preserve any not-checked-by-design caveats instead of reading protected state.
|
|
96
|
+
3. **Decision context**: use `evidence_context.decision_context` for decision caveats. Findings contradicting deliberate decisions are not findings.
|
|
97
|
+
4. **TODO state**: use `evidence_context.todo_state` for known problems. Don't re-report unless worsened.
|
|
98
|
+
5. **Progress verification**: use `evidence_context.progress_verification` for recent-cycle verification and caveats.
|
|
99
|
+
5b. **Change magnitude**: if CLI progress evidence exposes commit hashes from cycles since the last health audit timestamp, run `git log --stat` on those commits to estimate total change volume. If CLI progress evidence has no commit hashes, skip; default depth applies.
|
|
100
|
+
5c. **Plan context** (for artifact current-state review): use `evidence_context.evaluation_target` and `evidence_context.plan_criteria` for the plan-relative baseline. If the evidence context reports no target, missing criteria, or missing current-state baseline, preserve that caveat; do not reconstruct it from raw plan state during normal startup.
|
|
101
|
+
6. **Decision profile**: use profile/app caveats already attributed in `evidence_context.residual_risks`; stale or unavailable profile state calibrates confidence but is not approval to refresh profile state or read profile directly during startup.
|
|
102
|
+
7. **Project discovery**: map directory structure, read dependency manifests, README, CLAUDE.md, AGENTS.md, identify language/stack/build commands, `git log --oneline -20`
|
|
103
|
+
|
|
104
|
+
Before proceeding: in your response, list the key structural facts (module boundaries, dependency patterns, test coverage gaps) you observed. These survive context compaction.
|
|
105
|
+
|
|
106
|
+
**Exit-early stop condition**: If `git diff` since the last `evidence_context.health_state` audit timestamp shows no file changes, report exit signal `complete: no changes since last audit` and stop.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Step 2: Select dimensions
|
|
111
|
+
|
|
112
|
+
Choose dimensions based on the codebase and user request. Not every dimension applies; a 200-line CLI doesn't need the same audit as a monorepo.
|
|
113
|
+
|
|
114
|
+
### Available dimensions
|
|
115
|
+
|
|
116
|
+
| Dimension | What it evaluates | When to include |
|
|
117
|
+
|-----------|-------------------|-----------------|
|
|
118
|
+
| **Architecture alignment** | Does the code match the stated architecture? Pattern mismatches, module boundary violations, layering breaks. | VISION.md or README describes architecture |
|
|
119
|
+
| **Pattern consistency** | Are patterns used consistently? Naming, error handling, structure, abstractions. | Any codebase with 5+ modules or files |
|
|
120
|
+
| **Coupling health** | Hidden dependencies, circular imports, god modules, inappropriate intimacy. | Any codebase with multiple modules |
|
|
121
|
+
| **Complexity hotspots** | Functions too long, deeply nested, high fan-out, accumulated conditionals. | Any codebase |
|
|
122
|
+
| **Test health** | Coverage gaps, test quality, test-to-code ratio, tests testing behavior vs implementation. | Project has tests |
|
|
123
|
+
| **Dependency health** | Outdated deps, security advisories, unused deps, dep sprawl, pinning discipline. | Project has external dependencies |
|
|
124
|
+
| **Version health** | Unreleased significant changes: `feat`/`fix` commits since the last version bump. | DOCS.md has a `versioning` convention block |
|
|
125
|
+
| **Artifact freshness** | Are state artifacts current relative to plan activity or recent development? Protected health dimension label; current prose should call the work artifact current-state review. Detects artifacts that should have been updated but weren't. | Plan context available (PLAN.md with `Created` date) or PROGRESS.md has entries |
|
|
126
|
+
| **Prose health** | Do artifact entries respect the writing rules? Checks verbosity overruns, abstraction creep, and filler accumulation across all project artifacts. | Project has 3+ artifact files |
|
|
127
|
+
| **Security hygiene** | Hardcoded secrets, dangerous function calls, basic injection patterns. Lightweight regex-based scan, not a replacement for dedicated security tooling. | Any codebase |
|
|
128
|
+
|
|
129
|
+
### Depth guidance
|
|
130
|
+
|
|
131
|
+
When change magnitude was derived in Step 1, apply advisory depth scaling:
|
|
132
|
+
|
|
133
|
+
- **Light changes** (roughly ≤5 files, ≤200 lines since last audit): prioritize dimensions most relevant to the changed areas. Skip dimensions with no intersection.
|
|
134
|
+
- **Standard changes** (default): assess all applicable dimensions at normal depth.
|
|
135
|
+
- **Heavy changes** (roughly ≥20 files or architectural-scope commits): assess all applicable dimensions and increase evidence collection depth. Read more files per dimension, trace more dependency paths, check more edge cases.
|
|
136
|
+
|
|
137
|
+
These thresholds are guidelines, not hard rules. Use judgment: a 6-file change touching a critical security module warrants thorough depth, while a 25-file rename is light.
|
|
138
|
+
|
|
139
|
+
**User specified dimensions**: audit only those.
|
|
140
|
+
**Full audit or unspecified**: auto-select all applicable. Report selections before proceeding.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Step 3: Assess
|
|
145
|
+
|
|
146
|
+
Lead the assessment with your overall interpretation: what stands out, what's changed, where attention should go. Then the per-dimension breakdown provides the evidence.
|
|
147
|
+
|
|
148
|
+
Launch parallel agents, one per dimension. Each receives the dimension definition, language-specific commands from `references/audit-commands.md` (at v2 skill location `skills/agentera/references/audit-commands.md`), relevant context files, the confidence scoring rubric, and instructions to return structured findings.
|
|
149
|
+
|
|
150
|
+
**Before deep analysis**: run the quick checklist for a rapid pass/fail sweep. Dimensions passing all items can be audited at lower priority.
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
You are auditing the [dimension] health of [project].
|
|
154
|
+
|
|
155
|
+
## What to evaluate
|
|
156
|
+
[Dimension-specific instructions from below]
|
|
157
|
+
|
|
158
|
+
## Evidence standard
|
|
159
|
+
Every finding MUST include:
|
|
160
|
+
- Specific file and line references
|
|
161
|
+
- Quoted code showing the issue
|
|
162
|
+
- Explanation of why it matters
|
|
163
|
+
- Confidence score (0-100)
|
|
164
|
+
|
|
165
|
+
## Presenting findings
|
|
166
|
+
Introduce each finding conversationally before the structured evidence. The colleague
|
|
167
|
+
says "hey, I noticed this" instead of just dumping a finding card. Lead with why it caught your eye and what it means, then back it up with the evidence block.
|
|
168
|
+
|
|
169
|
+
## Confidence scoring (protocol: CS1-CS5)
|
|
170
|
+
- 90-100 (CS1): Definitely a real issue. Verified by reading the code. Clear impact.
|
|
171
|
+
- 70-89 (CS2): Very likely a real issue. Strong evidence, but some context might justify it.
|
|
172
|
+
- 50-69 (CS3): Possibly an issue. The pattern is suspicious but could be intentional.
|
|
173
|
+
- 30-49 (CS4): Uncertain. Might be an issue, might be a reasonable tradeoff.
|
|
174
|
+
- 0-29 (CS5): Speculative. Flagging it but wouldn't be surprised if it's fine.
|
|
175
|
+
|
|
176
|
+
## What is NOT a finding
|
|
177
|
+
- Pre-existing patterns that are consistent and deliberate
|
|
178
|
+
- Things a linter or type checker would catch (assume CI handles those)
|
|
179
|
+
- Subjective style preferences not grounded in stated project principles
|
|
180
|
+
- Known issues already tracked in TODO.md
|
|
181
|
+
- Intentional decisions documented in DECISIONS.md
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Architecture alignment
|
|
185
|
+
|
|
186
|
+
Compare codebase to stated architecture:
|
|
187
|
+
|
|
188
|
+
- Read VISION.md (or README.md architecture section) for intended structure
|
|
189
|
+
- Map actual module boundaries, dependency graph, data flow
|
|
190
|
+
- Identify mismatches from stated architecture
|
|
191
|
+
- Check layering and boundary cleanliness
|
|
192
|
+
- Extract "Patterns Observed": de facto architecture independent of documentation
|
|
193
|
+
|
|
194
|
+
No documented architecture? Extract and report de facto; note absence as a finding.
|
|
195
|
+
|
|
196
|
+
### Pattern consistency
|
|
197
|
+
|
|
198
|
+
Check consistency across the codebase:
|
|
199
|
+
|
|
200
|
+
- Error handling (returns vs throws vs error types)
|
|
201
|
+
- Naming (singular vs plural, prefixes, casing)
|
|
202
|
+
- Module structure and layout similarity
|
|
203
|
+
- Competing abstractions for the same concept
|
|
204
|
+
- Duplicated logic that should be shared
|
|
205
|
+
- Config handling (env vars vs files vs flags)
|
|
206
|
+
|
|
207
|
+
Focus on inconsistencies between similar things, not whether the chosen pattern is "best."
|
|
208
|
+
|
|
209
|
+
### Coupling health
|
|
210
|
+
|
|
211
|
+
Evaluate coupling and dependency structure:
|
|
212
|
+
|
|
213
|
+
- Map import graphs, identify circular dependencies
|
|
214
|
+
- Find god modules (too many dependents or dependencies)
|
|
215
|
+
- Check for inappropriate intimacy (reaching into internals)
|
|
216
|
+
- Evaluate interface width: narrow boundaries or exposing everything?
|
|
217
|
+
- Check hidden coupling via shared mutable state, global config, side effects
|
|
218
|
+
|
|
219
|
+
Use language tools (`go list`, `madge`, import analysis). If unavailable, trace imports manually on highest-risk modules.
|
|
220
|
+
|
|
221
|
+
### Complexity hotspots
|
|
222
|
+
|
|
223
|
+
Find accumulating complexity:
|
|
224
|
+
|
|
225
|
+
- Long functions (generally 50+ lines), deep nesting (3+ levels)
|
|
226
|
+
- High fan-out, growing switch/match statements, many parameters (5+)
|
|
227
|
+
- Files growing cycle over cycle (check git history)
|
|
228
|
+
|
|
229
|
+
Prioritize high-change files: frequently modified + complex = high risk.
|
|
230
|
+
|
|
231
|
+
### Test health
|
|
232
|
+
|
|
233
|
+
Evaluate test suite quality and coverage:
|
|
234
|
+
|
|
235
|
+
- Run coverage tools if available, otherwise estimate from file analysis
|
|
236
|
+
- Identify critical paths with no coverage
|
|
237
|
+
- Check: testing behavior or implementation? Excessive mocking? Brittle assertions?
|
|
238
|
+
- Evaluate test naming: can you understand what failed from the name alone?
|
|
239
|
+
- Check test-to-code ratio per major module
|
|
240
|
+
- Check test proportionality against contract: default is one pass + one fail per testable unit. Flag under-testing and over-testing.
|
|
241
|
+
|
|
242
|
+
Don't just report a number. Identify the *highest-risk* coverage gaps.
|
|
243
|
+
|
|
244
|
+
### Dependency health
|
|
245
|
+
|
|
246
|
+
Evaluate dependency management:
|
|
247
|
+
|
|
248
|
+
- Outdated deps (package manager audit/outdated commands)
|
|
249
|
+
- Known security vulnerabilities (npm audit, safety check, govulncheck)
|
|
250
|
+
- Unused deps (installed but not imported)
|
|
251
|
+
- Dep sprawl relative to project scope
|
|
252
|
+
- Pinning discipline (pinned or floating?)
|
|
253
|
+
- Vendored vs remote consistency
|
|
254
|
+
|
|
255
|
+
### Version health
|
|
256
|
+
|
|
257
|
+
Only run this dimension if DOCS.md exists and contains a `versioning` convention block. Skip entirely if the convention is absent.
|
|
258
|
+
|
|
259
|
+
- Read DOCS.md `Conventions.versioning` to identify the version file(s) and bump trigger rules
|
|
260
|
+
- Run `git log --oneline` to find `feat` and `fix` commits since the last modification date of the version file(s)
|
|
261
|
+
- Count unbumped `feat`/`fix` commits and note the age of the oldest one
|
|
262
|
+
- Severity: warning (SF2) if 1-4 unbumped commits or age ≤ 7 days; critical (SF1) if 5+ unbumped commits or age > 7 days
|
|
263
|
+
- If no `feat`/`fix` commits have landed since the last bump, this dimension is healthy with no finding
|
|
264
|
+
|
|
265
|
+
### Artifact current-state review
|
|
266
|
+
|
|
267
|
+
Evaluates whether state artifacts are current relative to plan activity or recent development. The persisted health dimension label remains `Artifact freshness`; current prose should call the work artifact current-state review. Uses the staleness convention from contract.
|
|
268
|
+
|
|
269
|
+
**With plan context** (PLAN.md has a created date and task execution history):
|
|
270
|
+
|
|
271
|
+
- Read the plan's `Created` date from its HTML comment metadata
|
|
272
|
+
- Identify which capabilities were dispatched during the plan by scanning task entries and PROGRESS.md cycle logs
|
|
273
|
+
- For each dispatched capability, look up its expected artifacts in the contract staleness detection mapping
|
|
274
|
+
- Check each expected artifact's last modification date: `git log -1 --format=%aI -- <path>`
|
|
275
|
+
- An artifact is **stale** if its last modification predates the plan's creation date AND the capability that owns it was dispatched at least once during the plan
|
|
276
|
+
- Severity: warning (SF2, confidence 70+). Plan-relative staleness carries causal evidence.
|
|
277
|
+
- Artifacts that a capability reads but does not produce are not staleness candidates
|
|
278
|
+
|
|
279
|
+
**Without plan context** (no PLAN.md, or PLAN.md has no created date):
|
|
280
|
+
|
|
281
|
+
- Fall back to PROGRESS.md recency: an artifact is potentially stale if it was not modified since the most recent PROGRESS.md cycle entry date
|
|
282
|
+
- If PROGRESS.md has no entries (fresh project), no staleness check applies
|
|
283
|
+
- Severity: info (SF3, confidence 50-60). The fallback is advisory, not authoritative.
|
|
284
|
+
|
|
285
|
+
**Handling**: stale artifact findings are reported like any other dimension finding but noted as context for the next plan cycle, not as blocking errors.
|
|
286
|
+
|
|
287
|
+
### Prose health
|
|
288
|
+
|
|
289
|
+
Evaluate artifact prose quality against the three Self-Audit Protocol rules. Use routine CLI state first for artifact-backed context, including `agentera decisions --format json` for DECISIONS.md. Preserve returned decision `missing_fields`, `compacted`, `caveats`, and `satisfaction.review_needed` pressure; raw decision artifact reads are for artifact-quality inspection, corruption diagnostics, or CLI defects, not normal post-CLI context recovery. Read all project artifacts (PROGRESS.md, DECISIONS.md, PLAN.md, HEALTH.md, TODO.md, CHANGELOG.md, VISION.md, DESIGN.md, DOCS.md) and check each entry when the prose-health audit explicitly requires raw artifact prose.
|
|
290
|
+
|
|
291
|
+
**Rule 1: Verbosity overrun**: approximate word count per entry. Compare against per-entry budgets. Entries exceeding their budget by 50%+ are findings.
|
|
292
|
+
|
|
293
|
+
**Rule 2: Abstraction creep**: scan each entry for ≥1 concrete anchor (file path with extension, line number, commit hash with 7+ hex chars, metric value with unit, identifier such as function/class/variable name, direct quote in quotes attributed to a source). Entries with zero concrete anchors are findings.
|
|
294
|
+
|
|
295
|
+
**Rule 3: Filler accumulation**: scan each entry against banned verbosity patterns. Flag entries containing: meta-commentary about writing, hedging qualifiers, redundant transitions, self-referential process narration, filler introductions, summary preambles, excessive justification.
|
|
296
|
+
|
|
297
|
+
### Security hygiene
|
|
298
|
+
|
|
299
|
+
Lightweight regex-based scan for common security anti-patterns. This is a surface-level check, not a replacement for dedicated security analysis. Always recommend specialized tools for comprehensive coverage.
|
|
300
|
+
|
|
301
|
+
**What to scan**:
|
|
302
|
+
|
|
303
|
+
- **Hardcoded secrets**: API key patterns, password assignments, token strings in source, private keys in files
|
|
304
|
+
- **Dangerous function calls**: `eval()` on variables or user input, `exec()` with string concatenation, subprocess/os.system with unsanitized input
|
|
305
|
+
- **Basic injection patterns**: SQL string concatenation, unsanitized shell command construction
|
|
306
|
+
|
|
307
|
+
**How to scan**: Use Grep with targeted patterns across the codebase. Focus on source files, not vendored dependencies, build artifacts, or lock files. Exclude `.git/`, `node_modules/`, `vendor/`, `__pycache__/`, and similar directories.
|
|
308
|
+
|
|
309
|
+
**Severity assignment**:
|
|
310
|
+
|
|
311
|
+
- Hardcoded secrets: warning (SF2, confidence 75-90)
|
|
312
|
+
- Dangerous function calls: warning (SF2) or critical (SF1) depending on user input flow
|
|
313
|
+
- Injection patterns: warning (SF2, confidence 60-80)
|
|
314
|
+
|
|
315
|
+
**Scope limitation notice**: every security hygiene finding MUST include a footer recommending dedicated security tools for comprehensive analysis.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Step 4: Distill
|
|
320
|
+
|
|
321
|
+
After all agents complete:
|
|
322
|
+
|
|
323
|
+
1. **Filter**: discard findings below 50 confidence. Mark 50-69 as "info" (SF3) regardless of apparent severity.
|
|
324
|
+
2. **Deduplicate**: merge by preference: (1) fullest context, (2) most evidence-rich dimension, (3) most recent. Preserve complementary evidence from discarded findings.
|
|
325
|
+
3. **Cross-reference** against DECISIONS.md and TODO.md using `agentera decisions --format json` for normal decision context:
|
|
326
|
+
- Matches known decision → discard or downgrade to info (SF3)
|
|
327
|
+
- Matches known issue → "already tracked", skip
|
|
328
|
+
- Genuinely new → include at full severity
|
|
329
|
+
4. **Grade** each dimension:
|
|
330
|
+
- **A**: No critical/warning findings. **B**: No critical, some warnings.
|
|
331
|
+
- **C**: 1-2 critical or many warnings. **D**: Multiple critical.
|
|
332
|
+
- **F**: Pervasive critical findings.
|
|
333
|
+
5. **Trajectory**: compare to prior HEALTH.md: improved (VT12), degraded (VT13), stable dimensions. Calculate overall trajectory.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Step 5: Pre-write self-audit
|
|
338
|
+
|
|
339
|
+
Pre-write self-audit: run `agentera lint --artifact <ARTIFACT> --text "<DRAFT>"` (or `--file <PATH>`; schema names such as `decisions` auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns (per-artifact budget), abstraction creep (>=1 concrete anchor), and filler accumulation (banned patterns table).
|
|
340
|
+
Max 3 revision attempts. Flag with [post-audit-flagged] if still failing.
|
|
341
|
+
|
|
342
|
+
Narration voice (riff, don't script):
|
|
343
|
+
"Tightening this up..." · "Cutting the filler first..." · "One more pass..."
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Step 6: Report
|
|
348
|
+
|
|
349
|
+
Assess each dimension in your response. Write ONLY grade, trajectory marker, and finding summary per dimension to HEALTH.md. No reasoning in the artifact; the conversation preserves analysis, the artifact preserves conclusions.
|
|
350
|
+
|
|
351
|
+
Output constraint per contract token budgets. Letter grade + ≤3 sentences justification per dimension.
|
|
352
|
+
|
|
353
|
+
When updating existing HEALTH.md entries (e.g., updating patterns observed), edit the specific YAML entry rather than rewriting unrelated history. Append new audit entries.
|
|
354
|
+
|
|
355
|
+
Write the audit results to `HEALTH.md` using its resolved YAML path (append new audit, keep prior audits for trajectory history) and present to the user.
|
|
356
|
+
|
|
357
|
+
After writing a new audit entry to HEALTH.md, apply the schema COMPACTION rules before writing if thresholds are exceeded: keep 10 full audits, keep up to 40 one-line archive entries, and drop beyond 50 total.
|
|
358
|
+
|
|
359
|
+
Artifact writing follows contract Artifact Writing Conventions: banned verbosity patterns, 25-word sentence cap, preferred vocabulary, and lead-with-conclusion structure.
|
|
360
|
+
|
|
361
|
+
### Report structure
|
|
362
|
+
|
|
363
|
+
```markdown
|
|
364
|
+
## Audit N · YYYY-MM-DD
|
|
365
|
+
|
|
366
|
+
**Dimensions assessed**: [list]
|
|
367
|
+
**Findings**: X critical, Y warnings, Z info (N filtered by confidence)
|
|
368
|
+
**Overall trajectory**: ⮉ improving | stable | ⮋ degrading vs Audit N-1
|
|
369
|
+
**Grades**: Architecture [B] | Patterns [A] | Coupling [C] | Complexity [B] | Tests [D] | Deps [A] | Security [A]
|
|
370
|
+
|
|
371
|
+
### [Dimension Name]: [Grade]
|
|
372
|
+
|
|
373
|
+
#### ⇶ [Finding title], critical (confidence: N/100)
|
|
374
|
+
#### ⇉ [Finding title], warning (confidence: N/100)
|
|
375
|
+
#### ⇢ [Finding title], info (confidence: N/100)
|
|
376
|
+
- **Location**: `file:line` (or module/package)
|
|
377
|
+
- **Evidence**: [quoted code or structural observation]
|
|
378
|
+
- **Impact**: [what breaks, degrades, or risks]
|
|
379
|
+
- **Suggested action**: [specific fix, investigation, or refactor]
|
|
380
|
+
|
|
381
|
+
[Repeat for each finding, ordered by severity then confidence]
|
|
382
|
+
|
|
383
|
+
### Trends vs Audit N-1
|
|
384
|
+
- **Improved**: [what got better and why]
|
|
385
|
+
- **Degraded**: [what got worse and why]
|
|
386
|
+
- **New findings**: [issues not present in prior audit]
|
|
387
|
+
- **Resolved**: [prior findings no longer present]
|
|
388
|
+
|
|
389
|
+
### Patterns Observed
|
|
390
|
+
[De facto architecture patterns extracted, the "what IS" independent of what's stated.]
|
|
391
|
+
- Module structure: [how code is organized]
|
|
392
|
+
- Error handling: [predominant pattern]
|
|
393
|
+
- Testing approach: [how tests are structured]
|
|
394
|
+
- Dependency patterns: [how deps are managed]
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Step 7: Connect
|
|
400
|
+
|
|
401
|
+
Feed actionable findings into the suite:
|
|
402
|
+
|
|
403
|
+
1. **TODO.md**: for each critical finding not already tracked, offer to add under the appropriate severity section.
|
|
404
|
+
Severity mapping (protocol: SM1-SM3): critical (SF1) → `## ⇶ Critical` (SI1), warning (SF2) → `## ⇉ Degraded` (SI2), info (SF3) → `## ⇢ Annoying` (SI4). Each entry is a checkbox line: `- [ ] [finding description]`. Get user confirmation before writing.
|
|
405
|
+
Output constraint per contract token budgets.
|
|
406
|
+
2. **VISION.md**: if architecture has intentionally evolved past stated architecture, suggest updating via ❈ resonera.
|
|
407
|
+
3. **Present findings** and ask if the user wants to: file to TODO.md, deliberate via ❈ resonera, deep-dive on a dimension, or investigate a specific finding.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Safety rails
|
|
412
|
+
|
|
413
|
+
<critical>
|
|
414
|
+
|
|
415
|
+
- NEVER modify code. Inspektera audits; other capabilities fix.
|
|
416
|
+
- NEVER file issues to TODO.md without explicit user confirmation.
|
|
417
|
+
- NEVER present speculative findings (confidence < 50) as definitive problems.
|
|
418
|
+
- NEVER ignore DECISIONS.md context. If a finding contradicts a deliberate decision,
|
|
419
|
+
it is not a finding but an implementation of that decision. Discard or downgrade.
|
|
420
|
+
- NEVER report known issues already tracked in TODO.md as new findings.
|
|
421
|
+
- NEVER flag subjective style preferences as findings unless they violate stated principles
|
|
422
|
+
in VISION.md, CLAUDE.md, or the decision profile.
|
|
423
|
+
- NEVER run destructive commands or install packages. Read-only assessment.
|
|
424
|
+
|
|
425
|
+
</critical>
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## Exit signals
|
|
430
|
+
|
|
431
|
+
Report one of these statuses at workflow completion (protocol refs: EX1-EX4).
|
|
432
|
+
|
|
433
|
+
Format: `─── ⛶ inspektera · status ───` followed by a summary sentence.
|
|
434
|
+
For flagged, stuck, and waiting: add `▸` bullet details below the summary.
|
|
435
|
+
|
|
436
|
+
- **complete** (EX1): All selected audit dimensions were assessed, findings were synthesized, grades were assigned, HEALTH.md was updated, and the user was presented with actionable results.
|
|
437
|
+
- **flagged** (EX2): The audit completed but with notable caveats: one or more dimensions had to be skipped due to missing tooling, confidence was too low to grade a dimension reliably, or critical findings were discovered that require urgent attention beyond the audit scope.
|
|
438
|
+
- **stuck** (EX3): Cannot complete the audit because the project is inaccessible, required language tooling is unavailable and manual analysis is not feasible, or filing findings to TODO.md was declined by the user and the results cannot be safely surfaced any other way.
|
|
439
|
+
- **waiting** (EX4): The audit target is ambiguous: no project was identified, the codebase is too incomplete to assess meaningfully, or the user's request specifies dimensions that cannot be evaluated without additional information.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## Cross-capability integration
|
|
444
|
+
|
|
445
|
+
Inspektera is part of a twelve-capability suite. It is the feedback loop, the capability that tells realisera whether its work is making things better.
|
|
446
|
+
|
|
447
|
+
### Inspektera feeds ⧉ realisera
|
|
448
|
+
|
|
449
|
+
Critical and warning findings filed to TODO.md become candidates for realisera's work selection. The severity mapping ensures structural problems compete fairly with feature work. The "Patterns Observed" section helps realisera understand the codebase's de facto architecture when planning changes.
|
|
450
|
+
|
|
451
|
+
### Inspektera feeds ❈ resonera
|
|
452
|
+
|
|
453
|
+
When the audit reveals an architecture mismatch, suggest ❈ resonera before fixes begin.
|
|
454
|
+
|
|
455
|
+
Use it when code has moved past stated architecture or competing patterns need a decision.
|
|
456
|
+
|
|
457
|
+
### Inspektera feeds ≡ planera
|
|
458
|
+
|
|
459
|
+
When the audit reveals multiple related structural issues, suggest ≡ planera to create a remediation plan. The plan's acceptance criteria give inspektera concrete targets to verify in the next audit.
|
|
460
|
+
|
|
461
|
+
### Inspektera feeds ⎘ optimera
|
|
462
|
+
|
|
463
|
+
When a dimension grade is poor and the improvement is measurable (test coverage, dependency count, complexity score), the finding can become an optimization objective. Suggest ⎘ optimera when the metric and direction are clear.
|
|
464
|
+
|
|
465
|
+
### Inspektera reads ⧉ realisera output
|
|
466
|
+
|
|
467
|
+
PROGRESS.md tells inspektera what was built recently. Recent changes are higher-priority audit targets because they're the most likely source of regressions or pattern breaks. Cycle count since last audit signals when a health check is overdue.
|
|
468
|
+
|
|
469
|
+
### Inspektera reads ❈ resonera output
|
|
470
|
+
|
|
471
|
+
DECISIONS.md explains why things are the way they are. Findings that contradict deliberate decisions are not findings. This prevents inspektera from flagging intentional tradeoffs as problems.
|
|
472
|
+
|
|
473
|
+
### Inspektera reads ◰ visualisera output
|
|
474
|
+
|
|
475
|
+
DESIGN.md provides visual identity constraints that inspektera can audit for consistency, checking whether the codebase respects the declared design tokens and patterns.
|
|
476
|
+
|
|
477
|
+
### Inspektera is informed by ♾ profilera
|
|
478
|
+
|
|
479
|
+
The decision profile calibrates what "healthy" means for this user. A user who values simplicity over flexibility will have different complexity thresholds than one who values extensibility. High-confidence quality preferences from the profile weight the grading.
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## Getting started
|
|
484
|
+
|
|
485
|
+
### First audit
|
|
486
|
+
|
|
487
|
+
1. `/agentera audit`: runs a full audit across all applicable dimensions, bootstraps HEALTH.md
|
|
488
|
+
2. Review findings, file critical ones to TODO.md
|
|
489
|
+
3. `/agentera build`: next cycle picks up the filed issues and starts fixing
|
|
490
|
+
|
|
491
|
+
### Periodic health checks
|
|
492
|
+
|
|
493
|
+
Run ⛶ inspektera every 5-10 realisera cycles, or when:
|
|
494
|
+
|
|
495
|
+
- A major feature was added
|
|
496
|
+
- Significant refactoring occurred
|
|
497
|
+
- The codebase "feels" harder to work in
|
|
498
|
+
- Before a major architectural decision (to understand current state)
|
|
499
|
+
|
|
500
|
+
Hej mirrors this cadence through hybrid audit staleness: `agentera hej` marks a health audit stale when days since the latest audit date reach `AGENTERA_INSPEKTERA_MAX_AGE_DAYS` (default 30) or progress cycles after that audit date reach `AGENTERA_INSPEKTERA_MAX_CYCLES` (default 10). Either axis exceeding its threshold is enough; when progress is absent, time-only evaluation still applies.
|
|
501
|
+
|
|
502
|
+
### Targeted audits
|
|
503
|
+
|
|
504
|
+
```
|
|
505
|
+
/agentera audit architecture coupling
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Specify dimensions to narrow the audit scope. Useful after specific kinds of changes.
|
|
509
|
+
|
|
510
|
+
### After an audit
|
|
511
|
+
|
|
512
|
+
- **Good grades (A/B)**: Celebrate. Keep building.
|
|
513
|
+
- **Mixed grades (C)**: File the critical findings, deliberate on the warnings.
|
|
514
|
+
- **Poor grades (D/F)**: Consider pausing feature work. Use ❈ resonera to deliberate on priorities, then ⧉ realisera to fix the structural problems before building more.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
ARTIFACTS:
|
|
2
|
+
1:
|
|
3
|
+
id: A1
|
|
4
|
+
artifact_id: health
|
|
5
|
+
local_role: produces_and_consumes
|
|
6
|
+
description: >-
|
|
7
|
+
Codebase health assessment with findings, dimension grades, and trajectory.
|
|
8
|
+
Inspektera writes audit entries with per-dimension grades, findings with
|
|
9
|
+
severity and confidence scores, trend comparisons, and de facto
|
|
10
|
+
architecture patterns. During evaluation startup, Inspektera consumes health
|
|
11
|
+
state through CLI `evidence_context` before raw health artifact fallback.
|
|
12
|
+
2:
|
|
13
|
+
id: A2
|
|
14
|
+
artifact_id: vision
|
|
15
|
+
local_role: consumes
|
|
16
|
+
description: >-
|
|
17
|
+
Inspektera treats vision state as protected during evidence-context startup;
|
|
18
|
+
missing or not-checked vision caveats from CLI `evidence_context` are preserved
|
|
19
|
+
instead of forcing a raw vision read.
|
|
20
|
+
3:
|
|
21
|
+
id: A3
|
|
22
|
+
artifact_id: decisions
|
|
23
|
+
local_role: consumes
|
|
24
|
+
description: >-
|
|
25
|
+
Inspektera consumes decision caveats through CLI `evidence_context` and the
|
|
26
|
+
listed `agentera decisions --format json` fallback before raw decisions artifact fallback.
|
|
27
|
+
Compacted decision caveats must be preserved rather than reconstructed.
|
|
28
|
+
4:
|
|
29
|
+
id: A4
|
|
30
|
+
artifact_id: todo
|
|
31
|
+
local_role: produces_and_consumes
|
|
32
|
+
description: >-
|
|
33
|
+
Inspektera reads this to avoid re-reporting known issues and writes to it
|
|
34
|
+
with user confirmation when filing
|
|
35
|
+
critical and warning findings. During evaluation startup, known TODO state is
|
|
36
|
+
consumed through CLI `evidence_context` before raw TODO artifact fallback.
|
|
37
|
+
5:
|
|
38
|
+
id: A5
|
|
39
|
+
artifact_id: progress
|
|
40
|
+
local_role: consumes
|
|
41
|
+
description: >-
|
|
42
|
+
Inspektera consumes latest progress verification and progress caveats through
|
|
43
|
+
CLI `evidence_context` before raw progress artifact fallback.
|
|
44
|
+
6:
|
|
45
|
+
id: A6
|
|
46
|
+
artifact_id: plan
|
|
47
|
+
local_role: consumes
|
|
48
|
+
description: >-
|
|
49
|
+
Inspektera consumes evaluation target and plan criteria through CLI
|
|
50
|
+
`evidence_context` before raw plan artifact fallback. The plan's Created date
|
|
51
|
+
still provides the artifact-current-state baseline when that state is needed.
|
|
52
|
+
7:
|
|
53
|
+
id: A7
|
|
54
|
+
artifact_id: design
|
|
55
|
+
local_role: consumes
|
|
56
|
+
description: >-
|
|
57
|
+
Inspektera treats design state as optional during evidence-context startup;
|
|
58
|
+
missing design caveats from CLI `evidence_context` are preserved before any raw
|
|
59
|
+
design artifact fallback.
|
|
60
|
+
8:
|
|
61
|
+
id: A8
|
|
62
|
+
artifact_id: docs
|
|
63
|
+
local_role: consumes
|
|
64
|
+
description: >-
|
|
65
|
+
Inspektera reads this first to resolve project-local artifact mappings
|
|
66
|
+
and checks the versioning convention for the version health dimension. During
|
|
67
|
+
evaluation startup, docs state and version-boundary caveats are consumed through
|
|
68
|
+
CLI `evidence_context` before raw docs artifact fallback.
|
|
69
|
+
9:
|
|
70
|
+
id: A9
|
|
71
|
+
artifact_id: profile
|
|
72
|
+
local_role: consumes
|
|
73
|
+
description: >-
|
|
74
|
+
Inspektera consumes profile status and stale-profile caveats through CLI
|
|
75
|
+
`evidence_context`; stale or missing profile state is preserved as a caveat and
|
|
76
|
+
is not approval to refresh profile state or read profile directly during startup.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
EXIT_CONDITIONS:
|
|
2
|
+
1:
|
|
3
|
+
id: E1
|
|
4
|
+
condition: complete
|
|
5
|
+
description: >-
|
|
6
|
+
All selected audit dimensions were assessed, findings were synthesized,
|
|
7
|
+
grades were assigned, HEALTH.md was updated, and the user was presented
|
|
8
|
+
with actionable results.
|
|
9
|
+
exit_signal: complete
|
|
10
|
+
2:
|
|
11
|
+
id: E2
|
|
12
|
+
condition: flagged
|
|
13
|
+
description: >-
|
|
14
|
+
The audit completed but with notable caveats: dimensions were skipped
|
|
15
|
+
due to missing tooling, confidence was too low to grade reliably, or
|
|
16
|
+
critical findings require urgent attention beyond audit scope.
|
|
17
|
+
Each concern is listed explicitly.
|
|
18
|
+
exit_signal: flagged
|
|
19
|
+
3:
|
|
20
|
+
id: E3
|
|
21
|
+
condition: stuck
|
|
22
|
+
description: >-
|
|
23
|
+
Cannot complete the audit because the project is inaccessible, required
|
|
24
|
+
language tooling is unavailable and manual analysis is not feasible, or
|
|
25
|
+
filing findings to TODO.md was declined by the user and results cannot
|
|
26
|
+
be safely surfaced any other way.
|
|
27
|
+
exit_signal: stuck
|
|
28
|
+
4:
|
|
29
|
+
id: E4
|
|
30
|
+
condition: waiting
|
|
31
|
+
description: >-
|
|
32
|
+
The audit target is ambiguous: no project was identified, the codebase
|
|
33
|
+
is too incomplete to assess meaningfully, or the user's request
|
|
34
|
+
specifies dimensions that cannot be evaluated without additional
|
|
35
|
+
information.
|
|
36
|
+
exit_signal: waiting
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
TRIGGERS:
|
|
2
|
+
1:
|
|
3
|
+
id: T1
|
|
4
|
+
description: >-
|
|
5
|
+
Direct invocation by name or slash command. Matches when the user
|
|
6
|
+
explicitly requests inspektera.
|
|
7
|
+
priority: high
|
|
8
|
+
patterns:
|
|
9
|
+
- "inspektera"
|
|
10
|
+
- "/inspektera"
|
|
11
|
+
2:
|
|
12
|
+
id: T2
|
|
13
|
+
description: >-
|
|
14
|
+
Audit and codebase health requests. Matches when the user wants to
|
|
15
|
+
assess codebase health, architecture quality, or structural integrity.
|
|
16
|
+
priority: medium
|
|
17
|
+
patterns:
|
|
18
|
+
- "audit the codebase"
|
|
19
|
+
- "check code health"
|
|
20
|
+
- "architecture review"
|
|
21
|
+
- "find technical debt"
|
|
22
|
+
- "assess code quality"
|
|
23
|
+
- "how healthy is this codebase"
|
|
24
|
+
- "what needs fixing"
|
|
25
|
+
- "structural review"
|
|
26
|
+
- "pattern audit"
|
|
27
|
+
- "dependency check"
|
|
28
|
+
- "test coverage audit"
|
|
29
|
+
3:
|
|
30
|
+
id: T3
|
|
31
|
+
description: >-
|
|
32
|
+
Implicit trigger after extended realisera activity. Matches when
|
|
33
|
+
realisera has run 5+ cycles without a health check and the system
|
|
34
|
+
detects an overdue audit.
|
|
35
|
+
priority: medium
|
|
36
|
+
patterns:
|
|
37
|
+
- "health check overdue"
|
|
38
|
+
- "audit after realisera"
|