peaks-loop 4.1.18 → 4.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +126 -0
- package/README-en.md +6 -0
- package/README.md +5 -0
- package/contracts/test-style-contract.md +14 -5
- package/dist/cli/commands/audit-red-lines-runners.js +6 -1
- package/dist/cli/commands/best-practice-scan-collision.d.ts +42 -0
- package/dist/cli/commands/best-practice-scan-collision.js +115 -0
- package/dist/cli/commands/best-practice-scan-command.d.ts +5 -0
- package/dist/cli/commands/best-practice-scan-command.js +9 -18
- package/dist/cli/commands/best-practice-scan-helpers.d.ts +12 -6
- package/dist/cli/commands/best-practice-scan-helpers.js +37 -17
- package/dist/cli/commands/code-auto-compact-command.js +26 -18
- package/dist/cli/commands/core/skill-generated-config-notice.d.ts +5 -0
- package/dist/cli/commands/core/skill-generated-config-notice.js +42 -8
- package/dist/cli/commands/core/skill-presence-commands.js +42 -74
- package/dist/cli/commands/core/skill-presence-set-command.d.ts +11 -0
- package/dist/cli/commands/core/skill-presence-set-command.js +175 -0
- package/dist/cli/commands/core/standards-init-command.js +44 -8
- package/dist/cli/commands/core/standards-migrate-command.js +5 -4
- package/dist/cli/commands/dispatch-dag-runners.d.ts +1 -0
- package/dist/cli/commands/dispatch-dag-runners.js +11 -1
- package/dist/cli/commands/dispatch-detached-branch.js +19 -1
- package/dist/cli/commands/mut-commands-helpers.d.ts +72 -5
- package/dist/cli/commands/mut-commands-helpers.js +197 -4
- package/dist/cli/commands/mut-commands.d.ts +9 -1
- package/dist/cli/commands/mut-commands.js +82 -154
- package/dist/cli/commands/preferences-commands.js +27 -2
- package/dist/cli/commands/scan-scope-helpers.js +2 -2
- package/dist/services/24h-mode/auto-engage.d.ts +11 -3
- package/dist/services/24h-mode/auto-engage.js +14 -6
- package/dist/services/artifacts/artifact-templates.js +10 -0
- package/dist/services/artifacts/backcompat-acceptance.d.ts +8 -1
- package/dist/services/artifacts/backcompat-acceptance.js +8 -7
- package/dist/services/artifacts/rd-transition-gates.d.ts +32 -5
- package/dist/services/artifacts/rd-transition-gates.js +96 -19
- package/dist/services/artifacts/request-artifact-service.js +6 -6
- package/dist/services/audit/enforcers/lint-output-style.js +14 -2
- package/dist/services/audit/enforcers/root-scratch-artifacts.d.ts +46 -0
- package/dist/services/audit/enforcers/root-scratch-artifacts.js +97 -0
- package/dist/services/audit/static-service.js +4 -4
- package/dist/services/code/auto-compact-history.d.ts +6 -1
- package/dist/services/code/auto-compact-history.js +6 -1
- package/dist/services/code/auto-compact-modes.d.ts +60 -14
- package/dist/services/code/auto-compact-modes.js +75 -20
- package/dist/services/code/auto-compact-profile.d.ts +23 -0
- package/dist/services/code/auto-compact-profile.js +51 -0
- package/dist/services/compact-history/compact-history-service.d.ts +6 -1
- package/dist/services/compact-history/compact-history-service.js +5 -1
- package/dist/services/context/auto-compact-types.d.ts +7 -5
- package/dist/services/doctor/doctor-service/checks/l3-runtime-root-census.d.ts +37 -0
- package/dist/services/doctor/doctor-service/checks/l3-runtime-root-census.js +100 -0
- package/dist/services/doctor/doctor-service/checks/skill-reference-parity.d.ts +11 -3
- package/dist/services/doctor/doctor-service/checks/skill-reference-parity.js +48 -29
- package/dist/services/doctor/doctor-service/plugin-registry.js +2 -0
- package/dist/services/hooks/hook-payload-cwd.d.ts +11 -4
- package/dist/services/hooks/hook-payload-cwd.js +11 -4
- package/dist/services/hooks/presence-marker-detector.d.ts +3 -0
- package/dist/services/hooks/presence-marker-detector.js +21 -19
- package/dist/services/ide/adapters/claude-code-adapter.js +6 -8
- package/dist/services/ide/adapters/codex-adapter.js +23 -7
- package/dist/services/ide/adapters/cursor-adapter.js +23 -7
- package/dist/services/mode/mode-status-service.d.ts +26 -27
- package/dist/services/mode/mode-status-service.js +36 -60
- package/dist/services/preferences/preferences-types.d.ts +30 -0
- package/dist/services/preferences/preferences-types.js +13 -0
- package/dist/services/scan/acceptance-coverage-service.d.ts +14 -11
- package/dist/services/scan/acceptance-coverage-service.js +157 -52
- package/dist/services/scan/rid-change-claims.d.ts +15 -0
- package/dist/services/scan/rid-change-claims.js +116 -0
- package/dist/services/skills/presence-caller-id.d.ts +51 -0
- package/dist/services/skills/presence-caller-id.js +43 -0
- package/dist/services/skills/presence-gate.d.ts +65 -0
- package/dist/services/skills/presence-gate.js +113 -0
- package/dist/services/skills/presence-lease-resolver.d.ts +63 -0
- package/dist/services/skills/presence-lease-resolver.js +114 -0
- package/dist/services/skills/presence-lease-selection.d.ts +91 -0
- package/dist/services/skills/presence-lease-selection.js +135 -0
- package/dist/services/skills/presence-lease-service.d.ts +3 -11
- package/dist/services/skills/presence-lease-service.js +34 -87
- package/dist/services/skills/presence-lease-store.d.ts +33 -0
- package/dist/services/skills/presence-lease-store.js +94 -0
- package/dist/services/skills/presence-lease-types.d.ts +31 -0
- package/dist/services/skills/presence-lease-types.js +27 -0
- package/dist/services/skills/presence-role.d.ts +35 -0
- package/dist/services/skills/presence-role.js +72 -0
- package/dist/services/skills/skill-presence-service.d.ts +39 -9
- package/dist/services/skills/skill-presence-service.js +143 -174
- package/dist/services/skills/skill-presence-write.d.ts +60 -0
- package/dist/services/skills/skill-presence-write.js +74 -0
- package/dist/services/skills/skill-statusline-service.js +7 -7
- package/dist/services/standards/ide-aware-standards-service.d.ts +35 -23
- package/dist/services/standards/ide-aware-standards-service.js +45 -20
- package/dist/services/standards/migrate-claude-rules-service.d.ts +6 -0
- package/dist/services/standards/migrate-claude-rules-service.js +18 -0
- package/dist/services/standards/migrate-service.d.ts +1 -1
- package/dist/services/standards/migrate-service.js +27 -7
- package/dist/services/standards/project-scripts.d.ts +25 -0
- package/dist/services/standards/project-scripts.js +116 -0
- package/dist/services/standards/project-standards-service.d.ts +23 -15
- package/dist/services/standards/project-standards-service.js +176 -243
- package/dist/services/standards/standards-constitution.d.ts +89 -0
- package/dist/services/standards/standards-constitution.js +199 -0
- package/dist/services/standards/standards-files.d.ts +37 -0
- package/dist/services/standards/standards-files.js +138 -0
- package/dist/services/standards/standards-pointer.d.ts +73 -0
- package/dist/services/standards/standards-pointer.js +98 -0
- package/dist/services/standards/standards-render-agents.d.ts +34 -0
- package/dist/services/standards/standards-render-agents.js +149 -0
- package/dist/services/standards/standards-render-common.d.ts +38 -1
- package/dist/services/standards/standards-render-common.js +44 -7
- package/dist/services/standards/standards-render.d.ts +1 -3
- package/dist/services/standards/standards-render.js +6 -87
- package/dist/services/workflow/workflow-graph-ensure.d.ts +77 -0
- package/dist/services/workflow/workflow-graph-ensure.js +97 -0
- package/dist/services/workflow/workflow-presence-lifecycle.js +21 -6
- package/dist/services/workspace/generated-artifacts-content.d.ts +46 -0
- package/dist/services/workspace/generated-artifacts-content.js +167 -0
- package/dist/services/workspace/generated-artifacts-stamp.d.ts +36 -13
- package/dist/services/workspace/generated-artifacts-stamp.js +37 -15
- package/dist/services/workspace/runtime-layout.d.ts +64 -0
- package/dist/services/workspace/runtime-layout.js +62 -0
- package/output-styles/peaks-skill-swarm.md +18 -2
- package/package.json +8 -9
- package/schemas/doctor-report.schema.json +1 -1
- package/skills/bee/peaks-perf-audit/SKILL.md +3 -1
- package/skills/bee/peaks-prd/SKILL.md +5 -3
- package/skills/bee/peaks-qa/SKILL.md +4 -2
- package/skills/bee/peaks-qa/references/qa-skill-presence.md +1 -1
- package/skills/bee/peaks-qa/references/qa-standards-preflight.md +3 -1
- package/skills/bee/peaks-qa/references/qa-sub-agent-dispatch.md +2 -2
- package/skills/bee/peaks-rd/SKILL.md +4 -2
- package/skills/bee/peaks-rd/references/artifact-and-standards-output.md +1 -1
- package/skills/bee/peaks-rd/references/rd-runbook.md +11 -2
- package/skills/bee/peaks-rd/references/rd-standards-preflight.md +3 -1
- package/skills/bee/peaks-rd/references/rd-sub-agent-dispatch.md +4 -4
- package/skills/bee/peaks-rd/references/rd-transition-gates.md +49 -5
- package/skills/bee/peaks-rd/references/skill-presence-and-title.md +1 -1
- package/skills/bee/peaks-reviewer/SKILL.md +3 -1
- package/skills/bee/peaks-sc/SKILL.md +4 -2
- package/skills/bee/peaks-security-audit/SKILL.md +3 -1
- package/skills/bee/peaks-txt/SKILL.md +5 -3
- package/skills/bee/peaks-ui/SKILL.md +6 -4
- package/skills/peaks-audit/SKILL.md +3 -1
- package/skills/peaks-code/SKILL.md +3 -1
- package/skills/peaks-code/references/a2a-artifact-mapping.md +3 -3
- package/skills/peaks-code/references/completion-handoff.md +1 -1
- package/skills/peaks-code/references/local-artifact-workspace.md +10 -11
- package/skills/peaks-code/references/micro-cycle.md +2 -2
- package/skills/peaks-code/references/mode-selection-with-stale-presence.md +3 -3
- package/skills/peaks-code/references/runbook.md +4 -4
- package/skills/peaks-code/references/skill-presence-and-title.md +4 -2
- package/skills/peaks-code/references/standards-preflight.md +7 -6
- package/skills/peaks-code/references/sub-agent-dispatch.md +1 -1
- package/skills/peaks-code/references/swarm-dispatch-contract.md +5 -5
- package/skills/peaks-code/references/workflow-gates-and-types.md +37 -11
- package/skills/peaks-content/SKILL.md +3 -1
- package/skills/peaks-doctor/SKILL.md +3 -1
- package/skills/peaks-final-review/SKILL.md +3 -1
- package/skills/peaks-ide/SKILL.md +3 -1
- package/skills/peaks-issue-fix-orchestrator/SKILL.md +5 -3
- package/skills/peaks-race-code/SKILL.md +3 -1
- package/skills/peaks-resume/SKILL.md +3 -1
- package/skills/peaks-slice-decompose/SKILL.md +3 -1
- package/skills/peaks-solo/SKILL.md +3 -1
- package/skills/peaks-sop/SKILL.md +4 -2
- package/skills/peaks-status/SKILL.md +3 -1
- package/skills/peaks-test/SKILL.md +3 -1
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
- `peaks standards init --project <path> --dry-run`
|
|
6
6
|
- `peaks standards update --project <path> --dry-run`
|
|
7
7
|
|
|
8
|
-
Use `standards init` for first-time creation and `standards update` for existing `
|
|
8
|
+
Use `standards init` for first-time creation and `standards update` for the existing **body** file (`AGENTS.md`) append/review behavior. The bundle the CLI writes has three parts: the **body** `AGENTS.md` (always written), the **pointer** `CLAUDE.md` (written only when the IDE profile needs it — a profile that reads `AGENTS.md` directly, e.g. `--ide codex`, writes no pointer), and the **rules tree** under `.peaks/standards/**` (2.0 canonical layout) or `.claude/rules/**` (legacy 1.x project that still carries a thick `.claude/rules/` tree). In `full-auto` and `24h` profiles, `--apply` runs automatically after `--dry-run` succeeds — these files live inside the target project, are required for downstream skill preflight, and producing them is part of finishing the workflow (Peaks-Loop Gate G enforces this). `assisted` and `strict` profiles pause for explicit user confirmation between dry-run and apply.
|
|
9
9
|
|
|
10
|
-
**CRITICAL — Standards must reflect the project scan.** When generating or updating
|
|
10
|
+
**CRITICAL — Standards must reflect the project scan.** When generating or updating the standards bundle, the content must reference concrete findings from `.peaks/project-scan/project-scan.md`: the detected component library (e.g. "This project uses antd 5.x"), CSS solution (e.g. "Uses Less via Umi"), build tool, state management, and routing. Those findings belong in the rules-tree files under the project's rules root (`.peaks/standards/**` for the 2.0 layout, `.claude/rules/**` for a legacy 1.x project); the body file `AGENTS.md` carries the command list and points at those files, and `CLAUDE.md` is only the `@AGENTS.md` pointer. Never emit a generic template that says "read <rules-root>/..." without naming the actual project stack. If the project-scan has not been run yet, run it before standards init/update.
|
|
11
11
|
|
|
12
|
-
**Legacy projects additionally** — when archetype ∈ {legacy-frontend, legacy-fullstack, frontend-monorepo}, the
|
|
12
|
+
**Legacy projects additionally** — when archetype ∈ {legacy-frontend, legacy-fullstack, frontend-monorepo}, the standards content MUST extract concrete naming, directory, service-layer, and hooks conventions from `.peaks/_runtime/<sessionId>/system/existing-system.md` and record them as hard constraints for new code. It must also list the `## Legacy constraints` from `project-scan.md` (class components, moment, enzyme, etc.) and instruct that new code in the same module preserves those patterns unless PRD explicitly authorizes modernization. A standards bundle for a legacy project that contains only generic rule pointers without naming the actual conventions is a blocking violation — regenerate it.
|
|
13
13
|
|
|
14
14
|
Do not hand-write standards file mutations inside the skill.
|
|
15
15
|
|
|
16
|
-
For project-analysis requests such as "分析项目" / "分析下这个项目", Step 0 still applies: the workspace is initialized and `peaks-code` presence is set before any analysis output. These requests run the lightweight analysis branch (project scan + standards dry-run) rather than the full RD/QA pipeline, but they never skip workspace anchoring or exit the workflow. The handoff must include an explicit **Standards increment** section. Report the current
|
|
16
|
+
For project-analysis requests such as "分析项目" / "分析下这个项目", Step 0 still applies: the workspace is initialized and `peaks-code` presence is set before any analysis output. These requests run the lightweight analysis branch (project scan + standards dry-run) rather than the full RD/QA pipeline, but they never skip workspace anchoring or exit the workflow. The handoff must include an explicit **Standards increment** section. Report the current standards status from the dry-run output as incremental deltas, not just a generic preflight note:
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
18
|
+
- the body file (`AGENTS.md`): whether it is missing, existing, planned, skipped, appended, or review-only;
|
|
19
|
+
- the pointer file (`CLAUDE.md`), only when the IDE profile writes one — its absence is not a delta;
|
|
20
|
+
- which rules-tree files are planned, existing, or skipped, under whichever root the project uses (`.peaks/standards/**` for the 2.0 layout, `.claude/rules/**` for a legacy 1.x project) — the rules tree is presence-only in both commands; `appended` / `review` are body-file states;
|
|
20
21
|
- whether writes were applied or intentionally left as dry-run because authorization or scope was absent;
|
|
21
22
|
- the exact next action if standards should be applied later.
|
|
22
23
|
|
|
@@ -418,7 +418,7 @@ The role's required artefact paths (also see peaks-ui/rd/qa SKILL.md and `swarm-
|
|
|
418
418
|
**Hard prohibitions on sub-agents** (also passed in each dispatch prompt):
|
|
419
419
|
|
|
420
420
|
- Do NOT call `Skill(skill="...")` — sub-agents must not recursively activate skills, that defeats the fan-out.
|
|
421
|
-
- Do NOT call `peaks skill presence:set` — only the main Code loop owns
|
|
421
|
+
- Do NOT call `peaks skill presence:set` — only the main Code loop owns the presence lease. Sub-agents write to a per-agent marker file `.peaks/_runtime/<sessionId>/system/sub-agent-<role>.json` if they need to record state, but never the main presence lease.
|
|
422
422
|
- Do NOT open interactive user prompts. If a sub-agent needs clarification, it must return a `blocked` verdict in its return string and let Code handle the user message.
|
|
423
423
|
- Do NOT commit, push, install hooks, or apply settings.json mutations. Only Code holds those permissions.
|
|
424
424
|
- **Reinforced (2026-06-28 incident):** an RD sub-agent silently auto-committed its own diff during a fix-callerid-leak dispatch (commit `bff4dff`). The orchestrator caught the unauthorized commit on the next turn but the user had to manually re-approve. **Every dispatch prompt MUST copy the verbatim block below into its `--prompt` argument** so the sub-agent sees the rule with full weight:
|
|
@@ -37,7 +37,7 @@ Return a compact JSON envelope — do not write prose.
|
|
|
37
37
|
|
|
38
38
|
## Hard prohibitions
|
|
39
39
|
- Do NOT call Skill(skill="..."). You are the role.
|
|
40
|
-
- Do NOT call `peaks skill presence:set` — the main loop owns .
|
|
40
|
+
- Do NOT call `peaks skill presence:set` — the main loop owns the presence lease.
|
|
41
41
|
If you need to record state, write to .peaks/_runtime/<session-id>/system/sub-agent-<role>.json.
|
|
42
42
|
- Do NOT commit, push, install hooks, or apply settings.json mutations.
|
|
43
43
|
- Do NOT ask the user interactive questions. If you need clarification, return
|
|
@@ -45,7 +45,7 @@ Return a compact JSON envelope — do not write prose.
|
|
|
45
45
|
|
|
46
46
|
## Runtime arguments (provided by Code)
|
|
47
47
|
- project: <repo> (git repo root, NOT a sub-package)
|
|
48
|
-
- session-id: <sid> (from
|
|
48
|
+
- session-id: <sid> (from `peaks session info --active --json`; the on-disk binding is .peaks/_runtime/session.json)
|
|
49
49
|
- request-id: <rid> (PRD id)
|
|
50
50
|
- type: <type> (feature | bugfix | refactor | config | docs | chore)
|
|
51
51
|
- mode: <mode> (full-auto | assisted | strict | 24h)
|
|
@@ -182,9 +182,9 @@ After all sub-agent dispatch calls return and the LLM has invoked the toolCalls,
|
|
|
182
182
|
|
|
183
183
|
## 5. Presence restoration (single-shot)
|
|
184
184
|
|
|
185
|
-
Sub-agents are explicitly forbidden from calling `peaks skill presence:set`. That means
|
|
185
|
+
Sub-agents are explicitly forbidden from calling `peaks skill presence:set`. That means the presence lease does not move during the fan-out. Code sets it to `gate=swarm-fan-out` before fan-out and to `gate=swarm-converged` once after all Tasks return. The status header (the `Peaks-Loop Skill: peaks-code | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>` line) therefore reads consistently across the fan-out window. `Role` and `Context` are machine facts: copy them from `peaks skill presence --json` (`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
186
186
|
|
|
187
|
-
If a sub-agent is misbehaving and writes
|
|
187
|
+
If a sub-agent is misbehaving and writes its own presence lease anyway, the next Code presence-set (after fan-out) overwrites it — the bug self-heals on the next gate advance, but the swarm-phase display may be off. The hard prohibition is there to prevent this; Code should still treat the lease as a single-writer resource.
|
|
188
188
|
|
|
189
189
|
## 6. Why not a `peaks-swarm` skill?
|
|
190
190
|
|
|
@@ -237,7 +237,7 @@ Sub-agent presence in this list = Code launched a Task for it. Absence = the rol
|
|
|
237
237
|
| `assisted` | `AskUserQuestion` with three options: (a) Full — UI + RD(planning) + QA(test-cases); (b) Backend-only — RD(planning) + QA(test-cases); (c) Sequential — run RD first, then QA, skip UI | Use the user's choice as the plan |
|
|
238
238
|
| `strict` | Same as `assisted` (the question is informational; strict still enforces confirmation gates later) | Same as `assisted` |
|
|
239
239
|
|
|
240
|
-
In all modes, **the plan must be written to `sc/swarm-plan.json` before any Task call.** Code updates
|
|
240
|
+
In all modes, **the plan must be written to `sc/swarm-plan.json` before any Task call.** Code updates the presence lease to `gate=swarm-fan-out` at this point.
|
|
241
241
|
|
|
242
242
|
### Degradation when swarm roles fail or are absent
|
|
243
243
|
|
|
@@ -148,7 +148,7 @@ ls .peaks/_runtime/<sessionId>/qa/requests/<rid>.md
|
|
|
148
148
|
find .peaks/_runtime/<sessionId>/ -type f | sort
|
|
149
149
|
# Verify: files from gates A-D all appear in this list.
|
|
150
150
|
# Any mandatory file missing → NOT complete. Do not emit TXT.
|
|
151
|
-
# Peaks-Loop Gate G (
|
|
151
|
+
# Peaks-Loop Gate G (standards bundle — AGENTS.md body + rules tree) must ALSO pass before TXT is emitted.
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
**Peaks-Loop Gate F — Root pollution check (BLOCKING before completion):**
|
|
@@ -170,18 +170,44 @@ find . -maxdepth 1 -name "*.png" -o -name "*.jpg" -o -name "qa-*.js" -o -name "m
|
|
|
170
170
|
|
|
171
171
|
**Peaks-Loop Gate G — Project standards present (BLOCKING before workflow completion):**
|
|
172
172
|
```bash
|
|
173
|
-
# After `peaks standards init/update --apply`, verify the files actually landed
|
|
174
|
-
#
|
|
175
|
-
|
|
176
|
-
#
|
|
177
|
-
|
|
173
|
+
# After `peaks standards init/update --apply`, verify the files actually landed.
|
|
174
|
+
# The file set is decided by the CLI — never hard-code a rules path here:
|
|
175
|
+
peaks standards init --project <repo> --dry-run --json
|
|
176
|
+
# → data.plannedWrites[] = [{ relativePath, status }, ...]
|
|
177
|
+
# init reports TWO states: planned (absent → will be created) | existing (present on
|
|
178
|
+
# disk — init does not compare content, so a stale file still reads 'existing').
|
|
179
|
+
# The four-state view of the body file comes from
|
|
180
|
+
# `peaks standards update --project <repo> --dry-run --json`:
|
|
181
|
+
# planned | appended (managed block missing) | existing
|
|
182
|
+
# (managed block matches) | review (managed block differs → a human decides; that
|
|
183
|
+
# command exits 1 with code STANDARDS_UPDATE_REVIEW_REQUIRED). The four states cover
|
|
184
|
+
# AGENTS.md and, when the IDE profile writes one, CLAUDE.md; rules-tree files are
|
|
185
|
+
# planned | existing in both commands.
|
|
186
|
+
# → data.skippedFiles[] = the entries already present on disk
|
|
187
|
+
#
|
|
188
|
+
# The bundle has three parts, and only the first has a fixed name:
|
|
189
|
+
# BODY = AGENTS.md — always written, in every layout.
|
|
190
|
+
# POINTER = CLAUDE.md — written ONLY when the IDE profile needs it; a profile that reads
|
|
191
|
+
# AGENTS.md directly (e.g. `--ide codex`) writes no pointer at all, so its ABSENCE
|
|
192
|
+
# from plannedWrites is NOT a failure and must not be reported as BLOCKED.
|
|
193
|
+
# RULES = the rules tree under .peaks/standards/** (2.0 canonical layout) or
|
|
194
|
+
# .claude/rules/** (legacy 1.x project still carrying a thick .claude/rules/ tree).
|
|
195
|
+
# The relativePaths in plannedWrites tell you which one this project uses.
|
|
196
|
+
#
|
|
197
|
+
# Verify the body landed:
|
|
198
|
+
ls <repo>/AGENTS.md
|
|
178
199
|
# "No such file" → BLOCKED. Run `peaks standards init --project <repo> --apply --json`
|
|
179
200
|
# (first time) or `peaks standards update --project <repo> --apply --json` (existing).
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
#
|
|
184
|
-
#
|
|
201
|
+
#
|
|
202
|
+
# Judge the result from the JSON, not from a hard-coded path list:
|
|
203
|
+
# BLOCKED when plannedWrites is empty, or when any entry has status 'planned'
|
|
204
|
+
# (that required standards file is absent).
|
|
205
|
+
# PASS otherwise. `init` never reports 'appended' / 'review' — when the update
|
|
206
|
+
# dry-run does, report each one as a follow-up:
|
|
207
|
+
# 'appended' → `peaks standards update --project <repo> --apply` adds the managed block;
|
|
208
|
+
# 'review' → the managed block differs; a human decides (see `peaks standards update`).
|
|
209
|
+
#
|
|
210
|
+
# Any 'planned' entry → BLOCKED. Re-run standards init/update with --apply and re-verify.
|
|
185
211
|
# Skipping Peaks-Loop Gate G (e.g. because the user did not explicitly authorize writes) is
|
|
186
212
|
# only acceptable in `assisted`/`strict` modes where the user actively declined; in
|
|
187
213
|
# `full-auto`/`24h` the absence of these files is a workflow violation.
|
|
@@ -8,8 +8,10 @@ description: Non-code orchestrator for content workflows (draft / edit / publish
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -9,8 +9,10 @@ visibility: internal
|
|
|
9
9
|
## Loop hygiene (every turn — MANDATORY)
|
|
10
10
|
|
|
11
11
|
**Skill header.** While this skill is active, open every turn with
|
|
12
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
12
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
13
13
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
14
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
15
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
14
16
|
|
|
15
17
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
16
18
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -8,8 +8,10 @@ description: Final-review skill for Peaks. Use when a workflow needs to assemble
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -9,8 +9,10 @@ visibility: internal
|
|
|
9
9
|
## Loop hygiene (every turn — MANDATORY)
|
|
10
10
|
|
|
11
11
|
**Skill header.** While this skill is active, open every turn with
|
|
12
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
12
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
13
13
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
14
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
15
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
14
16
|
|
|
15
17
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
16
18
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -8,8 +8,10 @@ description: 'End-to-end orchestrator that surveys open issues in a target repo,
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -131,7 +133,7 @@ Closes #<NNNNN>
|
|
|
131
133
|
```
|
|
132
134
|
|
|
133
135
|
- **Author identity** = local gitconfig `user.name` / `user.email`. Must NOT be overridden to an AI name.
|
|
134
|
-
- **No** `Co-Authored-By: Claude / Anthropic / MiniMax` trailer —
|
|
136
|
+
- **No** `Co-Authored-By: Claude / Anthropic / MiniMax` trailer — AGENTS.md red rule (the repo's root constitution file; `CLAUDE.md` is only the `@AGENTS.md` pointer).
|
|
135
137
|
- Tests: if the touched area has a test, run it before commit; if not, add one. Capture test output in the per-issue PR body.
|
|
136
138
|
|
|
137
139
|
### 6. Relocate commits to per-issue branches
|
|
@@ -304,7 +306,7 @@ What this skill MUST NOT do:
|
|
|
304
306
|
- **Edit upstream history** (no interactive rebase, no `git filter-branch`, no commit signing on someone else's behalf).
|
|
305
307
|
- **Write to security-critical paths** (OAuth, secrets, agent loop, model router, prompt cache — see RL-2).
|
|
306
308
|
- **Change the user identity** in git (no `git config user.name "Claude"`, no `git -c user.email=...` override).
|
|
307
|
-
- **Add `Co-Authored-By: <AI>` trailers** —
|
|
309
|
+
- **Add `Co-Authored-By: <AI>` trailers** — AGENTS.md red rule (the repo's root constitution file; `CLAUDE.md` is only the `@AGENTS.md` pointer).
|
|
308
310
|
- **Hand-author JSON or SKILL.md on the user's behalf** when the user is just describing a target.
|
|
309
311
|
- **Create a `loop_release` / `bee_release` / `crystallization_event`** in peaks-loop's own SkillHub (this is a non-crystallizing orchestrator; see "Loop Engineering role").
|
|
310
312
|
|
|
@@ -8,8 +8,10 @@ description: Fast lane for code work — this window edits source directly, with
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -8,8 +8,10 @@ description: Universal resume primitive for any in-flight Peaks-Loop workflow (o
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -8,8 +8,10 @@ description: Run multi-pass slice decomposition on a PRD-ready request and emit
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -19,8 +19,10 @@ metadata:
|
|
|
19
19
|
## Loop hygiene (every turn — MANDATORY)
|
|
20
20
|
|
|
21
21
|
**Skill header.** While this skill is active, open every turn with
|
|
22
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
22
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
23
23
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
24
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
25
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
24
26
|
|
|
25
27
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
26
28
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -8,8 +8,10 @@ description: 'Authoring skill for user-defined SOPs (standard operating procedur
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -82,7 +84,7 @@ peaks skill presence:set peaks-sop --project <repo> --mode <mode> --gate startup
|
|
|
82
84
|
peaks project memories --project <repo> --json
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
Then display: `Peaks-Loop Skill: peaks-sop | Peaks-Loop Gate: startup | Next: <one short action>`. Update gates with `peaks skill presence:set peaks-sop --project <repo> --mode <mode> --gate <gate>` when they change. When the SOP is registered and the user is satisfied, run `peaks skill presence:clear --project <repo>`.
|
|
87
|
+
Then display: `Peaks-Loop Skill: peaks-sop | Peaks-Loop Role: <role> | Peaks-Loop Gate: startup | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`. `Role` and `Context` are machine facts: copy them from `peaks skill presence --json` (`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them. Update gates with `peaks skill presence:set peaks-sop --project <repo> --mode <mode> --gate <gate>` when they change. When the SOP is registered and the user is satisfied, run `peaks skill presence:clear --project <repo>`.
|
|
86
88
|
|
|
87
89
|
## Responsibilities
|
|
88
90
|
|
|
@@ -8,8 +8,10 @@ description: Universal status primitive for any in-flight Peaks-Loop workflow (o
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|
|
@@ -8,8 +8,10 @@ description: Universal test-runner primitive for any in-flight Peaks-Loop workfl
|
|
|
8
8
|
## Loop hygiene (every turn — MANDATORY)
|
|
9
9
|
|
|
10
10
|
**Skill header.** While this skill is active, open every turn with
|
|
11
|
-
`Peaks-Loop Skill: <skill> | Peaks-Loop Gate: <gate> | Next: <one short action>`.
|
|
11
|
+
`Peaks-Loop Skill: <skill> | Peaks-Loop Role: <role> | Peaks-Loop Gate: <gate> | Peaks-Loop Context: <ratio%> (<zone>) | Next: <one short action>`.
|
|
12
12
|
Every turn, not only the first — it is how the user knows which skill is driving.
|
|
13
|
+
`Role` and `Context` are machine facts: copy them from `peaks skill presence --json`
|
|
14
|
+
(`data.role`, `data.context.ratioPct`, `data.context.action`) — never invent them.
|
|
13
15
|
|
|
14
16
|
**Context is this skill's own business.** Run `peaks skill presence --json` every turn and
|
|
15
17
|
read its `context` block. When `action` is `auto-fire`, `pre-compact`, or `red-line`,
|