2.2 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ordinal |
|---|---|---|---|---|---|---|---|---|---|
| TASK-32 | Wire v3 skill registry into audit generation | In Progress | 2026-06-06 20:27 | 2026-06-06 20:36 | high | 34000 |
Description
Fix the final review finding by using the v3 skills registry and v3 finding validation in the live audit generation path while preserving best-effort fallback behavior.
Acceptance Criteria
- #1 auditGenerationAction loads and passes a non-empty v3 skill registry from v2_elemente/skills.md/loadSkillsRegistry when available
- #2 Classification uses a v3 findings schema live instead of legacy-only internalFindingsSchema
- #3 Audit persistence validators accept v3 usedSkills with id and optional category without forcing undefined category fields
Implementation Plan
- Read current audit generation, schemas, validators, and focused tests
- Add RED source-contract/schema tests for v3 registry, v3 classification, and optional usedSkill category
- Run focused tests and record failures
- Implement minimal wiring and validator/schema changes
- Run focused tests green plus relevant verification
- Self-review scope and update task notes without closing
Implementation Notes
RED: pnpm test tests/audit-generation-action-source.test.ts tests/ai-schemas.test.ts tests/audit-skills-schema.test.ts tests/audit-skill-registry-v3.test.ts failed in tsc because auditClassificationSchema and AuditClassification are not exported yet. This confirms the v3 classification schema is not wired.
GREEN: pnpm exec tsc -p tsconfig.test.json exited 0. Focused compiled tests passed: node --test .test-output/tests/audit-generation-action-source.test.js .test-output/tests/ai-schemas.test.js .test-output/tests/audit-skills-schema.test.js .test-output/tests/audit-skill-registry-v3.test.js => 32/32 pass. Full pnpm test passed: 345/345. Self-review: no changes to convex/usageEvents.ts, no commit/staging; usedSkills optional fields are conditionally spread before persistence.