Skip to content

v0.5.2 — upgrade skill & validate-harness polish

Choose a tag to compare

@aiAgentDevelop aiAgentDevelop released this 13 Apr 09:42
· 58 commits to main since this release
eb90687

Polish pass following the v0.5.0 / v0.5.1 major migration. Four issues surfaced during a real v0.3.0 → v0.5.1 upgrade in a user project (#22). None blocked the migration (all were worked around manually), but they made the next /harness-marketplace:upgrade unnecessarily bumpy.

Fixed — upgrade skill (bugs 1-3 of #22, PR #23)

  • YAML parsing — top-level key boundary detection (bug 1). The previous SKILL.md guidance didn't specify what to do when an unrelated top-level key (e.g. required_mcps:) appeared after guides:. Section state stayed set to guides, so subsequent list items leaked into the guides array as [object Object] entries. skills/upgrade/SKILL.md Phase 3 step 1 now spells out the section-reset rule (unknown top-level key → section = null).
  • Template conditional substitution — full flag catalog (bug 2). The set of {{CONDITION:*}} flags used by hook templates grew beyond what the upgrade skill documented (added: enforcement_protected_files, enforcement_secret_guard, enforcement_pattern_guard, has_lint, has_typecheck, has_formatter, fsd, clean_architecture, has_alembic). SKILL.md now enumerates all 18 supported flags with their evaluation rules, plus the JSON-cleanup post-processing needed on hooks-config.json (strip empty lines and trailing commas, then JSON.parse + re-stringify).
  • Backup path — outside the skill scan range (bug 3). Previous guidance placed the backup at .claude/skills/project-harness.backup-{ts}/, which Claude Code then attempted to register as a duplicate skill. Moved to .claude/backups/project-harness-{ts}/ (outside skills/), with mkdir -p up front. Updated all three references (Phase 2 step 1, Phase 3 step 2 in two places, Phase 5 Rollback).

Fixed — scripts/validate-harness.js (bug 4 of #22, PR #24)

  • visual-qa/scripts/visual-inspect.js is no longer a conditional required file (4a). The templates never shipped it — the optional helper is created on demand by the visual-qa skill, not at harness generation time. Removing the false positive prevents has_ui=true harnesses from failing validation for no good reason.
  • serverless is now an optional config field (4b). Pre-v0.4.0 configs lack it (the wizard's serverless architecture question was added later), so treating it as required made every pre-v0.4.0 upgrade fail validation even when the harness was otherwise correct. Moved to a new OPTIONAL_CONFIG_FIELDS list (warn, don't error).
  • config.guides[] is now handled as objects, with legacy string fallback (4c). Per templates/config-schema.yaml:537-576, guide entries are objects with { name, condition?, path? }. The old validator treated them as strings and produced paths like guides/[object Object].md. Now extracts guide.name (falls back to the raw string for legacy configs), and emits a clear "Invalid guide entry (missing name)" error when neither shape works.

Upgrade instructions

Same as v0.5.1. If you're already on v0.5.0 or v0.5.1, just update the plugin — no config migration needed, these are pure skill / validator improvements.