9.8 KiB
Tasks: Spec 416 - TenantPilot Agent Skill Layer V1 and Router Integration
Input: Design documents from /specs/416-tenantpilot-agent-skill-layer-v1/
Prerequisites: spec.md, plan.md, checklists/requirements.md
Implementation status: Corrected spec implemented by the Spec Kit implementation loop. Artifact/router verification completed; see implementation-report.md.
Requirement Coverage Map
- FR-416-001: covered by T006.
- FR-416-002: covered by T006.
- FR-416-003: covered by T007.
- FR-416-004: covered by T008.
- FR-416-005: covered by T009.
- FR-416-006: covered by T010 and T018.
- FR-416-007: covered by T002, T006-T025, and NT001.
- FR-416-008: covered by T026-T034, T038-T042, and T049.
- FR-416-009: covered by T035.
- FR-416-010: covered by T018 and T037.
- FR-416-011: covered by T018.
- FR-416-012: covered by T011.
- FR-416-013: covered by T012.
- FR-416-014: covered by T013.
- FR-416-015: covered by T014.
- FR-416-016: covered by T015.
- FR-416-017: covered by T016.
- FR-416-018: covered by T017.
- FR-416-019: covered by T020.
- FR-416-020: covered by T021.
- FR-416-021: covered by T022.
- FR-416-022: covered by T023.
- FR-416-023: covered by T024.
- FR-416-024: covered by T019, T043, and NT002.
- FR-416-025: covered by T044, T045, T050, and NT003.
- FR-416-026: covered by T048-T052.
Test Governance Checklist
- Lane assignment remains N/A for Laravel runtime and uses artifact/router verification only.
- No Pest, browser, PostgreSQL, or heavy-governance test family is added unless runtime scope changes, which requires spec amendment.
- Planned validation commands cover
.agent/skills/**andAGENTS.mdwithout booting the application. - Browser proof is explicitly
N/A - no rendered UI surface changed. - Human Product Sanity is explicitly N/A for rendered product UI and limited to workflow sanity.
- Implementation report records no runtime files, tests, migrations, config, routes, views, assets, package files, or lock files changed.
- Test governance outcome is
keep: artifact/router checks remain the validation lane unless runtime scope changes by spec amendment.
Phase 1: Preflight And Repo Truth
Purpose: Confirm the implementation target before writing skill files.
- T001 Capture branch, HEAD, and
git status --shortfor the implementation report. - T002 Confirm
.agent/skills/**is the corrected Spec 416 target and.codex/skills/**is not part of the final implementation diff. - T003 Confirm existing dirty/untracked work will not be overwritten or accidentally included outside allowed paths.
- T004 Re-read
AGENTS.md,.specify/memory/constitution.md,docs/ai-coding-rules.md, relevantdocs/*-guidelines.md, anddocs/product/standards/product-surface-contract.mdbefore authoring skill/router content. - T005 Treat Specs 395, 400, 402, 414, and 415 as read-only context and do not modify their files.
Phase 2: Skill README
Purpose: Create the progressive-disclosure entry point.
- T006 Create
.agent/skills/README.mdwith purpose and the statement that the skill layer is not a replacement for active specs, tests, code review, current repo truth, or the constitution. - T007 Add the progressive disclosure rule: do not load all skills by default; activate skills by task trigger.
- T008 Add the maturity model L0 through L4 and gate type definitions.
- T009 Add a V1 activation table for all Spec 416 skills with maturity, gate type, and trigger summary.
- T010 Add the quarantine list, currentness warning, inventory-only hint warning, and temporary-skill expiry/review warning.
Phase 3: Repo Contract Skills
Purpose: Create the L4/L3 repo-contract skills with concrete stop conditions.
- T011 Create
.agent/skills/repo-contracts/workspace-scope-safety/SKILL.mdas an L4 hard-gate skill. - T012 Create
.agent/skills/repo-contracts/rbac-action-safety/SKILL.mdas an L4 hard-gate skill. - T013 Create
.agent/skills/repo-contracts/operation-run-truth/SKILL.mdas an L4 hard-gate skill. - T014 Create
.agent/skills/repo-contracts/customer-output-gate/SKILL.mdas an L4 hard-gate skill. - T015 Create
.agent/skills/repo-contracts/evidence-anchor-contract/SKILL.mdas an L4 hard-gate skill. - T016 Create
.agent/skills/repo-contracts/provider-freshness-semantics/SKILL.mdas an L4 hard-gate skill. - T017 Create
.agent/skills/repo-contracts/product-surface-gate/SKILL.mdas an L3 checklist skill. - T018 For every generated
SKILL.md, include all required headings and writeNot applicable.for non-applicable sections. - T019 Keep each skill repo-specific and bounded to TenantPilot/TenantAtlas evidence; do not create generic SOC2/GDPR/SSDF/enterprise-best-practice skills.
Phase 4: Workflow Skills
Purpose: Create workflow skills that guide preparation, Filament/Livewire changes, and read-only browser audits.
- T020 Create
.agent/skills/workflows/spec-readiness-gate/SKILL.mdas an L3 checklist skill. - T021 Create
.agent/skills/workflows/filament-livewire-v5-change-loop/SKILL.mdas an L3 checklist skill. - T022 Create
.agent/skills/workflows/browser-readonly-audit/SKILL.mdas an L2/L3 workflow skill.
Phase 5: Temporary Migration Skill
Purpose: Keep the TCM / Coverage v2 cutover guard temporary and explicit.
- T023 Create
.agent/skills/temporary-migrations/tcm-cutover-guard/SKILL.mdas an L3 temporary migration gate. - T024 Include expiry/review language: expires after Coverage v2 / TCM activation and legacy coverage vocabulary cutover are complete.
- T025 Include stop conditions for remote capture requirements, UI activation, legacy adapters, fallback readers, dual truth,
tenant_idplatform ownership, and customer-facing claims depending on inactive TCM kernel.
Phase 6: AGENTS.md Router Integration
Purpose: Make the skill layer discoverable before repository work.
- T026 Add
## TenantPilot Agent Skill RoutertoAGENTS.md. - T027 In the router, require agents to inspect
.agent/skills/README.mdbefore repository work. - T028 In the router, require activating only relevant skills and not loading all skills by default.
- T029 In the router, require reporting activated skills and reasons before implementation or review.
- T030 In the router, require branch, HEAD, dirty state, and hard-gate stop conditions before file changes.
- T031 In the router, state that hard-gate skills are blocking and stop implementation when triggered.
- T032 In the router, state that current repo evidence, active specs, tests, and validated contracts beat historical prompts or inventory-only specs.
- T033 In the router, state that inventory-only specs are hints, not hard evidence.
- T034 In the router, state that temporary migration skills require expiry or review criteria.
- T035 Optionally create
docs/agent-workflow.mdonly if the router would exceed 12 lines or duplicate skill details insideAGENTS.md.
Phase 7: Verification
Purpose: Prove the docs/workflow artifact shape without running app tests.
- T036 Run
find .agent/skills -name 'SKILL.md' -print | sortand record the result. - T037 Run heading validation over every
.agent/skills/**/SKILL.md. - T038 Run
grep -n "TenantPilot Agent Skill Router" AGENTS.md. - T039 Run
grep -n ".agent/skills/README.md" AGENTS.md. - T040 Run
grep -n "Do not load all skills by default" AGENTS.md. - T041 Run
grep -n "Hard-gate skills are blocking" AGENTS.md. - T042 Run
grep -n "Inventory-only specs are hints" AGENTS.md. - T043 Run a negative generic-skill path check for
soc2,gdpr,ssdf, andenterprise-best-practice. - T044 Run a final diff-scope check confirming only
.agent/skills/**,AGENTS.md, optionaldocs/agent-workflow.md, and Spec 416 files changed. - T045 Run a forbidden-path check confirming no
app/**,bootstrap/**,config/**,database/**,routes/**,resources/**,tests/**, package file, lock file, Vite config, or Tailwind config changed. - T046 Run
git diff --checkafter the implementation files are tracked or staged so new files are included in the check. Implementation note: tracked modifications passedgit diff --check; new.agent/skills/**files are untracked and passed the separate trailing-whitespace check recorded inimplementation-report.md. - T047 Run
git status --shortand record the final dirty state.
Phase 8: Implementation Report
Purpose: Close the implementation with precise evidence.
- T048 Create or update
specs/416-tenantpilot-agent-skill-layer-v1/implementation-report.mdusing sections A through M fromspec.md. - T049 Record
AGENTS.md Router Added: yes/no. - T050 Record runtime files changed: no; tests changed: no; migrations changed: no; config changed: no.
- T051 Record browser proof as
N/A - no rendered UI surface changed. - T052 Record no completed historical spec was rewritten or stripped of close-out/validation/task/browser/review history.
Non-Goals
- NT001 Do not target
.codex/skills/**for the corrected Spec 416 implementation. - NT002 Do not create generic SOC2/GDPR/SSDF/enterprise-best-practice skill files.
- NT003 Do not modify application runtime files, tests, migrations, config, routes, resources, services, policies, jobs, assets, package files, lock files, or completed specs.
- NT004 Do not require agents to load all skills by default.
- NT005 Do not turn Product Surface guidance into runtime code, presenter layers, enum families, or broad UI frameworks.
- NT006 Do not split basic router integration into a future Spec 417.
Suggested Commit Message
docs: add TenantPilot agent skill layer and router