flurdy/agent-skills / skills/handoffs
handoffs
VerifiedBrowse and load current-repo or workspace-member handoffs, including pruned worktrees. Optional confirmed archiving and checkout recovery; loading alone never executes the saved task.
| File | Kind | Size |
|---|---|---|
| REFERENCE.md | markdown | 45.5 KB |
| SKILL.md | skill md | 36.3 KB |
| scripts/archive.shexecutable | script | 3.4 KB |
| scripts/list.shexecutable | script | 59.6 KB |
| scripts/retention.py | script | 5.0 KB |
| tests/test_list.py | script | 51.7 KB |
| tests/test_retention.py | script | 6.6 KB |
tests/test_retention.py
View on GitHubfrom __future__ import annotations
import json
import subprocess
import sys
import unittest
from pathlib import Path
HELPER = Path(__file__).resolve().parents[1] / "scripts" / "retention.py"
class JiraRetentionTests(unittest.TestCase):
def run_jira(self, issues: list[dict], handoff_date: str = "2026-07-01") -> dict:
result = subprocess.run(
[sys.executable, str(HELPER), "jira", "--keys", "ABC-123,ABC-456",
"--handoff-date", handoff_date, "--today", "2026-08-20", "--days", "14"],
input=json.dumps({"issues": issues}), text=True, capture_output=True, check=True,
)
return json.loads(result.stdout)
@staticmethod
def issue(key: str, resolved: str | None, status: str = "done") -> dict:
return {"key": key, "fields": {"status": {"statusCategory": {"key": status}},
"resolutiondate": resolved}}
def test_all_done_uses_latest_resolution_and_inclusive_boundary(self) -> None:
for resolved, expected in (
("2026-08-20T10:00:00.000+0000", ""),
("2026-08-06T00:00:00Z", ""),
("2026-08-05T23:59:59Z", "safe"),
("2026-08-05T23:59:59.000+0000", "safe"),
("2026-08-05T23:30:00-0200", ""),
(None, ""), ("bad", ""), ("2026-08-01", ""),
("2026-08-01T00:00:00", ""), ("2026-08-21T00:00:00Z", ""),
("2000-01-01T00:00:00+00:99", ""), ("2000-01-01T00:00:00-0099", ""),
):
with self.subTest(resolved=resolved):
actual = self.run_jira([self.issue("ABC-123", "2000-01-01T00:00:00Z"),
self.issue("ABC-456", resolved)])
self.assertEqual(actual, {"done": True, "archive_class": expected})
def test_recent_handoff_with_old_resolution_is_retained(self) -> None:
issues = [self.issue(key, "2000-01-01T00:00:00Z") for key in ("ABC-123", "ABC-456")]
for date in ("2026-08-20", "2026-08-06", "invalid"):
with self.subTest(date=date):
self.assertEqual(self.run_jira(issues, date), {"done": True, "archive_class": ""})
def test_missing_or_reopened_ticket_is_not_done(self) -> None:
done = self.issue("ABC-123", "2000-01-01T00:00:00Z")
for issues in ([done], [done, self.issue("ABC-456", "2000-01-01T00:00:00Z", "indeterminate")], []):
with self.subTest(issues=issues):
self.assertEqual(self.run_jira(issues), {"done": False, "archive_class": ""})
def test_malformed_and_duplicate_jira_rows_fail_closed(self) -> None:
done = self.issue("ABC-123", "2000-01-01T00:00:00Z")
for malformed in (
{"key": []}, {"key": "ABC-456", "fields": "invalid"},
{"key": "ABC-456", "fields": {"status": "invalid"}},
{"key": "ABC-456", "fields": {"status": {"statusCategory": None}}},
):
with self.subTest(malformed=malformed):
self.assertEqual(self.run_jira([done, malformed]), {"done": False, "archive_class": ""})
duplicate = [done, self.issue("ABC-456", "2000-01-01T00:00:00Z"), self.issue("ABC-456", None, "indeterminate")]
for rows in (duplicate, list(reversed(duplicate))):
self.assertEqual(self.run_jira(rows), {"done": False, "archive_class": ""})
def run_jira_keys(self, keys: str, issues: list[dict]) -> dict:
result = subprocess.run(
[sys.executable, str(HELPER), "jira", "--keys", keys,
"--handoff-date", "2026-07-01", "--today", "2026-08-20", "--days", "14"],
input=json.dumps({"issues": issues}), text=True, capture_output=True, check=True,
)
return json.loads(result.stdout)
def test_truncated_or_malformed_key_lists_never_prove_done(self) -> None:
visible = [self.issue("ABC-123", "2000-01-01T00:00:00Z"),
self.issue("ABC-456", "2000-01-01T00:00:00Z")]
self.assertEqual(self.run_jira_keys("ABC-123,ABC-456", visible),
{"done": True, "archive_class": "safe"})
for keys in ("ABC-123,ABC-456,(+1 more)", "ABC-123,ABC-456,(+more)", "ABC-123,ABC-456,more)",
"ABC-123,,ABC-456", "ABC-123,abc-456", "ABC-123,ABC-", "ABC-123, ABC-456",
"`ABC-123`,ABC-456"):
with self.subTest(keys=keys):
# Every visible ticket is Done; an omitted or unparseable one may not be.
extra = set(keys.split(",")) - {"ABC-123", "ABC-456"}
rows = visible + [{"key": token, "fields": visible[0]["fields"]} for token in sorted(extra)]
self.assertEqual(self.run_jira_keys(keys, rows), {"done": False, "archive_class": ""})
def test_truncated_field_with_unfinished_omitted_ticket_is_not_done(self) -> None:
visible = [self.issue("ABC-123", "2000-01-01T00:00:00Z"),
self.issue("ABC-456", "2000-01-01T00:00:00Z")]
unfinished = self.issue("ABC-789", None, "indeterminate")
for rows in (visible, visible + [unfinished]):
with self.subTest(rows=rows):
self.assertEqual(self.run_jira_keys("ABC-123,ABC-456,(+1 more)", rows),
{"done": False, "archive_class": ""})
self.assertEqual(self.run_jira_keys("ABC-123,ABC-456,ABC-789", visible + [unfinished]),
{"done": False, "archive_class": ""})
def test_truncated_jira_fields_are_excluded_and_never_written(self) -> None:
skill = HELPER.parents[1]
reference = (skill / "REFERENCE.md").read_text()
jira_done = reference.split("## §Jira-Done", 1)[1].split("\n## ", 1)[0]
self.assertIn("truncation marker", jira_done)
self.assertIn("`(+N more)`", jira_done)
self.assertIn("never promote", jira_done)
wrap_up = (skill.parent / "wrap-up" / "SKILL.md").read_text()
self.assertIn("Never truncate `Jira`", wrap_up)
def test_both_consumers_share_completion_clock_and_clear_assisted_flags(self) -> None:
skill = HELPER.parents[1]
reference = (skill / "REFERENCE.md").read_text()
self.assertIn("## §Retention", reference)
self.assertIn("resolutiondate", reference)
self.assertIn("retention.py jira", reference)
self.assertIn("clear both `needs-review` and `needs-age-review`", reference)
self.assertIn("current-repo and workspace-member", reference)
for path in (skill / "SKILL.md", skill.parent / "handoffs-tidy" / "SKILL.md"):
text = path.read_text()
self.assertIn("--retention-days N", text)
self.assertIn("REFERENCE §Retention", text)
if __name__ == "__main__":
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |