[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71DXJGCWCMJBQRBWY2Y1WD3":3,"skill-same:01M71DXJGCWCMJBQRBWY2Y1WD3":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M71DXJGCWCMJBQRBWY2Y1WD3","garden",null,"Audit HQ content for stale, duplicate, or inaccurate information.","indigoai-us\u002Fhq-core","indigoai-us","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F122242446?v=4","01M71DTQ5NGD10GT1Z7E6XKWC5","HQ","01M71DTQ6BKSYYBNC9RAKT3YDK",94,"MIT","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgarden\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30],"content","audit","Bash","grep","read","write","edit","stale","task","duplicate","information","for","2026-11-10 10:12:30",false,"---\nname: garden\ndescription: Audit HQ content for stale, duplicate, or inaccurate information.\nallowed-tools: Task, Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion\n---\n\n# \u002Fgarden - HQ Content Gardener\n\nMulti-worker audit pipeline: Scout → Auditor → Curator. Detects stale content, duplicates, orphans, INDEX drift, conflicts, and unowned files. Human approval gates between each phase.\n\n**Arguments:** $ARGUMENTS\n\n## Usage\n\n```\n\u002Fgarden {product}                    # Audit one company (all its dirs)\n\u002Fgarden companies\u002F{company}\u002Fknowledge\u002F    # Audit specific directory\n\u002Fgarden personal\u002Fprojects\u002F             # Audit personal\u002FHQ projects\n\u002Fgarden all                            # Full HQ sweep (chunked by company + orphan sweep)\n\u002Fgarden --resume {run-id}              # Resume interrupted run\n\u002Fgarden --status                       # Show active\u002Fpast garden runs\n\u002Fgarden policies [--dry-run]           # Retire personal + active-company policies by evidence\n\u002Fgarden policies --deep                # Reviewed trim: full-read every policy, approve per group, delete with backup\n```\n\n---\n\n## Policies Pass (`\u002Fgarden policies`)\n\nRetires personal and company policies by evidence so the corpus fades on its\nown. Retirement is never gated on human review: the pass retires, reports, and\na wrong call is reversed with `bash core\u002Fscripts\u002Fpolicy-retire.sh \u003Cid> --restore`.\nIt runs on its own and is not part of the Scout → Auditor → Curator pipeline\nbelow. The approval gates there do not apply to this pass.\n\n1. Resolve the active company (`hq-session.sh get company_slug`). Scope is\n   `personal\u002Fpolicies` and `companies\u002F\u003Cactive>\u002Fpolicies` only. Never retire\n   anything in `core\u002Fpolicies`\n   (hq-retire-generated-artifacts-by-usage-do-not-gate-creation).\n2. Read the evidence: `bash core\u002Fscripts\u002Fpolicy-retrieval-report.sh\n   personal\u002Fpolicies companies\u002F\u003Cactive>\u002Fpolicies` (last retrieval per policy).\n3. Select candidates with `bash core\u002Fscripts\u002Fgarden-policy-pass.sh --company\n   \u003Cactive> --dry-run`. It prints one row per policy (decision, id, path,\n   reason). A policy is a candidate when any one of these holds:\n   - zero retrievals in 90 days and `created:` more than 90 days ago;\n   - `status: superseded` and an active policy lists it in `supersedes:`;\n   - `retire_when:` is present and you judge the condition met. The script\n     marks these rows `judge`. Read each one, check the condition against the\n     current state (installed versions, shipped fixes, existing files), and\n     write one sentence of reasoning per candidate, whether met or not.\n4. Run it for real: `bash core\u002Fscripts\u002Fgarden-policy-pass.sh --company\n   \u003Cactive> [--retire-when-met \u003Cid>=\u003Creasoning>]...`. Each candidate is retired\n   through `core\u002Fscripts\u002Fpolicy-retire.sh` (`hq core policy retire`), which\n   sets `status: retired`, `retired_at`, `retired_by`, `retired_reason`. Never\n   edit policy frontmatter by hand.\n5. Retired files stay in place. Do not move, delete, or archive them. The only\n   effect on injection is the staleness order from the trigger loader.\n6. Print the summary line the script ends with (how many evaluated, retired,\n   and skipped and why). It is also written to\n   `workspace\u002Freports\u002Fgarden\u002Fpolicies-\u003CYYYY-MM-DD>.md`, together with the\n   per-policy table and your `retire_when` reasoning.\n\n`--dry-run` lists candidates without retiring anything. Use it for a first\nrun on a new machine, review the list against the rules above yourself, then\nrun for real.\n\n---\n\n## Deep Policies Pass (`\u002Fgarden policies --deep`)\n\nA reviewed trim for a policy corpus that has grown past what usage evidence\ncan thin out. Subagents read every policy in full and assign a verdict; the\nuser approves each verdict group; approved files are backed up and deleted.\nUnlike the evidence pass above, every destructive step waits for the user.\nThe mechanical steps run through `core\u002Fscripts\u002Fgarden-policy-deep.py`; the\njudgment is yours and the reviewers'.\n\n### Scope\n\n- `personal\u002Fpolicies`, plus `companies\u002F\u003Cco>\u002Fpolicies` only for companies in\n  the session's locked company set. Ask before adding a company folder.\n- Never `core\u002Fpolicies`. The script refuses it. Core rules change through\n  hq-core-staging.\n- Never move a rule from one company's folder into another's. A rule that\n  belongs to a different company is a delete candidate or stays put.\n\n### Steps\n\n1. **Warn about sync first.** Before any delete, tell the user that deletes\n   in a synced folder propagate to their other machines on the next sync,\n   and that every round is backed up to a tarball that can be restored.\n2. **Inventory.**\n   `python3 core\u002Fscripts\u002Fgarden-policy-deep.py inventory --dir personal\u002Fpolicies [--dir companies\u002F\u003Cco>\u002Fpolicies] --out workspace\u002Freports\u002Fgarden\u002Fdeep-\u003CYYYY-MM-DD>`\n   It prints counts, already-retired files, frontmatter that does not parse,\n   retrieval bands, and creation months, and writes review batches.\n   Retrieval counts mostly measure how broad a trigger is, not whether a rule\n   helps; do not treat a high count as a reason to keep.\n3. **Repair broken frontmatter** before review, with Edit (quote values that\n   contain `: `, fix orphan lists and invalid `when:` expressions). A policy\n   whose frontmatter does not parse never fires; that is a repair, not a trim.\n4. **Interview** the user with one `AskUserQuestion` about tools, flows, and\n   companies they no longer use. Pass the answers into every reviewer brief.\n5. **Review.** Spawn one `general-purpose` subagent per batch (about 175\n   files each), in parallel, read-only except its output file\n   `\u003Crun>\u002Freview-NN.json`. The brief must require:\n   - reading every file's full text (print files whole from one python script,\n     in chunks; per-file `cat` may be hook-blocked), never judging from a title\n     or digest line, because a title is not enough to justify a deletion;\n   - one verdict per file from this rubric:\n     - `personal-keep`: the user's own preference, voice, taste, or workflow\n       choice, or something specific to this machine;\n     - `core-policy`: an HQ rule every install would benefit from;\n     - `core-fix`: works around a bug or rough edge in an HQ script, hook, or\n       skill; name the real path (skills live in `.claude\u002Fskills\u002F\u003Cname>`);\n     - `delete-covered`: core, the charter, or a skill already says it; name it;\n     - `delete-dup`: repeats another kept policy; name the twin;\n     - `delete-generic`: practice a strong model follows unprompted;\n     - `delete-narrow`: an incident note or a one-time API or tool quirk;\n     - `delete-stale`: depends on something gone; cite the missing file,\n       flag, or tool;\n   - keeping hard rules about deletes, secrets, outbound sends, deploy gates,\n     production writes, or company isolation unless a twin or the missing\n     dependency is named;\n   - never writing a `companies\u002F` path literally in a Bash command.\n6. **Merge.** `python3 core\u002Fscripts\u002Fgarden-policy-deep.py merge --out \u003Crun>`\n   fails if any file lacks a verdict, and keeps a duplicate whose twin is\n   also flagged. Spot-check a sample of `delete-covered` and `delete-stale`\n   claims yourself before presenting them.\n7. **Decide, one group at a time.** One `AskUserQuestion` per group,\n   recommended option first, with counts and two or three concrete examples:\n   stale and covered; duplicates; narrow soft; narrow hard (read these\n   yourself and propose which to keep); `core-policy` and `core-fix`. For\n   the core groups, offer: delete the personal copies; file them as core work\n   (`\u002Fhq-bug` for most users; an hq-core-staging project for maintainers),\n   then delete; or keep until the core change lands. An approval covers only\n   the group asked about.\n8. **Apply each approved group.**\n   `python3 core\u002Fscripts\u002Fgarden-policy-deep.py apply --out \u003Crun> --verdict \u003Cv> [--verdict \u003Cv>] [--enforcement hard|soft] [--exclude \u003Cfile>]`\n   prints a dry run. Re-run with `--confirm` to tar the files into\n   `workspace\u002Forchestrator\u002Fpolicy-lifecycle\u002Fbackups\u002Fgarden-deep-\u003Cts>.tar.gz`,\n   verify the tarball, delete, and log the list to `\u003Crun>\u002Fapplied.log`. This\n   deletes through a script, which bypasses the policy-folder write guard, so\n   say so in the question that asks for approval. If the user prefers, retire\n   instead with `core\u002Fscripts\u002Fpolicy-retire.sh`.\n9. **Undo** with `python3 core\u002Fscripts\u002Fgarden-policy-deep.py restore --backup \u003Ctarball>`.\n10. **Report.** Write `\u003Crun>\u002Freport.md`: before and after counts (hard and\n    soft), each round's decision, backup path, and every removed file with\n    its verdict and reason. Policy digests are retired, so if the folder still\n    has a `_digest.md`, delete it with `rm`; nothing reads it and no generator\n    ships. Give the user the counts, the backup paths,\n    and the report link in plain words.\n\nThe pass can repeat: after a first round, run it again on the keeps with a\nstricter bar (keep only personal preferences and safety gates that core does\nnot already cover).\n\n---\n\n## Process\n\n### 0. Parse Arguments\n\n**If `--status`:**\n- Scan `workspace\u002Forchestrator\u002Fgarden-*\u002Fstate.json`\n- Display table: run_id | scope | status | phase | findings | actions | date\n- Exit\n\n**If `--resume {run-id}`:**\n- Load state from `workspace\u002Forchestrator\u002Fgarden-{run-id}\u002Fstate.json`\n- Resume from last incomplete phase\n- If phase was \"scout\" → re-run scout\n- If phase was \"auditor\" → load findings.json, go to human gate before audit\n- If phase was \"curator\" → load audit-report.json, go to human gate before curate\n\n**If `{scope}`:**\n- Resolve scope (Step 1)\n- Check for existing run with same scope → offer resume or fresh start\n- Initialize new run\n\n### 1. Scope Resolution\n\nResolve the argument to a list of concrete directory paths.\n\n**Company slug** (matches key in `companies\u002Fmanifest.yaml`):\n```\nRead companies\u002Fmanifest.yaml\nFor company = {scope}:\n  paths = [\n    companies\u002F{scope}\u002F               # company dir + knowledge\n    workers matching company:{scope}  # from worker.company field in each worker.yaml (registry surfaces this)\n    projects matching manifest repos  # project dirs related to company\n    workspace\u002Forchestrator\u002F*{scope}*  # orchestrator state for company projects\n  ]\n```\n\n**Direct path** (contains `\u002F`):\n```\nValidate path exists\npaths = [{scope}]  # just that directory tree\n```\n\n**`all`** (full sweep):\n```\nRead companies\u002Fmanifest.yaml → get all company slugs\nchunks = company slugs + [\"_orphans\"]\nProcess each chunk sequentially (scout→audit→curate per chunk)\n_orphans chunk = everything not claimed by any company:\n  workspace\u002Fthreads\u002F\n  workspace\u002Freports\u002F\n  workspace\u002Finsights\u002F (global\u002Ftools\u002Fconcepts — not company-scoped)\n  workspace\u002Forchestrator\u002F (runs not tied to a company)\n  personal\u002Fprojects\u002F (personal\u002FHQ projects)\n  core\u002Fworkers\u002Fpublic\u002F (non-team, non-company workers)\n```\n\n**`personal\u002Fprojects\u002F`** or other HQ-level dir:\n```\npaths = [{scope}]\n```\n\n### 2. Initialize State\n\n```json\n\u002F\u002F Write to workspace\u002Forchestrator\u002Fgarden-{run-id}\u002Fstate.json\n{\n  \"run_id\": \"garden-{slug}-{YYYYMMDD}\",\n  \"scope\": \"{original argument}\",\n  \"resolved_paths\": [\"...\"],\n  \"status\": \"in_progress\",\n  \"phase\": \"scout\",\n  \"started_at\": \"ISO8601\",\n  \"updated_at\": \"ISO8601\",\n  \"findings_count\": 0,\n  \"approved_count\": 0,\n  \"actions_taken\": 0,\n  \"prds_created\": []\n}\n```\n\nRun ID format:\n- Company: `garden-{company}-{YYYYMMDD}` (e.g. `garden-{product}-20260219`)\n- Path: `garden-{dirname}-{YYYYMMDD}` (e.g. `garden-projects-20260219`)\n- All: `garden-all-{YYYYMMDD}`\n\n### 3. Scout Phase\n\nSpawn garden-scout worker via Task tool:\n\n```\nTask(\n  subagent_type: \"general-purpose\",\n  model: \"haiku\",\n  prompt: \"\"\"\n  You are garden-scout. Read your worker config and scan-scope skill:\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-scout\u002Fworker.yaml\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-scout\u002Fskills\u002Fscan-scope.md\n\n  Context:\n  - run_id: {run_id}\n  - resolved_paths: {resolved_paths}\n  - output_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Ffindings.json\n\n  Execute the scan-scope skill. Write findings.json to the output path.\n  Return a JSON summary: {\"findings_count\": N, \"by_type\": {...}, \"by_severity\": {...}}\n  \"\"\"\n)\n```\n\nAfter scout returns:\n- Read findings.json\n- Update state.json: phase → \"scout_complete\", findings_count\n- Display findings summary to human\n\n**HUMAN GATE:**\n```\nPresent findings summary table:\n| Type | Count | High | Med | Low |\nShow top 10 highest-severity findings with paths and signals.\n\nAsk: \"Approve all findings for audit, or filter? (all \u002F filter \u002F abort)\"\n- all → approved_ids = all finding IDs\n- filter → show each finding, human approves\u002Frejects\n- abort → set status \"paused\", exit\n```\n\n### 4. Auditor Phase\n\nSpawn garden-auditor worker via Task tool:\n\n```\nTask(\n  subagent_type: \"general-purpose\",\n  model: \"sonnet\",\n  prompt: \"\"\"\n  You are garden-auditor. Read your worker config and validate-findings skill:\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-auditor\u002Fworker.yaml\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-auditor\u002Fskills\u002Fvalidate-findings.md\n\n  Context:\n  - run_id: {run_id}\n  - findings_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Ffindings.json\n  - output_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Faudit-report.json\n  - approved_ids: {approved_finding_ids}\n\n  Execute the validate-findings skill. Write audit-report.json to the output path.\n  Return a JSON summary: {\"audited\": N, \"actions\": {...}, \"escalations\": [...]}\n  \"\"\"\n)\n```\n\nAfter auditor returns:\n- Read audit-report.json\n- Update state.json: phase → \"auditor_complete\"\n- Display audit summary to human\n\n**HUMAN GATE:**\n```\nPresent audit results table:\n| Finding | Validation | Action | Confidence |\nShow escalations (needs-discovery) separately.\n\nAsk: \"Approve all actions, or review individually? (all \u002F review \u002F abort)\"\n- all → approved_ids = all non-skip finding IDs\n- review → show each action, human approves\u002Frejects\u002Fmodifies\n- abort → set status \"paused\", exit\n```\n\n### 5. Curator Phase\n\nSpawn garden-curator worker via Task tool:\n\n```\nTask(\n  subagent_type: \"general-purpose\",\n  model: \"sonnet\",\n  prompt: \"\"\"\n  You are garden-curator. Read your worker config and execute-actions skill:\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-curator\u002Fworker.yaml\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-curator\u002Fskills\u002Fexecute-actions.md\n\n  Context:\n  - run_id: {run_id}\n  - audit_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Faudit-report.json\n  - output_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Factions-log.json\n  - approved_ids: {approved_action_ids}\n\n  Execute the execute-actions skill. Write actions-log.json to the output path.\n  Return a JSON summary: {\"succeeded\": N, \"failed\": N, \"prds_created\": [...], \"repos_committed\": [...]}\n  \"\"\"\n)\n```\n\nAfter curator returns:\n- Read actions-log.json\n- Update state.json: phase → \"complete\", actions_taken, prds_created\n\n### 6. Report\n\nGenerate summary report:\n\n```markdown\n\u002F\u002F Write to workspace\u002Freports\u002Fgarden\u002F{run_id}.md\n\n# Garden Report: {scope}\n**Run:** {run_id} | **Date:** {date}\n\n## Summary\n- Files scanned: {N}\n- Findings: {N} ({high} high, {med} medium, {low} low)\n- Actions taken: {N} ({archived} archived, {deduped} deduped, {updated} updated, {cleaned} cleaned)\n- Escalations: {N} PRDs created\n\n## Actions Taken\n| Finding | Action | Before | After |\n...\n\n## Escalations Created\n| PRD | Title | Source Finding |\n...\n\n## Failed Actions\n| Finding | Error |\n...\n```\n\nPost-report:\n- Run `qmd update 2>\u002Fdev\u002Fnull || true`\n- Regenerate affected INDEX.md files\n- Log garden run completion timestamp to state.json\n\n### 7. All-Sweep Loop (only for `\u002Fgarden all`)\n\nIf scope is \"all\":\n```\nchunks = [company1, company2, ..., \"_orphans\"]\nfor chunk in chunks:\n  Run Steps 1-6 for this chunk\n  run_id = garden-all-{YYYYMMDD}-{chunk}\n  State stored in workspace\u002Forchestrator\u002Fgarden-all-{YYYYMMDD}\u002F\n  Human gates per chunk (not batched across all companies)\n```\n\nAfter all chunks:\n- Generate aggregate report at `workspace\u002Freports\u002Fgarden\u002Fgarden-all-{YYYYMMDD}.md`\n- Summarize per-company findings + actions\n\n---\n\n## Rules\n\n- ONE garden run at a time (check for in_progress runs before starting)\n- NEVER delete without archival — curator moves to _archive\u002F first\n- NEVER skip human gates — always present findings\u002Factions for approval\n- Company knowledge is a plain directory synced through the company vault; do not initialize or commit Git there\n- Always verify `git branch --show-current` before any commit\n- For \"all\" sweep: chunk by company, sequential, human gate per chunk\n- Scout is read-only. Auditor is read-only. Only Curator modifies files.\n- State files enable resume — always update state.json after each phase\n- If context gets long, \u002Fhandoff between chunks (for \"all\" sweep)\n- After garden completion, log timestamp so \u002Fnexttask can track freshness\n\n## Model Routing\n\n| Worker | Model | Rationale |\n|--------|-------|-----------|\n| garden-scout | haiku | Fast scan, pattern matching, no deep analysis |\n| garden-auditor | sonnet | Reads content, cross-references, makes judgments |\n| garden-curator | sonnet | Executes file ops, commits, creates PRDs |\n","# \u002Fgarden - HQ Content Gardener\n\nMulti-worker audit pipeline: Scout → Auditor → Curator. Detects stale content, duplicates, orphans, INDEX drift, conflicts, and unowned files. Human approval gates between each phase.\n\n**Arguments:** $ARGUMENTS\n\n## Usage\n\n```\n\u002Fgarden {product}                    # Audit one company (all its dirs)\n\u002Fgarden companies\u002F{company}\u002Fknowledge\u002F    # Audit specific directory\n\u002Fgarden personal\u002Fprojects\u002F             # Audit personal\u002FHQ projects\n\u002Fgarden all                            # Full HQ sweep (chunked by company + orphan sweep)\n\u002Fgarden --resume {run-id}              # Resume interrupted run\n\u002Fgarden --status                       # Show active\u002Fpast garden runs\n\u002Fgarden policies [--dry-run]           # Retire personal + active-company policies by evidence\n\u002Fgarden policies --deep                # Reviewed trim: full-read every policy, approve per group, delete with backup\n```\n\n---\n\n## Policies Pass (`\u002Fgarden policies`)\n\nRetires personal and company policies by evidence so the corpus fades on its\nown. Retirement is never gated on human review: the pass retires, reports, and\na wrong call is reversed with `bash core\u002Fscripts\u002Fpolicy-retire.sh \u003Cid> --restore`.\nIt runs on its own and is not part of the Scout → Auditor → Curator pipeline\nbelow. The approval gates there do not apply to this pass.\n\n1. Resolve the active company (`hq-session.sh get company_slug`). Scope is\n   `personal\u002Fpolicies` and `companies\u002F\u003Cactive>\u002Fpolicies` only. Never retire\n   anything in `core\u002Fpolicies`\n   (hq-retire-generated-artifacts-by-usage-do-not-gate-creation).\n2. Read the evidence: `bash core\u002Fscripts\u002Fpolicy-retrieval-report.sh\n   personal\u002Fpolicies companies\u002F\u003Cactive>\u002Fpolicies` (last retrieval per policy).\n3. Select candidates with `bash core\u002Fscripts\u002Fgarden-policy-pass.sh --company\n   \u003Cactive> --dry-run`. It prints one row per policy (decision, id, path,\n   reason). A policy is a candidate when any one of these holds:\n   - zero retrievals in 90 days and `created:` more than 90 days ago;\n   - `status: superseded` and an active policy lists it in `supersedes:`;\n   - `retire_when:` is present and you judge the condition met. The script\n     marks these rows `judge`. Read each one, check the condition against the\n     current state (installed versions, shipped fixes, existing files), and\n     write one sentence of reasoning per candidate, whether met or not.\n4. Run it for real: `bash core\u002Fscripts\u002Fgarden-policy-pass.sh --company\n   \u003Cactive> [--retire-when-met \u003Cid>=\u003Creasoning>]...`. Each candidate is retired\n   through `core\u002Fscripts\u002Fpolicy-retire.sh` (`hq core policy retire`), which\n   sets `status: retired`, `retired_at`, `retired_by`, `retired_reason`. Never\n   edit policy frontmatter by hand.\n5. Retired files stay in place. Do not move, delete, or archive them. The only\n   effect on injection is the staleness order from the trigger loader.\n6. Print the summary line the script ends with (how many evaluated, retired,\n   and skipped and why). It is also written to\n   `workspace\u002Freports\u002Fgarden\u002Fpolicies-\u003CYYYY-MM-DD>.md`, together with the\n   per-policy table and your `retire_when` reasoning.\n\n`--dry-run` lists candidates without retiring anything. Use it for a first\nrun on a new machine, review the list against the rules above yourself, then\nrun for real.\n\n---\n\n## Deep Policies Pass (`\u002Fgarden policies --deep`)\n\nA reviewed trim for a policy corpus that has grown past what usage evidence\ncan thin out. Subagents read every policy in full and assign a verdict; the\nuser approves each verdict group; approved files are backed up and deleted.\nUnlike the evidence pass above, every destructive step waits for the user.\nThe mechanical steps run through `core\u002Fscripts\u002Fgarden-policy-deep.py`; the\njudgment is yours and the reviewers'.\n\n### Scope\n\n- `personal\u002Fpolicies`, plus `companies\u002F\u003Cco>\u002Fpolicies` only for companies in\n  the session's locked company set. Ask before adding a company folder.\n- Never `core\u002Fpolicies`. The script refuses it. Core rules change through\n  hq-core-staging.\n- Never move a rule from one company's folder into another's. A rule that\n  belongs to a different company is a delete candidate or stays put.\n\n### Steps\n\n1. **Warn about sync first.** Before any delete, tell the user that deletes\n   in a synced folder propagate to their other machines on the next sync,\n   and that every round is backed up to a tarball that can be restored.\n2. **Inventory.**\n   `python3 core\u002Fscripts\u002Fgarden-policy-deep.py inventory --dir personal\u002Fpolicies [--dir companies\u002F\u003Cco>\u002Fpolicies] --out workspace\u002Freports\u002Fgarden\u002Fdeep-\u003CYYYY-MM-DD>`\n   It prints counts, already-retired files, frontmatter that does not parse,\n   retrieval bands, and creation months, and writes review batches.\n   Retrieval counts mostly measure how broad a trigger is, not whether a rule\n   helps; do not treat a high count as a reason to keep.\n3. **Repair broken frontmatter** before review, with Edit (quote values that\n   contain `: `, fix orphan lists and invalid `when:` expressions). A policy\n   whose frontmatter does not parse never fires; that is a repair, not a trim.\n4. **Interview** the user with one `AskUserQuestion` about tools, flows, and\n   companies they no longer use. Pass the answers into every reviewer brief.\n5. **Review.** Spawn one `general-purpose` subagent per batch (about 175\n   files each), in parallel, read-only except its output file\n   `\u003Crun>\u002Freview-NN.json`. The brief must require:\n   - reading every file's full text (print files whole from one python script,\n     in chunks; per-file `cat` may be hook-blocked), never judging from a title\n     or digest line, because a title is not enough to justify a deletion;\n   - one verdict per file from this rubric:\n     - `personal-keep`: the user's own preference, voice, taste, or workflow\n       choice, or something specific to this machine;\n     - `core-policy`: an HQ rule every install would benefit from;\n     - `core-fix`: works around a bug or rough edge in an HQ script, hook, or\n       skill; name the real path (skills live in `.claude\u002Fskills\u002F\u003Cname>`);\n     - `delete-covered`: core, the charter, or a skill already says it; name it;\n     - `delete-dup`: repeats another kept policy; name the twin;\n     - `delete-generic`: practice a strong model follows unprompted;\n     - `delete-narrow`: an incident note or a one-time API or tool quirk;\n     - `delete-stale`: depends on something gone; cite the missing file,\n       flag, or tool;\n   - keeping hard rules about deletes, secrets, outbound sends, deploy gates,\n     production writes, or company isolation unless a twin or the missing\n     dependency is named;\n   - never writing a `companies\u002F` path literally in a Bash command.\n6. **Merge.** `python3 core\u002Fscripts\u002Fgarden-policy-deep.py merge --out \u003Crun>`\n   fails if any file lacks a verdict, and keeps a duplicate whose twin is\n   also flagged. Spot-check a sample of `delete-covered` and `delete-stale`\n   claims yourself before presenting them.\n7. **Decide, one group at a time.** One `AskUserQuestion` per group,\n   recommended option first, with counts and two or three concrete examples:\n   stale and covered; duplicates; narrow soft; narrow hard (read these\n   yourself and propose which to keep); `core-policy` and `core-fix`. For\n   the core groups, offer: delete the personal copies; file them as core work\n   (`\u002Fhq-bug` for most users; an hq-core-staging project for maintainers),\n   then delete; or keep until the core change lands. An approval covers only\n   the group asked about.\n8. **Apply each approved group.**\n   `python3 core\u002Fscripts\u002Fgarden-policy-deep.py apply --out \u003Crun> --verdict \u003Cv> [--verdict \u003Cv>] [--enforcement hard|soft] [--exclude \u003Cfile>]`\n   prints a dry run. Re-run with `--confirm` to tar the files into\n   `workspace\u002Forchestrator\u002Fpolicy-lifecycle\u002Fbackups\u002Fgarden-deep-\u003Cts>.tar.gz`,\n   verify the tarball, delete, and log the list to `\u003Crun>\u002Fapplied.log`. This\n   deletes through a script, which bypasses the policy-folder write guard, so\n   say so in the question that asks for approval. If the user prefers, retire\n   instead with `core\u002Fscripts\u002Fpolicy-retire.sh`.\n9. **Undo** with `python3 core\u002Fscripts\u002Fgarden-policy-deep.py restore --backup \u003Ctarball>`.\n10. **Report.** Write `\u003Crun>\u002Freport.md`: before and after counts (hard and\n    soft), each round's decision, backup path, and every removed file with\n    its verdict and reason. Policy digests are retired, so if the folder still\n    has a `_digest.md`, delete it with `rm`; nothing reads it and no generator\n    ships. Give the user the counts, the backup paths,\n    and the report link in plain words.\n\nThe pass can repeat: after a first round, run it again on the keeps with a\nstricter bar (keep only personal preferences and safety gates that core does\nnot already cover).\n\n---\n\n## Process\n\n### 0. Parse Arguments\n\n**If `--status`:**\n- Scan `workspace\u002Forchestrator\u002Fgarden-*\u002Fstate.json`\n- Display table: run_id | scope | status | phase | findings | actions | date\n- Exit\n\n**If `--resume {run-id}`:**\n- Load state from `workspace\u002Forchestrator\u002Fgarden-{run-id}\u002Fstate.json`\n- Resume from last incomplete phase\n- If phase was \"scout\" → re-run scout\n- If phase was \"auditor\" → load findings.json, go to human gate before audit\n- If phase was \"curator\" → load audit-report.json, go to human gate before curate\n\n**If `{scope}`:**\n- Resolve scope (Step 1)\n- Check for existing run with same scope → offer resume or fresh start\n- Initialize new run\n\n### 1. Scope Resolution\n\nResolve the argument to a list of concrete directory paths.\n\n**Company slug** (matches key in `companies\u002Fmanifest.yaml`):\n```\nRead companies\u002Fmanifest.yaml\nFor company = {scope}:\n  paths = [\n    companies\u002F{scope}\u002F               # company dir + knowledge\n    workers matching company:{scope}  # from worker.company field in each worker.yaml (registry surfaces this)\n    projects matching manifest repos  # project dirs related to company\n    workspace\u002Forchestrator\u002F*{scope}*  # orchestrator state for company projects\n  ]\n```\n\n**Direct path** (contains `\u002F`):\n```\nValidate path exists\npaths = [{scope}]  # just that directory tree\n```\n\n**`all`** (full sweep):\n```\nRead companies\u002Fmanifest.yaml → get all company slugs\nchunks = company slugs + [\"_orphans\"]\nProcess each chunk sequentially (scout→audit→curate per chunk)\n_orphans chunk = everything not claimed by any company:\n  workspace\u002Fthreads\u002F\n  workspace\u002Freports\u002F\n  workspace\u002Finsights\u002F (global\u002Ftools\u002Fconcepts — not company-scoped)\n  workspace\u002Forchestrator\u002F (runs not tied to a company)\n  personal\u002Fprojects\u002F (personal\u002FHQ projects)\n  core\u002Fworkers\u002Fpublic\u002F (non-team, non-company workers)\n```\n\n**`personal\u002Fprojects\u002F`** or other HQ-level dir:\n```\npaths = [{scope}]\n```\n\n### 2. Initialize State\n\n```json\n\u002F\u002F Write to workspace\u002Forchestrator\u002Fgarden-{run-id}\u002Fstate.json\n{\n  \"run_id\": \"garden-{slug}-{YYYYMMDD}\",\n  \"scope\": \"{original argument}\",\n  \"resolved_paths\": [\"...\"],\n  \"status\": \"in_progress\",\n  \"phase\": \"scout\",\n  \"started_at\": \"ISO8601\",\n  \"updated_at\": \"ISO8601\",\n  \"findings_count\": 0,\n  \"approved_count\": 0,\n  \"actions_taken\": 0,\n  \"prds_created\": []\n}\n```\n\nRun ID format:\n- Company: `garden-{company}-{YYYYMMDD}` (e.g. `garden-{product}-20260219`)\n- Path: `garden-{dirname}-{YYYYMMDD}` (e.g. `garden-projects-20260219`)\n- All: `garden-all-{YYYYMMDD}`\n\n### 3. Scout Phase\n\nSpawn garden-scout worker via Task tool:\n\n```\nTask(\n  subagent_type: \"general-purpose\",\n  model: \"haiku\",\n  prompt: \"\"\"\n  You are garden-scout. Read your worker config and scan-scope skill:\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-scout\u002Fworker.yaml\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-scout\u002Fskills\u002Fscan-scope.md\n\n  Context:\n  - run_id: {run_id}\n  - resolved_paths: {resolved_paths}\n  - output_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Ffindings.json\n\n  Execute the scan-scope skill. Write findings.json to the output path.\n  Return a JSON summary: {\"findings_count\": N, \"by_type\": {...}, \"by_severity\": {...}}\n  \"\"\"\n)\n```\n\nAfter scout returns:\n- Read findings.json\n- Update state.json: phase → \"scout_complete\", findings_count\n- Display findings summary to human\n\n**HUMAN GATE:**\n```\nPresent findings summary table:\n| Type | Count | High | Med | Low |\nShow top 10 highest-severity findings with paths and signals.\n\nAsk: \"Approve all findings for audit, or filter? (all \u002F filter \u002F abort)\"\n- all → approved_ids = all finding IDs\n- filter → show each finding, human approves\u002Frejects\n- abort → set status \"paused\", exit\n```\n\n### 4. Auditor Phase\n\nSpawn garden-auditor worker via Task tool:\n\n```\nTask(\n  subagent_type: \"general-purpose\",\n  model: \"sonnet\",\n  prompt: \"\"\"\n  You are garden-auditor. Read your worker config and validate-findings skill:\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-auditor\u002Fworker.yaml\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-auditor\u002Fskills\u002Fvalidate-findings.md\n\n  Context:\n  - run_id: {run_id}\n  - findings_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Ffindings.json\n  - output_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Faudit-report.json\n  - approved_ids: {approved_finding_ids}\n\n  Execute the validate-findings skill. Write audit-report.json to the output path.\n  Return a JSON summary: {\"audited\": N, \"actions\": {...}, \"escalations\": [...]}\n  \"\"\"\n)\n```\n\nAfter auditor returns:\n- Read audit-report.json\n- Update state.json: phase → \"auditor_complete\"\n- Display audit summary to human\n\n**HUMAN GATE:**\n```\nPresent audit results table:\n| Finding | Validation | Action | Confidence |\nShow escalations (needs-discovery) separately.\n\nAsk: \"Approve all actions, or review individually? (all \u002F review \u002F abort)\"\n- all → approved_ids = all non-skip finding IDs\n- review → show each action, human approves\u002Frejects\u002Fmodifies\n- abort → set status \"paused\", exit\n```\n\n### 5. Curator Phase\n\nSpawn garden-curator worker via Task tool:\n\n```\nTask(\n  subagent_type: \"general-purpose\",\n  model: \"sonnet\",\n  prompt: \"\"\"\n  You are garden-curator. Read your worker config and execute-actions skill:\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-curator\u002Fworker.yaml\n  - core\u002Fworkers\u002Fpublic\u002Fgardener-team\u002Fgarden-curator\u002Fskills\u002Fexecute-actions.md\n\n  Context:\n  - run_id: {run_id}\n  - audit_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Faudit-report.json\n  - output_path: workspace\u002Forchestrator\u002Fgarden-{run_id}\u002Factions-log.json\n  - approved_ids: {approved_action_ids}\n\n  Execute the execute-actions skill. Write actions-log.json to the output path.\n  Return a JSON summary: {\"succeeded\": N, \"failed\": N, \"prds_created\": [...], \"repos_committed\": [...]}\n  \"\"\"\n)\n```\n\nAfter curator returns:\n- Read actions-log.json\n- Update state.json: phase → \"complete\", actions_taken, prds_created\n\n### 6. Report\n\nGenerate summary report:\n\n```markdown\n\u002F\u002F Write to workspace\u002Freports\u002Fgarden\u002F{run_id}.md\n\n# Garden Report: {scope}\n**Run:** {run_id} | **Date:** {date}\n\n## Summary\n- Files scanned: {N}\n- Findings: {N} ({high} high, {med} medium, {low} low)\n- Actions taken: {N} ({archived} archived, {deduped} deduped, {updated} updated, {cleaned} cleaned)\n- Escalations: {N} PRDs created\n\n## Actions Taken\n| Finding | Action | Before | After |\n...\n\n## Escalations Created\n| PRD | Title | Source Finding |\n...\n\n## Failed Actions\n| Finding | Error |\n...\n```\n\nPost-report:\n- Run `qmd update 2>\u002Fdev\u002Fnull || true`\n- Regenerate affected INDEX.md files\n- Log garden run completion timestamp to state.json\n\n### 7. All-Sweep Loop (only for `\u002Fgarden all`)\n\nIf scope is \"all\":\n```\nchunks = [company1, company2, ..., \"_orphans\"]\nfor chunk in chunks:\n  Run Steps 1-6 for this chunk\n  run_id = garden-all-{YYYYMMDD}-{chunk}\n  State stored in workspace\u002Forchestrator\u002Fgarden-all-{YYYYMMDD}\u002F\n  Human gates per chunk (not batched across all companies)\n```\n\nAfter all chunks:\n- Generate aggregate report at `workspace\u002Freports\u002Fgarden\u002Fgarden-all-{YYYYMMDD}.md`\n- Summarize per-company findings + actions\n\n---\n\n## Rules\n\n- ONE garden run at a time (check for in_progress runs before starting)\n- NEVER delete without archival — curator moves to _archive\u002F first\n- NEVER skip human gates — always present findings\u002Factions for approval\n- Company knowledge is a plain directory synced through the company vault; do not initialize or commit Git there\n- Always verify `git branch --show-current` before any commit\n- For \"all\" sweep: chunk by company, sequential, human gate per chunk\n- Scout is read-only. Auditor is read-only. Only Curator modifies files.\n- State files enable resume — always update state.json after each phase\n- If context gets long, \u002Fhandoff between chunks (for \"all\" sweep)\n- After garden completion, log timestamp so \u002Fnexttask can track freshness\n\n## Model Routing\n\n| Worker | Model | Rationale |\n|--------|-------|-----------|\n| garden-scout | haiku | Fast scan, pattern matching, no deep analysis |\n| garden-auditor | sonnet | Reads content, cross-references, makes judgments |\n| garden-curator | sonnet | Executes file ops, commits, creates PRDs |\n",{"name":5,"description":7,"allowed-tools":36},"Task, Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion","main","205cf61728a27ef15e9153aa38df5856fc8d82f5",".claude\u002Fskills\u002Fgarden",18,"https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core","https:\u002F\u002Fgithub.com\u002Findigoai-us","https:\u002F\u002Fhqforwork.com\u002F","The AI Context Layer for Teams","2026-11-09 23:36:37",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add indigoai-us\u002Fhq-core --skill garden",{"tool":52,"command":53},"bunx","bunx skills add indigoai-us\u002Fhq-core --skill garden",{"tool":55,"command":56},"pnpm","pnpm dlx skills add indigoai-us\u002Fhq-core --skill garden","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgarden\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"agents\u002Fopenai.yaml","REFERENCE","参考文档",108,"https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgarden\u002Fagents\u002Fopenai.yaml",[67,84,114,137,148,158],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":31},"01M71E4MQ04WPK1EVDS7VKJ3E8","social-graphic","Generate 1080x1080 HTML social graphics for HQ update posts.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002Fcore\u002Fworkers\u002Fpublic\u002Fsocial-strategist\u002Fskills\u002Fsocial-graphic\u002FSKILL.md",[],[74,75,21,76,25,24,23,77,78,79,80,81,82,30,83],"social","social graphic","html","update","generate","graphics","browser","open","agent-browser","posts",{"skillNo":85,"name":82,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":97,"publishedAt":31},"01M71E4H33K4P5H5M7ENPTMFSC","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002Fcore\u002Fworkers\u002Fpublic\u002Fqa-tester\u002Fskills\u002Fagent-browser\u002FSKILL.md",[89,94],{"categoryNo":90,"categoryName":91,"taxonomyType":92,"taxonomyTypeDesc":93},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":95,"categoryName":96,"taxonomyType":92,"taxonomyTypeDesc":93},"01JBSEEDCAT000000000000023","Skill与智能体开发",[98,80,99,100,101,102,21,103,104,105,106,107,81,108,82,109,110,111,112,113],"agent browser","click","ai agents","app","scrape","when","apps","actions","extracting","take a screenshot","testing","programmatic","browser automation","website","cli","interaction",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":31},"01M71E4FDBD7J8Y45JJ9KMMYGN","work-mesh","Work Mesh Live — automatic presence via hq mesh daemon; context reconcile\u002Forganize; manual session task-status, blocked, and note only.","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fwork-mesh\u002FSKILL.md",[],[121,122,123,21,124,125,126,127,128,129,130,131,132,27,23,133,134,135,136],"work mesh","work","mesh","status","context","note","live","presence","automatic","reconcile","only","organize","session","manual","daemon","via",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":31},"01M71E4EGHNAAGWAPV6KGBMQ9W","review","Parity worker review skill (materialization fixture).","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002Fcore\u002Fscripts\u002Ftests\u002Ffixtures\u002Fagent-session\u002Fworker-materialization\u002Fparity-worker\u002Fskills\u002Freview\u002FSKILL.md",[],[139,144,145,146,147],"review skill","fixture","parity","worker",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":31},"01M71E4D1FZDJPDC15DRERKX8Y","run","Run or list HQ workers (parity fixture).","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002Fcore\u002Fscripts\u002Ftests\u002Ffixtures\u002Fagent-session\u002Fskills\u002Frun\u002FSKILL.md",[],[150,155,156,146,157,145],"parity fixture","workers","list",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":31},"01M71E4BF4MV5SEWZJZ4T1QPQW","handoff","Preserve session state for a follow-up agent (parity fixture).","https:\u002F\u002Fgithub.com\u002Findigoai-us\u002Fhq-core\u002Fblob\u002Fmain\u002Fcore\u002Fscripts\u002Ftests\u002Ffixtures\u002Fagent-session\u002Fskills\u002Fhandoff\u002FSKILL.md",[],[160,155,165,166,133,167,30,146,168,169,145],"up","preserve","session state","follow-up","state"]