peaks-loop 4.0.0-beta → 4.0.0-beta.3

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.
Files changed (179) hide show
  1. package/CHANGELOG.md +105 -87
  2. package/README-en.md +17 -4
  3. package/README.md +17 -4
  4. package/dist/src/cli/commands/asset-commands.d.ts +45 -0
  5. package/dist/src/cli/commands/asset-commands.js +404 -0
  6. package/dist/src/cli/commands/bee-commands.d.ts +26 -0
  7. package/dist/src/cli/commands/bee-commands.js +169 -0
  8. package/dist/src/cli/commands/{solo-commands.d.ts → code-commands.d.ts} +24 -24
  9. package/dist/src/cli/commands/{solo-commands.js → code-commands.js} +78 -78
  10. package/dist/src/cli/commands/core/skill-command.js +1 -1
  11. package/dist/src/cli/commands/dispatch-from-dag.js +1 -1
  12. package/dist/src/cli/commands/evolution-commands.d.ts +27 -0
  13. package/dist/src/cli/commands/evolution-commands.js +393 -0
  14. package/dist/src/cli/commands/hook-handle.js +7 -7
  15. package/dist/src/cli/commands/job-commands.js +2 -2
  16. package/dist/src/cli/commands/loop-commands.d.ts +19 -13
  17. package/dist/src/cli/commands/loop-commands.js +147 -13
  18. package/dist/src/cli/commands/sediment-commands.js +9 -0
  19. package/dist/src/cli/commands/session-auto-compact-hook-command.js +2 -2
  20. package/dist/src/cli/commands/skill-loop-engineering-readiness-commands.d.ts +67 -0
  21. package/dist/src/cli/commands/skill-loop-engineering-readiness-commands.js +173 -0
  22. package/dist/src/cli/commands/sub-agent-shared.d.ts +1 -1
  23. package/dist/src/cli/commands/user-touchpoint-commands.d.ts +4 -4
  24. package/dist/src/cli/commands/user-touchpoint-commands.js +14 -14
  25. package/dist/src/cli/commands/workflow-commands.js +22 -22
  26. package/dist/src/cli/program.js +23 -6
  27. package/dist/src/services/artifacts/repair-cycle-service.js +1 -1
  28. package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +1 -1
  29. package/dist/src/services/audit/enforcers/active-skill-resolver.js +1 -1
  30. package/dist/src/services/audit/enforcers/{solo-code-ban.d.ts → code-ban.d.ts} +6 -6
  31. package/dist/src/services/audit/enforcers/{solo-code-ban.js → code-ban.js} +6 -6
  32. package/dist/src/services/audit/red-line-catalog.d.ts +2 -2
  33. package/dist/src/services/audit/red-line-catalog.js +5 -5
  34. package/dist/src/services/audit/types.d.ts +2 -2
  35. package/dist/src/services/{solo → code}/auto-compact-orchestrator.d.ts +1 -1
  36. package/dist/src/services/{solo → code}/auto-compact-orchestrator.js +3 -3
  37. package/dist/src/services/{solo → code}/dag-orchestrator.d.ts +1 -1
  38. package/dist/src/services/{solo → code}/dag-orchestrator.js +1 -1
  39. package/dist/src/services/{solo → code}/emit-handoff.d.ts +1 -1
  40. package/dist/src/services/{solo → code}/emit-handoff.js +1 -1
  41. package/dist/src/services/{solo → code}/job-shape-decision.d.ts +1 -1
  42. package/dist/src/services/{solo → code}/job-shape-decision.js +5 -5
  43. package/dist/src/services/{solo → code}/mode-gate.d.ts +9 -9
  44. package/dist/src/services/{solo → code}/mode-gate.js +5 -5
  45. package/dist/src/services/{solo → code}/post-compact-detector.d.ts +3 -3
  46. package/dist/src/services/{solo → code}/post-compact-detector.js +4 -4
  47. package/dist/src/services/{solo → code}/step-08-gate.d.ts +4 -4
  48. package/dist/src/services/{solo → code}/step-08-gate.js +4 -4
  49. package/dist/src/services/{solo → code}/user-touchpoint-classifier.d.ts +1 -1
  50. package/dist/src/services/{solo → code}/user-touchpoint-classifier.js +1 -1
  51. package/dist/src/services/context/auto-compact-dispatcher.d.ts +2 -2
  52. package/dist/src/services/context/auto-compact-dispatcher.js +2 -2
  53. package/dist/src/services/context/auto-compact-types.d.ts +1 -1
  54. package/dist/src/services/crystallization/crystallization-service.d.ts +239 -0
  55. package/dist/src/services/crystallization/crystallization-service.js +397 -0
  56. package/dist/src/services/crystallization/crystallization-store.d.ts +75 -0
  57. package/dist/src/services/crystallization/crystallization-store.js +193 -0
  58. package/dist/src/services/crystallization/crystallization-types.d.ts +313 -0
  59. package/dist/src/services/crystallization/crystallization-types.js +299 -0
  60. package/dist/src/services/crystallization/evidence-brief-builder.d.ts +237 -0
  61. package/dist/src/services/crystallization/evidence-brief-builder.js +240 -0
  62. package/dist/src/services/dispatch/slice-dag.d.ts +2 -2
  63. package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
  64. package/dist/src/services/dispatch/test-tool-detection.js +1 -1
  65. package/dist/src/services/evolution/evolution-service.d.ts +137 -0
  66. package/dist/src/services/evolution/evolution-service.js +281 -0
  67. package/dist/src/services/evolution/evolution-store.d.ts +57 -0
  68. package/dist/src/services/evolution/evolution-store.js +232 -0
  69. package/dist/src/services/evolution/evolution-types.d.ts +706 -0
  70. package/dist/src/services/evolution/evolution-types.js +286 -0
  71. package/dist/src/services/evolution/independent-evaluator-runner.d.ts +90 -0
  72. package/dist/src/services/evolution/independent-evaluator-runner.js +106 -0
  73. package/dist/src/services/evolution/regression-skeptic-runner.d.ts +64 -0
  74. package/dist/src/services/evolution/regression-skeptic-runner.js +113 -0
  75. package/dist/src/services/feedback/feedback-promotion-service.js +2 -2
  76. package/dist/src/services/job/job-progress-store.d.ts +1 -1
  77. package/dist/src/services/job/job-progress-store.js +1 -1
  78. package/dist/src/services/loop/loop-bee-relation-service.d.ts +107 -0
  79. package/dist/src/services/loop/loop-bee-relation-service.js +211 -0
  80. package/dist/src/services/loop/loop-bee-relation-store.d.ts +53 -0
  81. package/dist/src/services/loop/loop-bee-relation-store.js +130 -0
  82. package/dist/src/services/loop/loop-bee-relation-types.d.ts +118 -0
  83. package/dist/src/services/loop/loop-bee-relation-types.js +114 -0
  84. package/dist/src/services/loop/loop-release-service.d.ts +46 -0
  85. package/dist/src/services/loop/loop-release-service.js +66 -0
  86. package/dist/src/services/loop/loop-release-store.d.ts +55 -0
  87. package/dist/src/services/loop/loop-release-store.js +134 -0
  88. package/dist/src/services/loop/loop-release-types.d.ts +250 -0
  89. package/dist/src/services/loop/loop-release-types.js +162 -0
  90. package/dist/src/services/preferences/preferences-service.d.ts +1 -1
  91. package/dist/src/services/preferences/preferences-types.d.ts +1 -1
  92. package/dist/src/services/rd/standards-diagnostic.d.ts +1 -1
  93. package/dist/src/services/rd/standards-diagnostic.js +2 -2
  94. package/dist/src/services/recommendations/capability-seed-items.js +1 -1
  95. package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
  96. package/dist/src/services/recommendations/recommendation-service.js +1 -1
  97. package/dist/src/services/refactor/refactor-service.d.ts +1 -1
  98. package/dist/src/services/share/bundle-reader.d.ts +100 -0
  99. package/dist/src/services/share/bundle-reader.js +434 -0
  100. package/dist/src/services/share/bundle-types.d.ts +392 -0
  101. package/dist/src/services/share/bundle-types.js +318 -0
  102. package/dist/src/services/share/bundle-writer.d.ts +97 -0
  103. package/dist/src/services/share/bundle-writer.js +429 -0
  104. package/dist/src/services/share/run-state-contract.d.ts +133 -0
  105. package/dist/src/services/share/run-state-contract.js +138 -0
  106. package/dist/src/services/signal/cancel-handler.js +3 -3
  107. package/dist/src/services/skill/resume-detector.js +1 -1
  108. package/dist/src/services/skillhub/release-import.js +7 -2
  109. package/dist/src/services/skillhub/release-retain.js +6 -1
  110. package/dist/src/services/skillhub/sqlite-store.js +17 -1
  111. package/dist/src/services/skillhub/types.d.ts +10 -0
  112. package/dist/src/services/skills/skill-presence-service.d.ts +1 -1
  113. package/dist/src/services/standards/loop-engineering-lint.d.ts +38 -0
  114. package/dist/src/services/standards/loop-engineering-lint.js +101 -0
  115. package/dist/src/services/standards/loop-engineering-readiness-lint.d.ts +111 -0
  116. package/dist/src/services/standards/loop-engineering-readiness-lint.js +248 -0
  117. package/dist/src/services/upgrade/1x-detector-service.js +1 -1
  118. package/dist/src/services/workflow/pipeline-verify-service.d.ts +1 -1
  119. package/dist/src/services/workflow/pipeline-verify-service.js +3 -3
  120. package/dist/src/services/workflow/workflow-autonomous-service.d.ts +3 -3
  121. package/dist/src/services/workflow/workflow-autonomous-service.js +2 -2
  122. package/dist/src/services/workflow/workflow-router-service.d.ts +6 -6
  123. package/dist/src/services/workflow/workflow-router-service.js +33 -33
  124. package/dist/src/services/workspace/claude-settings-template.d.ts +1 -1
  125. package/dist/src/services/workspace/claude-settings-template.js +5 -5
  126. package/dist/src/shared/version.d.ts +1 -1
  127. package/dist/src/shared/version.js +1 -1
  128. package/examples/video-demo/README.md +57 -0
  129. package/examples/video-demo/out/en-closing-960.png +0 -0
  130. package/examples/video-demo/out/zh-closing-960.png +0 -0
  131. package/examples/video-demo/preview/peaks-loop-demo-en.mp4 +0 -0
  132. package/examples/video-demo/preview/peaks-loop-demo.mp4 +0 -0
  133. package/output-styles/peaks-skill-swarm.md +3 -3
  134. package/package.json +6 -2
  135. package/skills/bee/peaks-qa/SKILL.md +1 -1
  136. package/skills/bee/peaks-qa/references/artifact-per-request.md +3 -3
  137. package/skills/bee/peaks-qa/references/qa-sub-agent-dispatch.md +6 -6
  138. package/skills/bee/peaks-rd/references/rd-fanout-contracts.md +1 -1
  139. package/skills/bee/peaks-rd/references/rd-runbook.md +1 -1
  140. package/skills/bee/peaks-rd/references/rd-sub-agent-dispatch.md +11 -11
  141. package/skills/bee/peaks-rd/references/rd-transition-gates.md +1 -1
  142. package/skills/bee/peaks-sc/SKILL.md +1 -1
  143. package/skills/bee/peaks-txt/SKILL.md +3 -3
  144. package/skills/bee/peaks-ui/SKILL.md +8 -8
  145. package/skills/peaks-code/SKILL.md +34 -21
  146. package/skills/peaks-code/references/anchoring-and-session-info.md +2 -2
  147. package/skills/peaks-code/references/artifact-contracts.md +1 -1
  148. package/skills/peaks-code/references/boundaries.md +3 -3
  149. package/skills/peaks-code/references/codegraph-orchestration.md +1 -1
  150. package/skills/peaks-code/references/dag-orchestrator.md +7 -7
  151. package/skills/peaks-code/references/external-references.md +2 -2
  152. package/skills/peaks-code/references/fanout-mandatory.md +3 -3
  153. package/skills/peaks-code/references/fast-mode.md +2 -2
  154. package/skills/peaks-code/references/frontend-only-mode.md +9 -9
  155. package/skills/peaks-code/references/job-loop.md +1 -1
  156. package/skills/peaks-code/references/local-artifact-workspace.md +2 -2
  157. package/skills/peaks-code/references/micro-cycle.md +14 -14
  158. package/skills/peaks-code/references/mode-selection-with-stale-presence.md +5 -5
  159. package/skills/peaks-code/references/mode-selection.md +3 -3
  160. package/skills/peaks-code/references/openspec-workflow.md +16 -16
  161. package/skills/peaks-code/references/periodic-checkpoint.md +4 -4
  162. package/skills/peaks-code/references/quality-gate-cheatsheet.md +1 -1
  163. package/skills/peaks-code/references/refactor-mode.md +1 -1
  164. package/skills/peaks-code/references/runbook.md +15 -15
  165. package/skills/peaks-code/references/step-0-55-1x-detection.md +1 -1
  166. package/skills/peaks-code/references/step-0-8-gate.md +11 -11
  167. package/skills/peaks-code/references/sub-agent-dispatch.md +8 -8
  168. package/skills/peaks-code/references/swarm-dispatch-contract.md +17 -17
  169. package/skills/peaks-code/references/workflow-gates-and-types.md +2 -2
  170. package/skills/peaks-code/references/workflow.md +5 -5
  171. package/skills/peaks-content/SKILL.md +272 -0
  172. package/skills/peaks-issue-fix-orchestrator/SKILL.md +307 -0
  173. package/skills/peaks-resume/SKILL.md +2 -2
  174. package/skills/peaks-status/SKILL.md +2 -2
  175. package/skills/peaks-test/SKILL.md +2 -2
  176. /package/dist/src/services/{solo → code}/batch-heartbeat-poller.d.ts +0 -0
  177. /package/dist/src/services/{solo → code}/batch-heartbeat-poller.js +0 -0
  178. /package/dist/src/services/{solo → code}/status-line-renderer.d.ts +0 -0
  179. /package/dist/src/services/{solo → code}/status-line-renderer.js +0 -0
@@ -0,0 +1,169 @@
1
+ /**
2
+ * peaks bee * CLI — M7 (spec §7A.2 / §10 RL-9 / AC-24 / AC-25 / AC-26).
3
+ *
4
+ * Adds:
5
+ * peaks bee export --bee <id> --out <path.tar.gz>
6
+ * peaks bee import --in <path.tar.gz> [--as <bee-name>]
7
+ *
8
+ * The bee-side counterparts of the loop-side `peaks loop export /
9
+ * import`. Same hard rules:
10
+ *
11
+ * - source `shareable=false` blocks export at the CLI layer.
12
+ * - bundle lands as `candidate`; promotion to `stable` requires
13
+ * an `evolution_evaluation` row with an independent
14
+ * `evaluator_id` (see `peaks evolution evaluate`).
15
+ *
16
+ * The bee bundle captures the bee's inline manifest/segment/file/change
17
+ * rows so the receiver can re-materialize the full bee + any
18
+ * loop↔bee relations that referenced it + any evidence briefs that
19
+ * touched it.
20
+ *
21
+ * The `peaks skill sediment export / import` alias lives in
22
+ * `src/cli/commands/skill-sediment.ts` for one release cycle.
23
+ */
24
+ import { existsSync, mkdirSync } from 'node:fs';
25
+ import { join } from 'node:path';
26
+ import { addJsonOption, getErrorMessage, printResult } from '../cli-helpers.js';
27
+ import { fail, ok } from '../../shared/result.js';
28
+ import { findProjectRoot } from '../../services/config/config-safety.js';
29
+ import { openStateDb } from '../../services/skillhub/sqlite-store.js';
30
+ import { writeBundle, BundleNotShareableError, BundleAssetNotFoundError, } from '../../services/share/bundle-writer.js';
31
+ import { readBundle, BundleMajorVersionMismatchError, BundleSchemaVersionsMismatchError, BundleImportToStableForbiddenError, BundleMalformedError, } from '../../services/share/bundle-reader.js';
32
+ export function registerBeeCommands(program, io) {
33
+ // Reuse the existing `bee` parent if one is registered; the
34
+ // add-a-new-subcommand-check-for-existing-top-level-first rule.
35
+ const existing = program.commands.find((c) => c.name() === 'bee');
36
+ const bee = existing ?? program
37
+ .command('bee')
38
+ .description('M7: peaks bee export / import (spec §7A.2 / §10 RL-9)');
39
+ // ---------- peaks bee export ----------
40
+ addJsonOption(bee
41
+ .command('export')
42
+ .description("M7: export a bee_release as a peaks.bundle/1 tarball (spec §7A.2). Refuses to export when shareable=false.")
43
+ .requiredOption('--bee <id>', 'bee_release numeric id (use `peaks asset status --bee <name>` to find the id)')
44
+ .requiredOption('--out <path>', 'output .tar.gz path')
45
+ .option('--project <path>', 'target project root (defaults to cwd)')).action((options) => {
46
+ const asJson = options.json === true;
47
+ const beeId = Number(options.bee);
48
+ if (!Number.isInteger(beeId) || beeId <= 0) {
49
+ printResult(io, fail('bee.export', 'INVALID_BEE_ID', `--bee must be a positive integer (got '${options.bee}')`, { bee: options.bee }, [
50
+ 'Re-run with --bee <numeric-id>.',
51
+ ]), asJson);
52
+ process.exitCode = 1;
53
+ return;
54
+ }
55
+ try {
56
+ const projectRoot = options.project ?? findProjectRoot(process.cwd()) ?? process.cwd();
57
+ if (!existsSync(join(projectRoot, '.peaks'))) {
58
+ mkdirSync(join(projectRoot, '.peaks'), { recursive: true });
59
+ }
60
+ const db = openStateDb(join(projectRoot, '.peaks', 'state.db'));
61
+ try {
62
+ const result = writeBundle({
63
+ db,
64
+ blobsDir: join(projectRoot, '.peaks', 'blobs'),
65
+ kind: 'bee',
66
+ id: beeId,
67
+ outPath: options.out,
68
+ });
69
+ printResult(io, ok('bee.export', {
70
+ outPath: result.outPath,
71
+ kind: result.kind,
72
+ assetId: result.assetId,
73
+ importedAs: 'candidate',
74
+ }, [], [
75
+ `Receiver must run \`peaks bee import --in ${result.outPath}\` to land this bundle, then run an independent evolution_evaluation before any promote.`,
76
+ ]), asJson);
77
+ }
78
+ finally {
79
+ db.close();
80
+ }
81
+ }
82
+ catch (error) {
83
+ if (error instanceof BundleNotShareableError) {
84
+ printResult(io, fail('bee.export', error.code, error.message, { bee: options.bee }, [
85
+ 'Set shareable=true on the bee_release row, or stop sharing.',
86
+ ]), asJson);
87
+ process.exitCode = 1;
88
+ return;
89
+ }
90
+ if (error instanceof BundleAssetNotFoundError) {
91
+ printResult(io, fail('bee.export', error.code, error.message, { bee: options.bee }, [
92
+ 'Verify the bee id with `peaks asset status --bee <name>`.',
93
+ ]), asJson);
94
+ process.exitCode = 1;
95
+ return;
96
+ }
97
+ printResult(io, fail('bee.export', 'BEE_EXPORT_FAILED', getErrorMessage(error), { bee: options.bee }, ['Verify --bee id and --out path.']), asJson);
98
+ process.exitCode = 1;
99
+ }
100
+ });
101
+ // ---------- peaks bee import ----------
102
+ addJsonOption(bee
103
+ .command('import')
104
+ .description('M7: import a peaks.bundle/1 tarball. Lands as candidate only — promotion requires an evolution_evaluation row (spec §7A.2 / AC-25 / AC-26).')
105
+ .requiredOption('--in <path>', 'input .tar.gz path')
106
+ .option('--as <name>', 'optional rename for the bee name when landing')
107
+ .option('--project <path>', 'target project root (defaults to cwd)')).action((options) => {
108
+ const asJson = options.json === true;
109
+ try {
110
+ const projectRoot = options.project ?? findProjectRoot(process.cwd()) ?? process.cwd();
111
+ if (!existsSync(join(projectRoot, '.peaks'))) {
112
+ mkdirSync(join(projectRoot, '.peaks'), { recursive: true });
113
+ }
114
+ const db = openStateDb(join(projectRoot, '.peaks', 'state.db'));
115
+ try {
116
+ const result = readBundle({
117
+ db,
118
+ blobsDir: join(projectRoot, '.peaks', 'blobs'),
119
+ inPath: options.in,
120
+ ...(options.as !== undefined ? { asName: options.as } : {}),
121
+ });
122
+ printResult(io, ok('bee.import', {
123
+ assetId: result.assetId,
124
+ kind: result.kind,
125
+ importedAs: result.importedAs,
126
+ warnings: result.warnings,
127
+ evidenceBriefCount: result.evidenceBriefCount,
128
+ }, result.warnings, [
129
+ `Run an independent evaluation against this release before promoting; peaks bee promote refuses without an evolution_evaluation row.`,
130
+ ]), asJson);
131
+ }
132
+ finally {
133
+ db.close();
134
+ }
135
+ }
136
+ catch (error) {
137
+ if (error instanceof BundleMajorVersionMismatchError) {
138
+ printResult(io, fail('bee.import', error.code, error.message, { receivedMajor: error.receivedMajor }, [
139
+ 'Use the matching peaks.bundle/<major> reader; this peaks build only supports major=1.',
140
+ ]), asJson);
141
+ process.exitCode = 1;
142
+ return;
143
+ }
144
+ if (error instanceof BundleSchemaVersionsMismatchError) {
145
+ printResult(io, fail('bee.import', error.code, error.message, {}, [
146
+ 'Source bundle did not declare the canonical schema versions; refuse the bundle.',
147
+ ]), asJson);
148
+ process.exitCode = 1;
149
+ return;
150
+ }
151
+ if (error instanceof BundleImportToStableForbiddenError) {
152
+ printResult(io, fail('bee.import', error.code, error.message, {}, [
153
+ 'Bundles always land as candidate; promotion to stable requires an evolution_evaluation row (AC-26).',
154
+ ]), asJson);
155
+ process.exitCode = 1;
156
+ return;
157
+ }
158
+ if (error instanceof BundleMalformedError) {
159
+ printResult(io, fail('bee.import', error.code, error.message, { inPath: options.in }, [
160
+ 'Re-export from the source via `peaks bee export`.',
161
+ ]), asJson);
162
+ process.exitCode = 1;
163
+ return;
164
+ }
165
+ printResult(io, fail('bee.import', 'BEE_IMPORT_FAILED', getErrorMessage(error), { inPath: options.in }, ['Verify the bundle path and integrity.']), asJson);
166
+ process.exitCode = 1;
167
+ }
168
+ });
169
+ }
@@ -1,35 +1,35 @@
1
1
  /**
2
- * Slice 2 — `peaks solo [--fast] <change-id>` (peaks-code fast mode).
2
+ * Slice 2 — `peaks code [--fast] <change-id>` (peaks-code fast mode).
3
3
  *
4
4
  * The `peaks-code` SKILL orchestrates an LLM-side workflow:
5
5
  * load-memory -> standards-preflight -> rd-cycle -> qa-cycle -> emit-txt
6
6
  *
7
- * The CLI surface here is intentionally narrow: it builds a SoloPlan and
8
- * runs it via `runSoloFast`. Fast mode skips memory full-load, standards
7
+ * The CLI surface here is intentionally narrow: it builds a CodePlan and
8
+ * runs it via `runCodeFast`. Fast mode skips memory full-load, standards
9
9
  * preflight, and the QA repair loop. Round-trip KPI: ≤ 30s.
10
10
  *
11
- * No new service layer — the orchestrator is the in-file `runSoloFast`
11
+ * No new service layer — the orchestrator is the in-file `runCodeFast`
12
12
  * function. Hooks are injected so tests can mock at the boundary.
13
13
  *
14
14
  * v2.11.0 Group F (Tier 9) — D5 / D7 additions:
15
- * - `peaks solo should-pause --step <step> --mode <mode>` (D5)
16
- * - `peaks solo post-compact-detect --project <path>` (D7)
15
+ * - `peaks code should-pause --step <step> --mode <mode>` (D5)
16
+ * - `peaks code post-compact-detect --project <path>` (D7)
17
17
  */
18
18
  import type { Command } from 'commander';
19
19
  import { type ProgramIO } from '../cli-helpers.js';
20
- export type SoloStepKind = 'memory' | 'preflight' | 'rd' | 'qa' | 'emit';
21
- export interface SoloStep {
20
+ export type CodeStepKind = 'memory' | 'preflight' | 'rd' | 'qa' | 'emit';
21
+ export interface CodeStep {
22
22
  readonly id: 'load-memory' | 'standards-preflight' | 'rd-cycle' | 'qa-cycle' | 'emit-txt';
23
- readonly kind: SoloStepKind;
23
+ readonly kind: CodeStepKind;
24
24
  readonly skipped: boolean;
25
25
  /** QA-only: when true, qa hook retries on failure up to N rounds. */
26
26
  readonly repairLoop?: boolean;
27
27
  }
28
- export interface SoloPlan {
28
+ export interface CodePlan {
29
29
  readonly sessionId: string;
30
- readonly steps: readonly SoloStep[];
30
+ readonly steps: readonly CodeStep[];
31
31
  }
32
- export interface SoloHooks {
32
+ export interface CodeHooks {
33
33
  readonly memory: (ctx: {
34
34
  sessionId: string;
35
35
  }) => Promise<unknown>;
@@ -47,34 +47,34 @@ export interface SoloHooks {
47
47
  sessionId: string;
48
48
  }) => Promise<unknown>;
49
49
  }
50
- export interface SoloRunResult {
50
+ export interface CodeRunResult {
51
51
  readonly sessionId: string;
52
52
  readonly ok: boolean;
53
- readonly steps: readonly SoloStep[];
53
+ readonly steps: readonly CodeStep[];
54
54
  readonly skipped: readonly string[];
55
55
  readonly elapsedMs: number;
56
56
  }
57
57
  /**
58
- * Build a SoloPlan. `fast=true` marks memory + preflight as skipped and
58
+ * Build a CodePlan. `fast=true` marks memory + preflight as skipped and
59
59
  * disables the QA repair loop. Step order is fixed; emit-txt always last.
60
60
  */
61
- export declare function buildSoloPlan(opts: {
61
+ export declare function buildCodePlan(opts: {
62
62
  sessionId: string;
63
63
  fast: boolean;
64
- }): SoloPlan;
64
+ }): CodePlan;
65
65
  /**
66
- * Run the SoloPlan. Skipped steps do NOT invoke their hook; emit-txt is
66
+ * Run the CodePlan. Skipped steps do NOT invoke their hook; emit-txt is
67
67
  * always invoked last. Returns timing + skipped ids for KPI measurement.
68
68
  */
69
- export declare function runSoloFast(opts: {
69
+ export declare function runCodeFast(opts: {
70
70
  sessionId: string;
71
- plan: SoloPlan;
72
- hooks: SoloHooks;
73
- }): Promise<SoloRunResult>;
71
+ plan: CodePlan;
72
+ hooks: CodeHooks;
73
+ }): Promise<CodeRunResult>;
74
74
  /**
75
- * Register the `peaks solo [--fast] <change-id>` command. The actual
75
+ * Register the `peaks code [--fast] <change-id>` command. The actual
76
76
  * LLM-side orchestration is driven by the SKILL.md (LLM-side), so this
77
77
  * CLI command is a thin surface that builds the plan and emits a JSON
78
78
  * envelope for downstream tooling.
79
79
  */
80
- export declare function registerSoloCommands(program: Command, io: ProgramIO): void;
80
+ export declare function registerCodeCommands(program: Command, io: ProgramIO): void;