opencode-swarm 6.29.1 → 6.29.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.
package/README.md CHANGED
@@ -49,10 +49,13 @@ All project state lives in `.swarm/`:
49
49
 
50
50
  ```text
51
51
  .swarm/
52
- ├── plan.md
53
- ├── context.md
54
- ├── evidence/
55
- └── history/
52
+ ├── plan.md # Project roadmap with phases and tasks
53
+ ├── plan.json # Structured plan data
54
+ ├── context.md # Technical decisions and SME guidance
55
+ ├── events.jsonl # Event stream for diagnostics
56
+ ├── evidence/ # Review/test evidence bundles per task
57
+ ├── curator-summary.json # Curator system state (if enabled)
58
+ └── drift-report-phase-N.json # Plan-vs-reality drift reports
56
59
  ```
57
60
 
58
61
  That means Swarm is resumable by design. If you come back later and `.swarm/` already exists, the architect may go straight into **RESUME** or **EXECUTE** instead of replaying the full first-run discovery flow.
@@ -341,11 +344,13 @@ The architect moves through these modes automatically:
341
344
  | `CLARIFY` | Swarm asks for missing information it cannot infer |
342
345
  | `DISCOVER` | Explorer scans the codebase |
343
346
  | `CONSULT` | SME agents provide domain guidance |
344
- | `PLAN` | Architect writes or updates the phased plan |
347
+ | `PLAN` | Architect writes or updates the phased plan (includes CODEBASE REALITY CHECK on brownfield projects) |
345
348
  | `CRITIC-GATE` | Critic reviews the plan before execution |
346
349
  | `EXECUTE` | Tasks are implemented one at a time through the QA pipeline |
347
350
  | `PHASE-WRAP` | A phase closes out, docs are updated, and a retrospective is written |
348
351
 
352
+ > **CODEBASE REALITY CHECK (v6.29.2):** Before any planning, the Architect dispatches Explorer to verify the current state of every referenced item. Produces a CODEBASE REALITY REPORT with statuses: NOT STARTED, PARTIALLY DONE, ALREADY COMPLETE, or ASSUMPTION INCORRECT. This prevents planning against stale assumptions. Skipped for greenfield projects with no existing codebase references.
353
+
349
354
  ### Important
350
355
 
351
356
  A second or later run does **not** necessarily look like a first run.
@@ -607,6 +612,7 @@ To disable entirely, set `context_budget.enabled: false` in your swarm config.
607
612
  | sast_scan | Offline security analysis, 63+ rules, 9 languages |
608
613
  | sbom_generate | CycloneDX dependency tracking, 8 ecosystems |
609
614
  | build_check | Runs your project's native build/typecheck |
615
+ | incremental_verify | Post-coder typecheck for TS/JS, Go, Rust, C# (v6.29.2) |
610
616
  | quality_budget | Enforces complexity, duplication, and test ratio limits |
611
617
  | pre_check_batch | Runs lint, secretscan, SAST, and quality budget in parallel (~15s vs ~60s sequential) |
612
618
  | phase_complete | Enforces phase completion, verifies required agents, requires a valid retrospective evidence bundle, logs events, and resets state |
@@ -933,6 +939,33 @@ The following tools can be assigned to agents via overrides:
933
939
 
934
940
  ## Recent Changes
935
941
 
942
+ ### v6.29.3 — Curator Visibility + Documentation Refresh
943
+
944
+ This release adds Curator status reporting to `/swarm diagnose` and refreshes documentation to reflect current behavior.
945
+
946
+ - **Curator status in diagnose**: `/swarm diagnose` now reports whether Curator is enabled/disabled and validates the `curator-summary.json` artifact if present.
947
+ - **README and config docs refreshed**: Updated `.swarm/` directory tree, Curator configuration options, and drift report artifacts to match current implementation.
948
+
949
+ ### v6.29.2 — Multi-Language Incremental Verify + Slop-Detector Hardening
950
+
951
+ This release adds multi-language typecheck support and hardens detection of low-quality AI-generated code.
952
+
953
+ - **Multi-language incremental_verify**: Post-coder typecheck now supports TypeScript/JavaScript, Go, Rust, and C#. Runs language-appropriate build/typecheck commands per task for faster feedback.
954
+ - **Slop-detector hardening**: Enhanced detection of AI-generated placeholder code with multi-language heuristics (comments like `// TODO`, `// FIXME`, `// HACK`, language-specific patterns for Go/Rust/C#/Python). Advisory warnings injected into coder context when slop patterns detected.
955
+ - **CODEBASE REALITY CHECK**: Architect dispatches Explorer before planning to verify current state of referenced items. Produces a CODEBASE REALITY REPORT with statuses: NOT STARTED, PARTIALLY DONE, ALREADY COMPLETE, or ASSUMPTION INCORRECT. Skipped for greenfield projects.
956
+ - **Evidence schema fix**: Evidence bundles now correctly validate against schema; invalid entries are filtered.
957
+ - **Curator/docs alignment**: Curator health check in `/swarm diagnose` reports curator.enabled status and validates curator-summary.json.
958
+
959
+ ### v6.29.1 — Advisory Hook Message Injection
960
+
961
+ This release improves how advisory warnings are injected into agent context.
962
+
963
+ - **Advisory hook message injection**: Enhanced message formatting for self-coding detection, partial gate tracking, batch detection, and scope violation warnings. Messages now include structured context for faster resolution.
964
+
965
+ ### v6.23 through v6.28 — Stability and Incremental Improvements
966
+
967
+ Subsequent releases focused on stability hardening, incremental_verify scaffolding, and tooling improvements across the pipeline. Key areas: pre_check_batch parallelization, evidence bundle validation, and diagnostics tooling.
968
+
936
969
  ### v6.22 — Curator Background Analysis + Session State Persistence
937
970
 
938
971
  This release adds the optional Curator system for phase-level intelligence and fixes session snapshot persistence for task workflow states.
@@ -1115,6 +1148,8 @@ OpenCode Swarm v6.16+ ships with language profiles for 11 languages across three
1115
1148
 
1116
1149
  The Curator is an optional background analysis system that runs after each phase. It is **disabled by default** (`curator.enabled = false`) and never blocks execution — all Curator operations are wrapped in try/catch.
1117
1150
 
1151
+ To enable, set `"curator": { "enabled": true }` in your config. When enabled, it writes `.swarm/curator-summary.json` and `.swarm/drift-report-phase-N.json` files.
1152
+
1118
1153
  ### What the Curator Does
1119
1154
 
1120
1155
  - **Init** (`phase-monitor.ts`): On the first phase, initializes a curator summary file at `.swarm/curator-summary.json`.
package/dist/cli/index.js CHANGED
@@ -14011,7 +14011,7 @@ var init_evidence_schema = __esm(() => {
14011
14011
  });
14012
14012
  RetrospectiveEvidenceSchema = BaseEvidenceSchema.extend({
14013
14013
  type: exports_external.literal("retrospective"),
14014
- phase_number: exports_external.number().int().min(0).max(99),
14014
+ phase_number: exports_external.number().int().min(1).max(99),
14015
14015
  total_tool_calls: exports_external.number().int().min(0).max(9999),
14016
14016
  coder_revisions: exports_external.number().int().min(0).max(999),
14017
14017
  reviewer_rejections: exports_external.number().int().min(0).max(999),
@@ -17219,7 +17219,7 @@ var SlopDetectorConfigSchema = exports_external.object({
17219
17219
  });
17220
17220
  var IncrementalVerifyConfigSchema = exports_external.object({
17221
17221
  enabled: exports_external.boolean().default(true),
17222
- command: exports_external.string().nullable().default(null),
17222
+ command: exports_external.union([exports_external.string(), exports_external.array(exports_external.string())]).nullable().default(null),
17223
17223
  timeoutMs: exports_external.number().int().min(1000).max(300000).default(30000),
17224
17224
  triggerAgents: exports_external.array(exports_external.string()).default(["coder"])
17225
17225
  });
@@ -434,7 +434,7 @@ export declare const SlopDetectorConfigSchema: z.ZodObject<{
434
434
  export type SlopDetectorConfig = z.infer<typeof SlopDetectorConfigSchema>;
435
435
  export declare const IncrementalVerifyConfigSchema: z.ZodObject<{
436
436
  enabled: z.ZodDefault<z.ZodBoolean>;
437
- command: z.ZodDefault<z.ZodNullable<z.ZodString>>;
437
+ command: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
438
438
  timeoutMs: z.ZodDefault<z.ZodNumber>;
439
439
  triggerAgents: z.ZodDefault<z.ZodArray<z.ZodString>>;
440
440
  }, z.core.$strip>;
@@ -725,7 +725,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
725
725
  }, z.core.$strip>>;
726
726
  incremental_verify: z.ZodOptional<z.ZodObject<{
727
727
  enabled: z.ZodDefault<z.ZodBoolean>;
728
- command: z.ZodDefault<z.ZodNullable<z.ZodString>>;
728
+ command: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
729
729
  timeoutMs: z.ZodDefault<z.ZodNumber>;
730
730
  triggerAgents: z.ZodDefault<z.ZodArray<z.ZodString>>;
731
731
  }, z.core.$strip>>;
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { IncrementalVerifyConfig } from '../config/schema';
7
7
  export type { IncrementalVerifyConfig };
8
+ export { detectTypecheckCommand };
8
9
  export interface IncrementalVerifyHook {
9
10
  toolAfter: (input: {
10
11
  tool: string;
@@ -15,4 +16,19 @@ export interface IncrementalVerifyHook {
15
16
  args?: unknown;
16
17
  }) => Promise<void>;
17
18
  }
19
+ /** For test isolation — call in beforeEach/afterEach */
20
+ export declare function resetAdvisoryDedup(): void;
21
+ /**
22
+ * Detect the typecheck/build check command for the project.
23
+ * Returns { command, language } where command is null if no default checker exists,
24
+ * or null overall if no supported language is detected.
25
+ * Checks in order: TypeScript (package.json) → Go (go.mod) → Rust (Cargo.toml)
26
+ * → Python (pyproject.toml/requirements.txt/setup.py) → C# (*.csproj/*.sln)
27
+ * First match wins; package.json only short-circuits when TypeScript markers are present.
28
+ * Otherwise the function falls through to Go/Rust/Python/C# detection.
29
+ */
30
+ declare function detectTypecheckCommand(projectDir: string): {
31
+ command: string[] | null;
32
+ language: string;
33
+ } | null;
18
34
  export declare function createIncrementalVerifyHook(config: IncrementalVerifyConfig, projectDir: string, injectMessage: (sessionId: string, message: string) => void): IncrementalVerifyHook;
@@ -0,0 +1,5 @@
1
+ export declare function spawnAsync(command: string[], cwd: string, timeoutMs: number): Promise<{
2
+ exitCode: number;
3
+ stdout: string;
4
+ stderr: string;
5
+ } | null>;
@@ -0,0 +1 @@
1
+ export {};