JordanGunn/nunchuck / skills/task/task-select
task-select
VerifiedSelect a task by writing its ID to `.tasks/.active`. Prints the selected task path and any suspicion flags (stale, hash mismatch) to encourage skepticism.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 574 B |
| references/00_ROUTER.md | markdown | 468 B |
| references/01_SUMMARY.md | markdown | 282 B |
| references/02_TRIGGERS.md | markdown | 435 B |
| references/03_ALWAYS.md | markdown | 236 B |
| references/04_NEVER.md | markdown | 165 B |
| references/05_PROCEDURE.md | markdown | 479 B |
| references/06_FAILURES.md | markdown | 276 B |
| scripts/include/pyproject.toml | manifest | 280 B |
| scripts/include/task_hash.py | script | 2.2 KB |
| scripts/include/task_parse.py | script | 2.4 KB |
| scripts/include/task_select_cli.py | script | 1.5 KB |
| scripts/include/task_time.py | script | 1.3 KB |
| scripts/run.shexecutable | script | 214 B |
| scripts/validate.shexecutable | script | 644 B |
scripts/include/task_hash.py
View on GitHub"""Deterministic hashing for task canonical intent."""
import hashlib
import re
CANONICAL_SECTIONS = ["Goal", "Acceptance", "Constraints", "Dependencies"]
EXCLUDED_SECTIONS = ["Evidence"]
def normalize_content(content: str) -> str:
"""
Normalize markdown content for hashing.
- Normalize line endings to \n
- Trim trailing whitespace from each line
- Collapse multiple blank lines to single blank line
"""
lines = content.replace("\r\n", "\n").replace("\r", "\n").split("\n")
lines = [line.rstrip() for line in lines]
normalized = []
prev_blank = False
for line in lines:
is_blank = line == ""
if is_blank and prev_blank:
continue
normalized.append(line)
prev_blank = is_blank
return "\n".join(normalized).strip()
def extract_section(content: str, heading: str) -> str:
"""Extract content under a specific H2 heading."""
pattern = rf"^## {re.escape(heading)}\s*\n(.*?)(?=^## |\Z)"
match = re.search(pattern, content, re.MULTILINE | re.DOTALL)
if match:
return match.group(1).strip()
return ""
def extract_canonical_intent(content: str) -> str:
"""
Extract canonical intent sections from task markdown.
Includes: Goal, Acceptance, Constraints, Dependencies
Excludes: Evidence
"""
sections = []
for heading in CANONICAL_SECTIONS:
section_content = extract_section(content, heading)
if section_content:
sections.append(f"## {heading}\n\n{section_content}")
return "\n\n".join(sections)
def compute_intent_hash(content: str) -> str:
"""
Compute SHA256 hash of canonical intent sections.
Returns lowercase hex string.
"""
intent = extract_canonical_intent(content)
normalized = normalize_content(intent)
return hashlib.sha256(normalized.encode("utf-8")).hexdigest()
def verify_intent_hash(content: str, stored_hash: str | None) -> tuple[bool, str]:
"""
Verify stored hash matches computed hash.
Returns (matches, computed_hash).
"""
computed = compute_intent_hash(content)
if stored_hash is None:
return False, computed
return stored_hash == computed, computed
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: 197k | 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 |