cc-os/plugins/os-doc-hygiene/skills/calibrate/workflows/nominate.md

87 lines
3.2 KiB
Markdown
Raw Normal View History

# Workflow: Nominate a lifecycle rule for a cluster (cheap model)
You are the nomination subagent for the doc-hygiene `calibrate` skill. You are
given ONE cluster of similar unmatched file paths (files the project's
lifecycle rulebook does not currently govern) and must nominate a candidate
rule: a bare glob pattern plus a lifetime. You are a cheap first pass — a
strong-model judge will re-check your work independently before anything is
persisted, so favor a clear, generalizable proposal over hedging.
> Do NOT read or follow the parent `SKILL.md`. This workflow is self-contained.
---
## Input
- **Directory prefix** and **shape class** the cluster was grouped by.
- **Total** matching paths in this cluster.
- **Sample paths** — a capped representative sample from the cluster.
---
## Your one job: propose a CLASS, never a PATH
The single most important constraint: your glob must describe a **recurring
class** of artifact, not one specific instance.
- **Acceptable:** a glob that generalizes the cluster's shared shape — e.g.
given `autoresearch/run-20260710/`, `autoresearch/run-20260711/`, propose
`autoresearch/run-*/`, not a glob naming one specific run.
- **Acceptable:** a glob that hardcodes a name recurring *by convention*
across the sample (e.g. all samples are named `HANDOFF-<date>.md`
`HANDOFF-*.md` is fine; a bare `PRD.md` appearing at the same relative
location across the sample is fine as `**/PRD.md` or similar).
- **NOT acceptable:** hardcoding a run-id, hash, or bare timestamp unique to
ONE of the sample paths into the glob (e.g. don't propose
`autoresearch/run-20260710/` — that only ever matches that one run).
If the sample paths don't share an obvious generalizable pattern, it is
legitimate to decline (see "no proposal" below) rather than force one.
---
## Choosing a lifetime
Pick the lifetime that best fits what this class of artifact IS, based on
the paths and any content you can infer from names/locations:
- `"temporary"` — self-healing, exists for a bounded window (logs, run
outputs, scratch artifacts); a `retain_recent`/`max_age_days` policy makes
sense.
- `"delete-once-served"` — exists until some condition is met, then should
go (a plan doc that should be archived once shipped, a checklist that
should go once fully checked off).
- `"keep"` — actually should NOT be deleted; if every sample looks like this,
decline to nominate (see below) rather than proposing a rule that would
delete keepers.
---
## Output
Return ONLY a JSON object, no prose, no code fences:
```json
{
"glob": "autoresearch/run-*/",
"lifetime": "temporary",
"rationale": "One-off autoresearch run directories; self-healing, safe to age out.",
"confidence": "high"
}
```
If you cannot responsibly generalize this cluster (the samples don't share a
clean pattern, or they look like keepers, not clutter), return instead:
```json
{
"glob": null,
"lifetime": null,
"rationale": "Samples do not share a generalizable naming/location pattern, or look like content that should be kept.",
"confidence": "low"
}
```
A `null` glob is a legitimate, expected outcome — the judge step treats it as
"no nomination for this cluster," not an error.