scarnecchia/polyskills/jira-epic-state

Claude Code and agent skill by scarnecchia/polyskills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Define and reconcile the portable .current-epic runtime state for Jira Epic execution in Polytoken. Use before bootstrapping, resuming, spawning task workers, merging task branches, closing an Epic, or handing the Epic to another runtime.

Install

npx vskill@latest install scarnecchia/polyskills/jira-epic-state

SKILL.md

The same SKILL.md was published earlier as scarnecchia/polyskills/jira-epic-state.

Jira Epic State

Use this skill whenever you inspect, create, reconcile, or update .current-epic/ for Jira Epic execution.

The state rule is:

A Polytoken session must be able to reconstruct the Epic run from .current-epic/ plus git history.

Chat memory, todos, running job ids, and subagent claims are not durable truth. They are convenience state only.

Naming

Jira project keys such as ABC-73 identify Jira issues. Do not name Epic branches or worktrees abc-73; that shape reads like a task branch. Name Epic branches and worktrees with the Epic role:

text
epic-73
epic-73-task-A
epic-73-task-B

When the Jira Epic key is not numeric, choose a short branch-safe slug that starts with epic- and records the Jira key in manifest.txt.

Directory Layout

The parent orchestrator works from the Epic worktree. The portable state lives in that Epic worktree:

text
.current-epic/
manifest.txt
dependencies.dot
workflow.dot
task-state.json
merge-gate.json
events.log
task-<prefix>.md
plan-<prefix>.md
findings-<scope>.jsonl
deferrals.jsonl
runtime/
polytoken/
jobs.json
active-worktrees.json
subagent-results/
planner-<prefix>.json
implementor-<prefix>.json
reviewer-<prefix>.json

Portable files:

  • manifest.txt
  • dependencies.dot
  • workflow.dot
  • task-state.json
  • merge-gate.json
  • events.log
  • task-<prefix>.md
  • plan-<prefix>.md
  • findings-<scope>.jsonl, where <scope> is a task prefix such as A, a docs lane such as docs-A, or epic for final branch review
  • deferrals.jsonl, the durable register of every accepted deferral, accepted risk, out-of-scope decision, skipped test tier, or follow-up that is not fixed in the Epic branch before closeout. Every entry must have survived the plan deferral skeptic gate. Entries that were not skeptic-approved are invalid and must be removed (and the work done instead).

Runtime-local files:

  • everything under .current-epic/runtime/polytoken/

Do not delete runtime-local files during reconciliation. They are advisory evidence for the next Polytoken session.

Per-Task Context Bundles

Before spawning an implementor or task reviewer, copy the task's local contract into the task worktree:

text
.current-task/
task.md
plan.md
manifest.txt
dependency-summary.md

The parent creates and updates .current-task/. Worker subagents may read it, but they must not treat it as the source of global coordination state. The parent remains the only writer of .current-epic/task-state.json, .current-epic/merge-gate.json, and .current-epic/events.log.

Manifest Contract

Write .current-epic/manifest.txt as plain text:

text
Flavor: polytoken-parallel
Epic-Key: ABC-73
Epic-URL: https://<site>.atlassian.net/browse/ABC-73
Project: <PROJECT_KEY>
Epic-branch: epic-73
Epic-worktree: .worktrees/epic-73
Base-branch: main
Tasks:
A ABC-81 https://<site>.atlassian.net/browse/ABC-81 Implement durable session index
B ABC-82 https://<site>.atlassian.net/browse/ABC-82 Update CLI help text

The task line schema is:

text
<prefix> <jira-key> <jira-url> <title...>

Do not encode task classes or concrete model names in manifest.txt. Epic task execution uses one standard review intensity for every task. Concrete Polytoken model choices belong in the orchestrator's subagent calls, .current-epic/runtime/polytoken/jobs.json, or the parent transcript.

Dependency Graph

dependencies.dot is Graphviz DOT. An edge A -> B means Task A must complete before Task B starts.

Build this graph from Jira issue links such as Blocks / is blocked by. If Jira contains contradictory dependency links, stop and surface the conflicting issue keys.

Use the graph, task-state.json, and git trailers to compute task eligibility. Do not rely on in-context memory.

Task State

task-state.json is the portable status checkpoint. It is advisory when it disagrees with git history. Git trailers win for completion.

Schema:

json
{
"schema_version": 1,
"updated_at": "2026-06-21T12:00:00Z",
"updated_by": "polytoken",
"epic": {
"jira_key": "ABC-73",
"jira_url": "https://<site>.atlassian.net/browse/ABC-73",
"branch": "epic-73",
"worktree": ".worktrees/epic-73",
"base_branch": "main"
},
"tasks": {
"A": {
"phase": "pending",
"jira_key": "ABC-81",
"jira_url": "https://<site>.atlassian.net/browse/ABC-81",
"title": "Task title",
"branch": "epic-73-task-A",
"worktree": ".worktrees/epic-73-task-A",
"task_cache": ".current-epic/task-A.md",
"plan_path": ".current-epic/plan-A.md",
"task_context_dir": ".worktrees/epic-73-task-A/.current-task",
"job_id": null,
"commit": null,
"last_error": null
}
}
}

Allowed phase values:

  • pending
  • planner-spawned
  • plan-authored
  • implementor-spawned
  • in-progress
  • awaiting-review
  • review-blocked
  • awaiting-merge
  • merging
  • completed
  • blocked-failure
  • plan-authored-halted

Skeptic gates and the orchestrator test gate do not have separate phase values; they run between existing phases (after review-clean, before the next phase) and hold the task in its current phase until they pass. Dynamic tasks appended by the orchestrator use phase: "pending" and are processed identically to original tasks.

When reconstructing missing state, derive task records from manifest.txt, dependencies.dot, existing plan-*.md files, merge-gate.json, and git log trailers.

Merge Gate

Use .current-epic/merge-gate.json to serialize task branch merges into the Epic branch:

json
{
"holder": null,
"queue": []
}

The holder should be implementor-<prefix> or task-<prefix>. The merge gate is separate from the repository-level .merge-lock, which only protects final merges to main.

Grant order:

  1. Verify the holder is null.
  2. Write merge-gate.json with the new holder.
  3. Update task-state.json phase to merging.
  4. Append merge-granted to events.log.

Release order:

  1. Verify the task commit exists on the Epic branch with matching trailers.
  2. Update task-state.json to completed and record the commit.
  3. Release the holder.
  4. Append task-merged to events.log.

Deferral Register

deferrals.jsonl is portable JSONL and is the durable source of truth for work that is consciously not fixed before Epic closeout. Chat messages, todos, Jira comments, and reviewer summaries are not enough. If the parent accepts a follow-up, skips a relevant test tier, narrows a task scope, carries an accepted risk, or decides not to fix a review finding in the Epic branch, it must append a record immediately. However, deferrals are only permitted when something is computationally impossible. Every deferral must survive the plan deferral skeptic gate (a general-purpose subagent with @mg:arch using hostile/skeptical prompting). The skeptic's verdict is binding. A deferral record that has not been skeptic-approved is invalid.

json
{"schema_version":1,"deferral_id":"ABC-73-D001","created_at":"2026-06-21T12:00:00Z","scope":"G","jira_key":"ABC-88","kind":"test-tier-skipped","severity":"high","summary":"Compaction-before-continuation was not covered by provider double.","reason":"No deterministic provider double compaction harness exists yet.","operator_decision":"approved","skeptic_approved":true,"skeptic_verdict":"The provider double compaction harness requires daemon API surface changes that are computationally impossible within this task scope.","evidence":[".current-epic/findings-G.jsonl:G-plan-2-F5"],"follow_up":"Create a dedicated compaction harness task before release.","status":"open"}

Required fields: schema_version, deferral_id, created_at, scope, kind, severity, summary, reason, operator_decision, skeptic_approved, and status. When skeptic_approved is true, include skeptic_verdict with the skeptic's reasoning. Use stable deferral_id values and append updates rather than rewriting history. Allowed status values are open, closed, and superseded. Allowed kind values include accepted-risk, scope-deferral, test-tier-skipped, docs-deferral, follow-up, and operator-decision. Critical/high deferrals require an explicit operator decision note; do not invent approval. A deferral with skeptic_approved: false or missing skeptic_approved is invalid and the work must be done instead.

At closeout, every open deferral must be surfaced in the Jira summary and final operator message. If an open deferral is discovered during reconciliation but is not in deferrals.jsonl, append it before continuing.

Events Log

events.log is JSONL. Append one line per state transition:

json
{"ts":"2026-06-21T12:00:00Z","runtime":"polytoken","event":"plan-authored","task_prefix":"A","details":{"plan_path":".current-epic/plan-A.md"}}

Use this event vocabulary when possible:

  • bootstrap-started
  • bootstrap-completed
  • plan-spawned
  • plan-authored
  • implementor-spawned
  • implementation-started
  • review-spawned
  • review-completed
  • merge-requested
  • merge-granted
  • task-merged
  • task-blocked
  • runtime-handoff
  • closing-started
  • closing-completed

The log is audit evidence, not the current-state source of truth.

Commit Trailers

Every task merge commit on the Epic branch must include Jira keys:

text
Epic: ABC-73
Task: ABC-81

Task completion is true only when the Epic branch contains a commit between Base-branch..HEAD with the matching Task: trailer. If task-state.json says completed but no matching trailer exists, mark the task blocked and surface the corruption.

Epic-level fix commits made during closeout include only the Epic trailer:

text
Epic: ABC-73

Reconciliation Procedure

When bootstrapping, resuming, or handing off:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/scarnecchia/polyskills/jira-epic-state/badge)](https://verified-skill.com/skills/scarnecchia/polyskills/jira-epic-state)

Something wrong with this skill or its page? Tell us.