test(ms-ai-architect): Sesjon 23 — auto_discover stale-felt assertion korrigert (søk-verifisert, 13/13) [skip-docs]

Oppgave 0 (#44): søk-først (claude-code-guide mot offisiell docs) verifiserte at
`auto_discover` IKKE er et gyldig Claude Code plugin.json-felt — auto-discovery er
implisitt default (code.claude.com/docs/en/plugins-reference; ukjent felt gir kun
valideringsadvarsel, ikke feil). → stale konvensjon, IKKE manglende felt.

- tests/test-plugin-discovery.sh: stale hard-assertion (krevde `auto_discover: true`)
  → optional-felt-logikk som speiler validate-plugin.sh (fravær = PASS «auto-discovery
  implisitt»; present må være true). plugin.json URØRT (la IKKE til ugyldig felt).
  12/13 → 13/13.

validate 239/0 (ingen regresjon). STATE oppdatert: NESTE = C1 Tier 2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-06-21 13:48:40 +02:00
commit f8a160585f

View file

@ -28,10 +28,19 @@ else
fail "plugin.json missing at .claude-plugin/plugin.json"
fi
if grep -q '"auto_discover": true' "$PLUGIN_JSON" 2>/dev/null || grep -q '"auto_discover":true' "$PLUGIN_JSON" 2>/dev/null; then
pass "auto_discover: true"
# auto_discover is NOT a standard Claude Code plugin.json field — auto-discovery
# of skills/commands/agents/hooks is the implicit default (verified against
# code.claude.com/docs/en/plugins-reference; an unrecognized field only triggers a
# validation warning). Treat it as optional: if present it must be true, if absent
# the plugin is still auto-discovered. Mirrors validate-plugin.sh.
if grep -q '"auto_discover"' "$PLUGIN_JSON" 2>/dev/null; then
if grep -Eq '"auto_discover"[[:space:]]*:[[:space:]]*true' "$PLUGIN_JSON" 2>/dev/null; then
pass "auto_discover present and true"
else
fail "auto_discover present but not true"
fi
else
fail "auto_discover is not true"
pass "auto-discovery is implicit (Claude Code default; no auto_discover field needed)"
fi
# plugin.json must NOT have a "hooks" key