Skip to content

User Story: Validator recognizes investigation-only sessions (Phase 1) #650

@rjmurillo-bot

Description

@rjmurillo-bot

User Story

As a developer working on investigation sessions
I want the pre-commit validator to recognize investigation-only mode
So that I can commit investigation artifacts without bypassing validation

Parent Epic

Acceptance Criteria

  • $investigationAllowlist constant defined in Validate-Session.ps1
  • Evidence pattern (?i)SKIPPED:\s*investigation-only recognized
  • Staged files validated against allowlist
  • Clear error message E_INVESTIGATION_HAS_IMPL for violations
  • Metrics counter tracks investigation-only skips
  • All 10 test cases pass

Investigation Artifact Allowlist

$investigationAllowlist = @(
    '^\.agents/sessions/',
    '^\.agents/analysis/',
    '^\.agents/retrospective/',
    '^\.serena/memories($|/)',
    '^\.agents/security/'
)

Test Cases

Scenario Expected
Only .agents/sessions/ staged PASS
.serena/memories/ + session log PASS
.agents/security/SA-*.md staged PASS
.agents/planning/PRD.md staged FAIL
.agents/critique/ staged FAIL
.github/workflows/ci.yml staged FAIL
src/component.ts staged FAIL
.claude/agents/agent.md staged FAIL
.github/agents/copilot.md staged FAIL
No staged files PASS

Technical Notes

  • Target file: scripts/Validate-Session.ps1 (lines 336-351)
  • Pattern must be case-insensitive to match existing docs-only pattern
  • Validation runs during pre-commit hook

References

  • ADR-034: .agents/architecture/ADR-034-investigation-session-qa-exemption.md

Metadata

Metadata

Labels

agent-explainerDocumentation agentagent-qaTesting and verification agentagent-retrospectiveLearning extraction agentagent-roadmapProduct vision agentagent-securitySecurity assessment agentarea-infrastructureBuild, CI/CD, configurationarea-workflowsGitHub Actions workflowsdocumentationImprovements or additions to documentationenhancementNew feature or requestpriority:P0Critical: Blocks core functionality, security vulnerability, or data lossstoryStory-level work item under an epic

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions