CoreStory + Factory.ai (Droid) Agentic Bug Resolution Playbook

Let CoreStory + Factory.ai Resolve Your Bug Tickets For You

Encode your bug-fix workflow as a reusable Droid and resolve defects faster with repeatable quality gates. This playbook shows how to pair CoreStory with Factory.ai’s Droid CLI to create a dedicated “bug-resolver” subagent that investigates, writes a failing test, applies the minimal fix, and validates against real system intent—end to end, from the terminal or VS Code.

What you’ll get

  • A custom Droid template that bakes in the six-phase CoreStory bug workflow and strict tool permissions.
  • Command examples for project or personal installs, plus advanced flags (model overrides, read-only mode, clusters).
  • Prompts, checkpoints, and result artifacts (tests, commits, issue updates) ready for CI hand-off.

Why this matters

CoreStory exposes the intended behavior, invariants, and integration points across your codebase; Droid executes a controlled, stepwise procedure that references those truths at every step. The result is faster root-cause discovery, higher first-hypothesis accuracy, and near-zero regressions—because fixes are validated against both spec and implementation, not guesswork.

How it works (in practice)

  1. Bug intake & context — Pull ticket, select CoreStory project, open an investigation thread.
  2. Oracle phase — Query CoreStory for architecture, invariants, and historical context.
  3. Navigator phase — Map symptoms → code paths; rank root-cause candidates with file:line targets.
  4. Test-first investigation — Write a failing test that encodes the invariant; confirm it fails; locate the defect.
  5. Solution development — Apply the minimal change, expand edge-case tests, run suite, validate with CoreStory.
  6. Completion & capture — Commit with rich context, update the ticket, preserve the investigation transcript.

Fast start (5 minutes)

  • Enable Custom Droids in droid /settings, then drop bug-resolver.md into .factory/droids/ (or ~/.factory/droids/).
  • Verify with droid exec --list-droids, then run:
    droid exec "Use bug-resolver to fix issue #123"
  • Iterate: generate → run → validate → refine → commit.

Who it’s for

  • Teams standardizing triage + fix with measurable outcomes.
  • ICs moving quickly in unfamiliar code areas (characterization + TDD).
  • Platform/QA leaders enforcing invariant and regression gates.

What’s inside the playbook

  • Bug-resolver Droid file with tool restrictions, model settings, and context isolation.
  • Prompts & checkpoints for each phase; issue/PR automation patterns.
  • Advanced variants: read-only investigator, security/perf-focused resolvers, cluster handling.
  • Troubleshooting for setup, CoreStory access, and timeouts.

Results to expect

  • Time to root cause: target ~70% reduction.
  • First-hypothesis accuracy: 70–90% with CoreStory guidance.
  • Fix quality: <5% regression rate; tests mandatory for every bug path.
  • Clear commit history and ticket updates generated by the Droid workflow.

Ready to be bug-free?

Want us to show you how it's done?