Skip to content

jovd83/bug-fix-lifecycle

Repository files navigation

Validate Skills version license Buy Me a Coffee

Defect Lifecycle Agent Skill

Enterprise-grade AgentSkill for defect intake, approved bug fixing, regression hardening, traceable reporting, and tracker-ready export artifacts.

Public repository/package name: defect-lifecycle-agent-skill

Stable skill trigger: $defect-lifecycle-agent-skill

This repository provides:

  • a clear skill contract for bug discovery and approved bug resolution
  • repository-aware guidance instead of hard-coded folder assumptions
  • structured markdown templates for discovery reports and fix reports
  • a deterministic coverage validator for total or file-scoped checks
  • canonical JSON schemas for discovery and fix reports
  • Jira-ready and Linear-ready draft export artifacts
  • lightweight validation and tests for maintainability
  • GitHub-ready packaging and contribution guidance

What This Skill Does

The skill helps an agent:

  1. classify a request as bug reporting or bug fixing
  2. discover the target repository's real testing and documentation conventions
  3. reproduce or verify the defect with evidence
  4. require a confirmation test before the fix when practical
  5. implement the smallest credible fix
  6. validate regression checks and coverage honestly
  7. update only the documentation that truly changed
  8. emit markdown, canonical JSON, or tracker-ready drafts as needed

What This Skill Does Not Do

  • replace incident response, SRE postmortems, or generic feature planning
  • assume a specific repository layout such as docs/functional analysis/
  • silently persist shared memory across repositories
  • claim regression safety from total line coverage alone
  • bypass approval for tracker bugs that are not clearly ready to fix
  • embed direct Jira or Linear API clients, secrets, or auth flows

Orchestrator Chain Integration

When invoked through skill-orchestrator, this skill runs as an 11-phase chain defined in config/chain_definition.json. The test type for the confirmation test is determined by test-design-orchestrator (Phase 2) — all test implementation phases self-gate on that output:

Phase Sub-skill Maps to
1 codebase-context Discover repo conventions and all test layers
2 test-design-orchestrator Determine test type(s): unit / service / frontend / perf / security
3 stack-aware-unit-testing-skill Unit confirmation test [self-gates]
4 api-contract-sentinel Service/API confirmation test [self-gates]
5 playwright-skill Frontend/E2E confirmation test [self-gates]
6 performance-testing-skill Performance confirmation test [self-gates]
7 defensive-appsec-review-skill Security confirmation test [self-gates]
8 [agent-handled] Implement the minimal fix
9 stack-aware-unit-testing-skill Re-run confirmation tests + full regression
10 automated-test-reviewer Review why tests missed it; verify coverage
11 [agent-handled] Structured 7-section resolution report

Self-gating phases declare themselves "not applicable" when the bug type doesn't match their layer, so a pure logic bug skips phases 4–7 automatically.

Repository Layout

defect-lifecycle-agent-skill/
|- SKILL.md
|- README.md
|- agents/openai.yaml
|- assets/
|- examples/
|- references/
|- schemas/
|- scripts/
|- tests/
|- .github/workflows/ci.yml
`- package.json

Install

  1. Use Node.js 18 or newer.
  2. Run npm test to execute the built-in validation suite.
  3. Run node scripts/validate-skill.js for a packaging smoke check.

No external dependencies are required.

Usage

Validate total coverage:

node scripts/verify-coverage.js --coverage coverage/coverage-summary.json

Validate specific changed files:

node scripts/verify-coverage.js --coverage coverage/coverage-summary.json --files src/checkout/form.ts,src/checkout/validation.ts

Validate using a manifest:

node scripts/verify-coverage.js --manifest examples/coverage-manifest.example.json

Validate skill packaging:

node scripts/validate-skill.js

Export a Jira draft from a discovery report:

node scripts/export-tracker-artifact.js --tracker jira --input examples/sample-bug-discovery.json

Export a Linear resolution update from a fix report:

node scripts/export-tracker-artifact.js --tracker linear --input examples/sample-bug-fix-report.json

Run tests:

npm test

Workflow Summary

  1. Inspect the target repository and determine the real requirements, docs, and test locations.
  2. Route into discovery-only or approved-fix mode.
  3. Reproduce or verify the defect.
  4. Add or reuse a failing confirmation test when practical.
  5. Apply the smallest credible fix.
  6. Re-run targeted checks and coverage validation.
  7. Update only the docs, diagrams, help content, README, or changelog that truly changed.
  8. Deliver the structured markdown report and optional JSON or tracker export.

Output Model

Primary output is markdown using the templates in assets/bug-discovery-template.md and assets/bug-fix-report-template.md.

Machine-readable equivalents live in schemas/bug-discovery-report.schema.json and schemas/bug-fix-report.schema.json.

Exact required fields and export guidance live in references/response-contracts.md and references/tracker-exports.md.

Memory Boundaries

  • Runtime memory: active reproduction notes, diffs, logs, and validation results for the current task
  • Project-local memory: deliberate artifacts written into the target repository, such as issue notes or documentation updates
  • Shared memory: out of scope unless an external shared-memory skill is intentionally integrated

Validation And Maintenance

This repo includes:

Optional Integrations

These are related but intentionally out of scope for the current implementation:

  • direct Jira or Linear API calls with secrets and auth handling
  • specialized testing skills such as Playwright, Cypress, or JUnit helpers for stack-specific test authoring
  • shared-memory promotion of stable cross-project debugging knowledge

Publishability Notes

  • the repo is self-contained and uses only Node built-ins
  • the canonical skill trigger is $defect-lifecycle-agent-skill
  • generated tracker drafts are intended for review or for a separate organization-specific integration layer

About

Guides defects from intake to verified fix with failing confirmation tests, scoped remediation, and structured resolution reporting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors