Skip to content

v2.0.0

Choose a tag to compare

@tuannv0069 tuannv0069 released this 10 Aug 10:57
· 11 commits to main since this release

Changed — BREAKING

  • Everything the agent owns moves out of docs/ into one root, .agent-workspace/. The on-demand guide tree deploys to .agent-workspace/guide/general/ (was docs/agent-guide/general/), its router to .agent-workspace/guide/index.md, the lesson store to .agent-workspace/lessons/, and per-task working state to .agent-workspace/tasks/<task-slug>/ (was .agent/tmp/<task-slug>/). docs/ now holds project work product only; doc-organization.md §11 states the separation in both directions — no guide under docs/, no work product under .agent-workspace/.
  • Isolated git checkouts move with the rest: worktree.md places them at .agent-workspace/worktrees/<ID>-<TAG>-<SESSION>/. Init gitignores tasks/ and worktrees/; guide/ and lessons/ are committed.
  • Bundle folders renamed to match the deployed layout: portable/agent-guide/portable/guide/, templates/agent-guide/templates/guide/. scripts/update.mjs group and template maps follow.
  • orchestration-policy.md §4 persists plan/state under .agent-workspace/tasks/. New §5 spells out the task-workspace lifecycle — one folder per task slug, gitignored, deleted when the task closes, anything worth keeping promoted out first (technique → lessons/, project fact → docs/, law → a guide §ID). The former name .agent/tmp/ carried its own disposability signal; tasks/ does not, so the lifetime is now a written rule rather than a hint in the path.
  • doc-organization.md §9 portable-pure law re-argued: .agent-workspace/ paths are admissible inside scope: portable files because init creates that root in every project it deploys to — an invariant of the genome itself, resting on no external system.
  • templates/CLAUDE.md.tpl no longer ships rules that depend on tooling the genome does not own. The skill-output rule is now stated generically: a skill's working files go to the task workspace, the finished deliverable to docs/.
  • lesson-capture.md §1 keeps its three-store boundary; the "fact about the project" destination is now the project's own work-product layer (doc-organization.md §11).

Added

  • guide/review-checklist-method.md gains §7 pick the instrument first (append-only §ID; <critical> and the recap point at it). A dedicated review skill beats this method wherever one fits, so §7 routes first — code diff/PR to the harness review command at a depth matching the stakes, security exposure to the security review, "does it actually run" to runtime verification, cleanup to the simplify command — and §1–§6 handles the layer no instrument reaches, admitted on four conditions: the artifact is not code, the scope is not a diff, the hunt is for the absence defect, or the user supplied a checklist (P3's hunt/confirmation/precision discipline is exactly what a handed-over checklist does not carry — 1.9.0 had already fixed this path once, and keying §7 on artifact shape alone would have reopened it). A named instrument absent from the running harness falls through to §1–§6, since the command set varies by harness version. The rows compose rather than exclude — a diff-scoped instrument structurally cannot see what was never written, so a code change reviewed for what is missing takes the instrument over the changed lines AND P1 over the requirement set, never one instead of the other. A skill that owns a workflow sets WHEN its review checkpoints fire; it does not set how deep, which stays with the instrument.
  • guide/orchestration-policy.md gains §6 research output persistence (append-only §ID; §1 and the recap updated to reach it). Research changes no file, so §1 sent it past the whole policy and its product lived only in the reply — the one place compaction erases mid-task and a later session cannot reach at all. §6 fires past the 3rd file read or on dispatching an agent, and requires the write to happen while working: deferring it to the end fails against exactly the compaction it exists to survive. The file carries the artifact, the reply carries the conclusion and the path, and §5 governs what happens to it when the task closes.
  • Every size budget in the bundle is now counted in lines, not tokens. An agent has no tokenizer, so a threshold in tokens is one nobody can check — the budgets that bit hardest were stated in the one unit that could only be guessed at. Converted at a measured 10 tokens/line (the bundle's own files range 6–24, median ~10): rule-writing-standards doc 2000→200 lines, section 200→20, example 100→10, and a rule is 1 line ≤ 15 words; subagent-standards 800/2500/5000→80/250/500 lines. skill-md-standards was converted the same way and then superseded within this release — see the next entry, which replaces its tiers with the platform's single 500-line figure. Checklists now say wc -l.
  • Size budgets now follow the platform's published numbers where the platform states one, and say so where it does not. CLAUDE.md < 200 lines and SKILL.md body < 500 lines are the harness's own targets, marked as such so nobody "tidies" them later; skill-md-standards also gains the frontmatter limits it never carried (name ≤ 64 chars, description ≤ 1024) and the rule that a referenced file over 100 lines opens with a table of contents, plus the one-level-deep reference rule — a reference inside a reference gets partially read, so the deeper file arrives incomplete. The rule-file and subagent budgets are labelled as this standard's own, with the reason each exists, and the rule budget is now split by load tier rather than by artifact type: a path-scoped rule loads on demand like a skill and gets the 500-line figure, while a rule without paths: loads at launch at CLAUDE.md priority, carries the same adherence penalty, and gets the 200-line figure. Adding paths: moves a file to the higher tier as a side effect, so the standard says outright that the scoping must be honest rather than a way to buy headroom. A subagent prompt is re-sent on every spawn, which is why its budget exists at all. claude-md-standards now names the right remedy for an oversized file — a path-scoped rule, not @path imports, which reorganize the text while every imported file still loads at launch.
  • CLAUDE.md drops its three-tier budget for a single threshold: under 200 lines. The tiers keyed on project file count (<10 / 10–100 / monorepo), which predicts nothing about the file's real content — CLAUDE.md holds guardrails and triggers, and how many of those a project needs tracks how many ways an agent can go wrong there, not how many files exist. The old tiers were also unreachable in practice: the shipped CLAUDE.md.tpl is ~1200 tokens with every slot still empty, so a freshly initialized project blew the "small" tier 4× before adding a single rule of its own. section > 200 tokens → extract becomes > 20 lines; complex rule (>5 lines or >200 tokens) loses the redundant token clause.
  • rules/doc-organization.md split; the construction half moves to guide/doc-system-mechanics.md. At 328 lines it was 70% of the always-loaded floor while only part of it met its own §8.2 entry criterion — a guardrail needed before the decision point. What stayed is the decision surface: §1 classification, §4 duplication exceptions, §8.2/§8.3 tiers and decision tree, §9 portability, §10 placement laws, §11 the docs/ boundary. What moved is what you consult while building: §2 reference mechanism, §3 worked examples, §5 enforcement layers, §6 the content-class flow (the same five classes §1 already tables, in branching form), §7 the guide tree's area/taxonomy/router laws, and §8.1 the network-model principles. The moved sections keep their original §ID numbers in the new file — portable §IDs are append-only, so renumbering would silently break referrers in projects beyond this repo's reach; each vacated slot keeps its heading in doc-organization.md as a terse reminder plus a pointer, so an agent scanning it still meets the topic. Result: 328 → 189 lines, and the always-loaded floor every initialized project carries drops from 469 to 330.
  • rules/doc-organization.md §7 loosened where it had been shaped by code projects. §7.1 now defines an area by its axis of work and states that a stack layer is the most familiar shape rather than the required one — an artifact type, a recurring activity, or a live subsystem are axes just as valid, and a project with no code has areas too. §7.1 also gains the escape the promotion rule was missing: when no axis emerges, general/ stays flat at any count, because a wrong axis misroutes every file placed after it and costs more than a long flat list (NEVER + ✅/❌ example added). §7.2 demotes its four folders from a mandatory vocabulary to a default set: an area whose real content does not split that way defines its own folders and records them in its hub, and an enforcement/ kept empty for symmetry is called out as a smell rather than compliance. concepts/ loses "in the stack" from its definition. The invariant is unchanged — every file lives in a folder, no top-level orphan inside a taxonomy area.
  • guide/orchestration-policy.md gains §7 delegating for fresh attention (append-only §ID). §2 forbids handing grep/read/analyze to a subagent, which is a rule about throughput — a second reader paying again for context the orchestrator already holds. §7 is the opposite case, where the value is that the reader has not been primed: an absence sweep, an output-audit under doer ≠ checker, adversarial verification. Without it, review-checklist-method.md P1 cited orchestration-policy.md as authority for spawning a fresh reader while that file's NEVER list forbade exactly that; both citations now name §7.
  • rules/doc-organization.md §10 recognizable-trigger law now admits a countable work-state signal (Nth file read, an agent dispatched, N files edited) alongside message-scan signals. Both are counted rather than judged; the ban was always on classification (non-trivial, complex), not on where the signal is read. Message signals fire at intake, work-state signals fire mid-task — and mid-task is the only shape that works for a rule which must act before the work finishes, which is what §6 above needed.
  • rules/doc-organization.md §9 gains the substrate-naming law: a scope: portable file may name a command the harness itself ships, because the genome is a plugin of that harness and those exist wherever it deploys; it may not name a bolt-on skill set that can be absent. Bolt-ons are named only on the project side, by an optional module that writes its trigger after a scan confirms the thing is installed. This is the line the AIWS removal was reaching for without stating.
  • guide/task-planning.md gains the craft layer it lacked (scope: portable, append-only §ID). It governed when to plan and how deep, but said nothing about how to cut a plan up. §6 sub-task contract — right-sizing (smallest unit carrying its own verification and worth an independent gate), the six required fields per sub-task, and the no-placeholder law; consumes/produces are copied verbatim because the executor sees only its own sub-task and invents whatever it cannot see. §7 plan self-review — coverage, placeholder, naming, order — with an explicit line that reviewing the plan is not the output-audit of the result (§3.6). §8 design exploration — read before proposing, one question per message, 2-3 approaches with trade-offs and a recommendation, confirm per section; it does not raise depth, so a small task still exits inline. §1 gains a precedence rule: an installed skill that owns the planning workflow governs §6–§8, while §2/§3/§4 apply either way, since a skill flow states neither when to skip the ceremony nor when to refuse the task.
  • superpowers optional module in the init module matrix — writes a CLAUDE.md trigger only when the superpowers skill set is detected. It was previously mandated by the core template whether or not it was installed.
  • templates/lessons/index.md.tpl registered in the scripts/update.mjs template map. It shipped in the bundle but was absent from the map, so update never reported drift on it.
  • This repo is now deployed instance #1 of its own standard. doc-organization.md §4 has always specified the master repo's live tree as instance #1, and it was not one — there was no .claude/rules/, no .agent-workspace/, no manifest. Two consequences, both silent: check and promote were documented modes with nothing to compare or copy from, and every edit to the bundle happened with none of the bundle's own rules loaded. Running init here deploys 36 files to the live tier, and check reports no drift against the bundle for the first time. The direction of edits flips as a result — a portable rule is now changed in the live copy and carried into the bundle by promote, which CLAUDE.md states as a NEVER so a later session does not resume editing portable/ and diverge unnoticed.
  • scripts/doc-lint.mjs — the enforcement layer doc-system-mechanics.md §5 prescribed and the bundle never shipped. Eight checks: scope: frontmatter, the CLAUDE.md and always-loaded budgets (read from the router's §1 rather than hardcoded), unrendered slots, trigger→file, guide↔router in both directions, the pre-v2 layout, and pointer rot — every <file>.md §X.Y reference resolved against the target's actual §ID definitions, which a survey of the corpus found are always a heading, a list item, or a table cell. Wired into .githooks/pre-commit, so a broken link fails the commit instead of waiting to fail at read time. Its scope is deliberately narrow: a first cut reported 22 findings of which none was a real defect, and a linter that reports non-defects gets ignored — path checking is therefore limited to CLAUDE.md triggers and router entries, illustrative names inside examples are skipped, and §ID pointers carry the rest since a pointer is never illustrative.
  • scripts/init-manifest.mjs — computes the step-6 manifest instead of leaving 36 sha256 values to be written by hand. A wrong hash does not fail at init; it surfaces much later as a phantom CONFLICT or as update silently overwriting a local edit.
  • SKILL.md step 4 states that a rendered target which already exists is merged, never overwritten. A project with its own CLAUDE.md carries rules nothing else records; rendering over them deletes the only copy. Init on this repo hit exactly that case — the release workflow, the version-sync guard, and the hook-enable step lived nowhere else. Step 4 also states that a category with no work products (docs/) is not rendered at all, while its .tpl sha is still recorded so update warns only on a real template change.
  • SKILL.md bundle↔live map states the precondition the check/promote modes always had and never declared: the master repo must itself be init'd, because without a live tier there is nothing to compare and nothing to promote from.

Fixed

  • The always-loaded budget required by doc-organization.md §10 was never obtainable: templates/guide/index.md.tpl carries the {{ALWAYS_LOADED_BUDGET}} slot, but the init interview never asked for it, so the slot stayed a TODO marker and the placement data the law mandates was never filled. Step 2 now asks for it and offers 600 lines as the default. The template row states the genome's own floor (330 lines across critical-thinking, doc-organization, file-reading) so the number is chosen against a real baseline instead of guessed.
  • skills/init-project/SKILL.md dependencies omitted task-planning.md from the portable guide list.
  • README "What gets deployed" listed 4 of 10 guides and 3 of 4 templates.
  • guide/review-checklist-method.md P5 opened with "Surviving findings → read bug-report-format.md now", which gated the format file behind having findings. A review that found nothing therefore never reached the rule governing that case, and would emit the bare "no bugs" its §4 forbids. P5 now runs on every review and names the zero-finding output explicitly.
  • guide/review-checklist-method.md P2 told the reviewer to log() deferred candidates — a workflow-script primitive that does not exist in a free-form review, and an undefined token in a scope: portable file. Replaced with plain instruction to name the deferred items in the output.
  • rules/critical-thinking.md named an external skill set as the planning vehicle for artifact-changing tasks; it now points at the genome's own task-planning.md, which every init deploys.

Migration

update moves no files. A project deployed by v1.x keeps docs/agent-guide/; adopting the v2 layout means relocating the tree and rewriting the path in every trigger line and router entry. A project without .claude/init-manifest.json was never deployed by this plugin and is unaffected.