Skip to content

feat(docs-skill): classify infra/scaffold paths into developer-tool template #531

Closed

Description

@admarble

Summary

The /docs skill has two templates — admin/UI (Section 3a) and developer-tool (Section 3b). Its classifier (.claude/skills/docs/SKILL.md:135-150) routes to developer-tool only when paths match src/commands/|bin/|src/mcp/|scripts/. Everything else falls through to admin, which has URL / Menu / Permissions fields irrelevant for scaffold/infra features.

Motivation

Scaffold / infra issues (root package.json, next.config.*, payload.config.ts, .env.example, Next.js src/app/layout.tsx) have no /admin/ path and don't match the dev-tool pattern. During portfolio-2025 #27 I had to manually override the template to write something useful — the existing developer-tool template (Prerequisites / Setup / What to Expect / Troubleshooting) already fits perfectly; the classifier just doesn't pick it.

Acceptance Criteria

  • AC-1: Add a third branch to the classifier detecting infra/scaffold paths: package\.json$, .*\.config\.(ts|js|mjs)$, \.env\.example$, ^src/app/.*(layout|page)\.tsx$, ^src/middleware\.ts$, ^(payload|drizzle|next|vite|vitest)\.config\.. Route to developer-tool template.
  • AC-2: Fallback default: when neither /admin/ nor infra/dev-tool matches, default to developer-tool. admin becomes opt-in via /admin/ path only.
  • AC-3: Update SKILL.md across all three skill directories
  • AC-4: Update CHANGELOG.md under [Unreleased]

Additional context

Complexity

simple

Activity

  1. added
    documentation
    enhancement
    on Apr 17, 2026
  2. admarble commented on Apr 17, 2026

    @admarble
    ContributorAuthor

    → PROCEED — Route infra/scaffold paths to developer-tool template instead of falling through to admin

    Workflow: spec → exec → qa · 4 ACs

    npx sequant run 531 -q
    

    ⚠ SKILL.md sync across 3 dirs — known pitfall
    ⚠ Regex additions in classifier deserve spec-phase design review
    ⚠ Updates CHANGELOG.md [Unreleased] — conflicts possible with #528 and #529

  3. admarble commented on Apr 17, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #531

    Implementation Status: NOT FOUND

    No implementation detected for this issue:

    • Commits on feature branch: None
    • Uncommitted changes: None
    • Open PR: None

    Verdict: AC_NOT_MET

    No code changes found to review. The acceptance criteria cannot be evaluated without an implementation.

    Next Steps

    1. Run /exec 531 to implement the feature
    2. Re-run /qa 531 after implementation is complete

    QA skipped: No implementation to review

  4. added
    needs-work
    on Apr 17, 2026
  5. admarble commented on Apr 17, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #531

    Implementation Status: NOT FOUND

    No implementation detected for this issue:

    • Commits on feature branch: None
    • Uncommitted changes: None
    • Open PR: None

    Verdict: AC_NOT_MET

    No code changes found to review. The acceptance criteria cannot be evaluated without an implementation.

    Next Steps

    1. Run /exec 531 to implement the feature
    2. Re-run /qa 531 after implementation is complete

    QA skipped: No implementation to review

  6. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    → PROCEED — Classifier change + 3-dir SKILL.md sync. Current assess rule skips spec for docs-labeled issues.

    Workflow: exec → qa · 4 ACs

    ```
    npx sequant run 531 -q --phases exec,qa
    ```

    ⚠ Worktree at stale base (e3cfa67) — rebase before exec
    ⚠ If #533 lands first, spec phase would be included per new default

  7. added a commit that references this issue on Apr 23, 2026
  8. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    Exec Phase Complete

    AC Coverage

    AC Description Status
    AC-1 Infra/scaffold path classifier branch ✅ Implemented
    AC-2 Default fallback to developer-tool ✅ Implemented
    AC-3 All three skill directories updated ✅ Synced
    AC-4 CHANGELOG [Unreleased] updated ✅ Added

    Key Files Changed

    • .claude/skills/docs/SKILL.md — classifier + infra type list + fallback change
    • templates/skills/docs/SKILL.md — synced to authoritative copy
    • skills/docs/SKILL.md — synced to authoritative copy
    • CHANGELOG.md — new ### Changed entry under [Unreleased]

    Quality Gates

    Check Result
    npm run build ✅ Pass
    npm run lint ✅ Pass
    npm test ✅ 2673/2673 pass
    check-skill-sync.ts ✅ docs skill synced

    Quality Plan Alignment

    N/A — No quality plan in issue (no /spec phase ran)

    PR

    #546

  9. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #531

    PR: #546 | Branch: feature/531-feat-docs-skill-classify-infra-scaffold-paths-into

    Size Gate

    Check Value
    Diff size 333 lines (threshold: 100)
    package.json changed No
    Security-sensitive paths No
    All files are .md Yes — skill prompt changes only
    Decision Inline checks (no TypeScript to analyze)

    AC Coverage

    AC Description Status Notes
    AC-1 Third classifier branch for infra/scaffold paths MET Line 152: regex matches all specified patterns (package\.json$, .*\.config\.(ts|js|mjs)$, \.env\.example$, ^src/app/.*(layout|page)\.tsx$, ^src/middleware\.ts$, ^(payload|drizzle|next|vite|vitest)\.config\.). Routes to developer-tool template (Section 3b).
    AC-2 Default fallback to developer-tool; admin opt-in via /admin/ only MET Lines 156-159: ELSE branch now sets type = "developer-tool", replacing the old type = "feature" / template = "admin" fallback.
    AC-3 Update SKILL.md across all three skill directories MET All three files are byte-identical at 458 lines: .claude/skills/docs/SKILL.md, skills/docs/SKILL.md, templates/skills/docs/SKILL.md.
    AC-4 Update CHANGELOG.md under [Unreleased] MET Entry added under ### Changed with issue reference (#531). Describes the classifier change and default-flip accurately.

    Coverage: 4/4 AC items fully met


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK (no TypeScript)
    Deleted tests 0 OK
    Files changed 4 OK
    Lines added +295 -
    Lines deleted -38 -
    Security patterns 0 OK

    CI Status

    Check State Bucket Impact
    Hooks Validation SUCCESS pass ✅
    Plugin Structure Validation SUCCESS pass ✅
    validate-skills SUCCESS pass ✅
    typecheck SUCCESS pass ✅
    Setup Directory Creation SUCCESS pass ✅
    validate-plugin SUCCESS pass ✅
    build (20.x) IN_PROGRESS pending ⏳ PENDING
    build (22.x) IN_PROGRESS pending ⏳ PENDING

    CI Summary: 6 passed, 2 pending, 0 failed


    Code Review

    Strengths:

    • Clean three-tier classifier: /admin/ → admin, dev-tool paths → developer-tool, infra/scaffold paths → developer-tool, fallback → developer-tool. Easy to follow.
    • CHANGELOG entry is well-written and accurately describes the behavioral change.
    • All three skill directories kept perfectly in sync.
    • Bonus: Added a documentation-only early exit (Section 2a) and a separate 3b. Developer Tool Documentation Template — these make the skill more useful beyond just the classifier fix.

    Issues:

    • None — implementation is clean and focused.

    Suggestions:

    • The skills/docs/SKILL.md and templates/skills/docs/SKILL.md diff is much larger (+157/-17) than .claude/skills/docs/SKILL.md (+15/-4) because the latter already had partial content. This is fine since all three are now identical, but worth noting for provenance.

    Test Coverage Analysis

    No TypeScript source files changed — all changes are .md skill prompt files. Test coverage analysis is N/A.


    Anti-Pattern Detection

    No TypeScript/JavaScript files changed. No anti-patterns applicable.


    Skill Change Review

    • Command verified: No new CLI commands introduced — changes are to classification logic and templates only
    • Fields verified: No JSON field references added
    • Patterns complete: Classifier covers: admin paths, dev-tool paths (src/commands, bin, src/mcp, scripts), infra/scaffold paths (config files, .env.example, layout/page, middleware, framework configs), and fallback
    • Dependencies explicit: No new dependencies — skill relies on gh and git (already documented)

    Skill Sync Verification

    Directory Line Count Status
    .claude/skills/docs/SKILL.md 458 ✅
    skills/docs/SKILL.md 458 ✅
    templates/skills/docs/SKILL.md 458 ✅

    Sync status: All three directories identical ✅


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (skill behavior change)
    [Unreleased] entry ✅ Present under ### Changed
    Entry format ✅ Includes issue number (#531)

    Result: CHANGELOG requirements met


    Risk Assessment

    • Likely failure mode: A file path that should match the infra/scaffold pattern but doesn't (e.g., a non-standard config like turbo.json). Low risk — the fallback is now also developer-tool, so unmatched paths still get the correct template.
    • Not tested: The classifier is a prompt instruction, not executable code. Its correctness depends on LLM interpretation at runtime. No automated tests can cover this.

    Verdict: NEEDS_VERIFICATION

    All 4 AC items are MET. Code quality is high — clean classifier logic, all three directories in sync, accurate CHANGELOG entry. Implementation would be READY_FOR_MERGE but CI checks build (20.x) and build (22.x) are still in progress.

    Action: Re-run /qa 531 after CI completes to confirm READY_FOR_MERGE.

    Documentation

    • N/A — This issue IS a docs skill change; no additional feature documentation needed.

    Next Steps

    1. Wait for build (20.x) and build (22.x) CI checks to complete
    2. Re-run /qa 531 to confirm READY_FOR_MERGE
    3. Merge PR feat(#531): classify infra/scaffold paths into developer-tool template #546
  10. removed
    needs-work
    on Apr 23, 2026
  11. admarble commented on Apr 23, 2026

    @admarble
    ContributorAuthor

    QA Re-verification for Issue #531

    Re-ran /qa at d45eee4f9d1f1c77aa97a5d7f304edac95f32875 (same SHA as prior QA). Prior verdict was NEEDS_VERIFICATION solely because build (20.x) and build (22.x) were in progress — all other gates were already green.

    CI Status (now complete)

    Check Conclusion
    build (20.x) ✅ SUCCESS
    build (22.x) ✅ SUCCESS
    typecheck ✅ SUCCESS
    validate-skills ✅ SUCCESS
    validate-plugin ✅ SUCCESS
    Plugin Structure Validation ✅ SUCCESS
    Hooks Validation ✅ SUCCESS
    Setup Directory Creation ✅ SUCCESS

    CI Summary: 8/8 passed. PR is MERGEABLE.

    AC Re-verification

    AC Status Evidence
    AC-1 — infra/scaffold classifier branch MET .claude/skills/docs/SKILL.md lines 152-155: regex package\.json\$|.*\.config\.(ts|js|mjs)\$|\.env\.example\$|^src/app/.*(layout|page)\.tsx\$|^src/middleware\.ts\$|^(payload|drizzle|next|vite|vitest)\.config\. routes to developer-tool template
    AC-2 — default to developer-tool, admin opt-in via /admin/ MET ELSE branch (lines 156-159) now sets template = "developer-tool"; admin only selected when file path contains /admin/ (first IF clause)
    AC-3 — 3-dir sync MET All three docs/SKILL.md files byte-identical at 458 lines; earlier main-branch divergence (447 vs 337) resolved by this PR
    AC-4 — CHANGELOG [Unreleased] MET Entry under ### Changed with (#531)

    Skill-Sync Verification

    npx tsx scripts/check-skill-sync.ts confirms docs/SKILL.md is now synced across all three directories (it was previously in the diverged list on main). Other pre-existing divergences (improve, loop, security-review, etc.) are unrelated to this PR.

    Risk Assessment

    • Likely failure mode: classifier is purely prompt-level logic executed by the /docs skill LLM — if the model skips the regex check and jumps to fallback, behavior is still correct (fallback also routes to developer-tool). No real failure surface.
    • Not tested: no automated test exercises the classifier; relies on the /docs model reading and applying the decision logic correctly.

    Verdict: READY_FOR_MERGE

    All ACs MET, all CI green, 3-dir sync verified and fixed, CHANGELOG entry present.

    Documentation: Self-documented via SKILL.md inline comments and CHANGELOG — no separate /docs run needed.

  12. added
    ready-for-review
    on Apr 23, 2026
  13. added 2 commits that reference this issue on Apr 23, 2026
  14. added 2 commits that reference this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancementready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions