From 818568c609ece4e0108d1dcd8579d2af5b248911 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 7 Jul 2026 16:39:54 +0200 Subject: [PATCH] iUpdate --- .claude/commands/maintenance.md | 10 +- .claude/workflows/fleet.js | 9 +- .claude/workflows/full-docs-refactor.js | 285 ++++++++++++++++++++++++ .claude/workflows/review.js | 7 +- CLAUDE.md | 2 + 5 files changed, 303 insertions(+), 10 deletions(-) create mode 100644 .claude/workflows/full-docs-refactor.js diff --git a/.claude/commands/maintenance.md b/.claude/commands/maintenance.md index 8c2ec254..8a372306 100644 --- a/.claude/commands/maintenance.md +++ b/.claude/commands/maintenance.md @@ -1,9 +1,9 @@ --- -description: Run the DevPlace maintenance agent fleet (10 quality dimensions) in check or fix mode, optionally scoped to changed files or a subset. +description: Run the DevPlace maintenance agent fleet (12 quality dimensions) in check or fix mode, optionally scoped to changed files or a subset. argument-hint: "[check|fix] [changed] [comma,list,of,dimensions]" --- -You are orchestrating the DevPlace maintenance fleet. Each dimension is a project subagent under `.claude/agents/`. The fleet enforces ten independent quality dimensions across the `devplacepy/` package and `tests/`. +You are orchestrating the DevPlace maintenance fleet. Each dimension is a project subagent under `.claude/agents/`. The fleet enforces twelve independent quality dimensions across the `devplacepy/` package and `tests/`. ## Dimension to subagent map | Dimension | Subagent | Enforces | @@ -18,15 +18,17 @@ You are orchestrating the DevPlace maintenance fleet. Each dimension is a projec | fanout | `fanout-maintainer` | cross-layer feature completeness | | docs | `docs-maintainer` | docs coverage and role-aware show/hide | | test | `test-maintainer` | integration-test coverage | +| background | `background-maintainer` | background-queue deferral, response-critical/inline boundaries | +| locust | `locust-maintainer` | locustfile.py route coverage and load-test safety | -The canonical run order is: **style, dry, security, audit, devii, seo, frontend, fanout, docs, test**. +The canonical run order is: **style, dry, security, audit, devii, seo, frontend, fanout, docs, test, background, locust**. ## Parse the arguments Arguments: `$ARGUMENTS` - **Mode**: `fix` anywhere in the arguments means FIX mode; otherwise default to CHECK mode (read-only report). - **changed**: the word `changed` means scope the run to only the files git reports as modified or new under `devplacepy/` and `tests/`. Compute that set first with `git status --porcelain` and keep existing paths whose first segment is `devplacepy/` or `tests/`. If the set is empty, report "nothing to do" and stop. Pass the explicit file list into each subagent's prompt so it reports/fixes only within that set (it may still read other files for cross-reference). -- **Subset**: any comma-separated dimension names (e.g. `security,docs`) restrict the run to those dimensions in canonical order. With no subset, run all ten. +- **Subset**: any comma-separated dimension names (e.g. `security,docs`) restrict the run to those dimensions in canonical order. With no subset, run all twelve. ## Execute 1. Resolve the dimension list and mode from the arguments above. diff --git a/.claude/workflows/fleet.js b/.claude/workflows/fleet.js index b12c9451..e71e597f 100644 --- a/.claude/workflows/fleet.js +++ b/.claude/workflows/fleet.js @@ -1,9 +1,9 @@ // retoor export const meta = { name: 'fleet', - description: 'DevPlace maintenance fleet: 10 dimension subagents scan in parallel, then every finding is adversarially verified against source before it is reported', + description: 'DevPlace maintenance fleet: 12 dimension subagents scan in parallel, then every finding is adversarially verified against source before it is reported', phases: [ - { title: 'Review', detail: '10 dimension subagents scan devplacepy/ and tests/ in parallel' }, + { title: 'Review', detail: '12 dimension subagents scan devplacepy/ and tests/ in parallel' }, { title: 'Verify', detail: 'adversarially refute each candidate finding against the actual source' }, ], } @@ -19,6 +19,8 @@ const DIMENSIONS = [ { key: 'fanout', agent: 'fanout-maintainer' }, { key: 'docs', agent: 'docs-maintainer' }, { key: 'test', agent: 'test-maintainer' }, + { key: 'background', agent: 'background-maintainer' }, + { key: 'locust', agent: 'locust-maintainer' }, ] const FINDINGS_SCHEMA = { @@ -86,7 +88,7 @@ function reportPrompt(dimension) { function verifyPrompt(dimension, finding) { return ( - `Adversarially verify a candidate "${dimension}" finding. Your goal is to REFUTE it. Open the exact file and read ` + + `You are an independent skeptic, not the agent that raised this finding. A "${dimension}"-dimension maintenance agent flagged the candidate below; your job is solely to REFUTE it from a fresh, unbiased read of the source. Open the exact file and read ` + `enough surrounding context (the whole function, the caller, the contract) to judge intent. It is REAL only if it ` + `survives refutation as a genuine violation of the ${dimension} dimension. Rule it out (isReal=false) if it is a ` + `contract identifier, DATA rather than authored prose, generated or vendored or third-party, or already correct ` + @@ -116,7 +118,6 @@ const reviewed = await pipeline( parallel( ((review && review.findings) || []).map((finding) => () => agent(verifyPrompt(dimension.key, finding), { - agentType: dimension.agent, label: `verify:${dimension.key}`, phase: 'Verify', schema: VERDICT_SCHEMA, diff --git a/.claude/workflows/full-docs-refactor.js b/.claude/workflows/full-docs-refactor.js new file mode 100644 index 00000000..a127e068 --- /dev/null +++ b/.claude/workflows/full-docs-refactor.js @@ -0,0 +1,285 @@ +// retoor +export const meta = { + name: 'full-docs-refactor', + description: + 'Documentation reality audit: verify every falsifiable claim in README.md, the root CLAUDE.md, every nested CLAUDE.md, and the entire /docs site (prose + docs_api) against the actual source, fix drift in place, and confirm role-gating. Every agent owns a disjoint set of files so there are never write conflicts.', + phases: [ + { title: 'Ground truth', detail: 'extract authoritative facts (routes, CLI, env, deps, test count, package layout, docs registry) from source' }, + { title: 'Root docs', detail: 'audit README.md plus every CLAUDE.md (root and nested per-subsystem) in parallel - one file per agent' }, + { title: 'Docs site', detail: 'audit the docs_api package and every /docs prose section in parallel - disjoint template ownership' }, + { title: 'Gating + validate', detail: 'verify role-gating and run the full validation sweep (import, template compile, em-dash, broken links)' }, + ], +} + +const REPORT_SCHEMA = { + type: 'object', + additionalProperties: false, + required: ['target', 'changed', 'changes', 'verifiedAccurate'], + properties: { + target: { type: 'string' }, + changed: { type: 'boolean' }, + changes: { + type: 'array', + items: { + type: 'object', + additionalProperties: false, + required: ['location', 'wrong', 'fixed'], + properties: { + location: { type: 'string' }, + wrong: { type: 'string' }, + fixed: { type: 'string' }, + source: { type: 'string' }, + }, + }, + }, + verifiedAccurate: { type: 'array', items: { type: 'string' } }, + gatingIssues: { type: 'array', items: { type: 'string' } }, + unverifiable: { type: 'array', items: { type: 'string' } }, + }, +} + +const VALIDATE_SCHEMA = { + type: 'object', + additionalProperties: false, + required: ['appImports', 'docsApiValid', 'templatesCompile', 'emDashClean', 'brokenLinks', 'gatingClean'], + properties: { + appImports: { type: 'boolean' }, + docsApiValid: { type: 'boolean' }, + templatesCompile: { type: 'boolean' }, + emDashClean: { type: 'boolean' }, + brokenLinks: { type: 'array', items: { type: 'string' } }, + gatingClean: { type: 'boolean' }, + gatingFixes: { type: 'array', items: { type: 'string' } }, + notes: { type: 'string' }, + }, +} + +const SHARED_RULES = + 'RULES (all mandatory):\n' + + '- The CODE is the source of truth. When docs disagree with code, fix the DOCS, never the code. Do not invent or aspirationally document features. If docs describe something removed/renamed, correct or remove it.\n' + + '- Use Read/Grep/Glob/Bash to CONFIRM every claim before you edit it. Never edit on assumption.\n' + + '- NEVER introduce an em-dash character or its HTML entity; use a hyphen. Replace any em-dash in a passage you rewrite.\n' + + '- Be surgical: change only what is verifiably wrong or verifiably missing from a list/table meant to be complete. Preserve tone, structure, and formatting.\n' + + '- Do not corrupt markdown tables, HTML, or Jinja.\n' + + 'DOCS PROSE STRUCTURE (for /docs/*.html templates): the body is
rendered to HTML SERVER-SIDE from markdown; example markup shown as code INSIDE that block stays HTML-entity-escaped (<...>). Real live-demo markup and its