5 views
mvschwarz/openrig
Build your own network of agents from Claude Code, Codex and Pi: persistent teams with roles, shared context and owned work.
TypeScript★ 4,432+683 that day#7 on trending
D45.2/100
Duplication46
9.6% in typescript, tsx, javascript, bash, python, perlDead code45
8.7%Complexity45
58% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
4.4%duplicated code · 11,593 of 263,360 lines
762clones in code
1,104code files of 3,206 scanned
10.23%duplicated over all files · 5,357 clones
Most complex files
- packages/tui/src/render.ts823 cx
- packages/daemon/test/restore-orchestrator.test.ts770 cx
- packages/daemon/src/domain/queue-repository.ts672 cx
- packages/daemon/src/domain/rigspec-instantiator.ts507 cx
- packages/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/migrate-telemetry-state-0.5.9.mjs476 cx
- skills/_canonical/core/openrig-upgrade/scripts/migrate-telemetry-state-0.5.9.mjs476 cx
- packages/daemon/src/domain/rigspec-schema.ts462 cx
- packages/daemon/src/startup.ts461 cx
- packages/daemon/src/domain/restore-orchestrator.ts450 cx
- packages/cli/src/commands/ps.ts432 cx
Dead code 8.7% unused · 433 findings
- packages/ui/src/components/project/ScopePages.tsxunused-file
- packages/ui/src/components/LiveNodeDetails.tsxunused-file
- packages/ui/src/components/LibraryReview.tsxunused-file
- packages/ui/src/components/AppShell.tsxunused-file
- packages/ui/src/components/feed/cards/storytelling-cards.tsxunused-file
- packages/ui/src/components/lab/VellumBackgroundLab.tsxunused-file
- packages/ui/src/components/for-you/FeedCard.tsxunused-file
- packages/ui/src/routes.tsxunused-file
- packages/ui/src/components/RigGraph.tsxunused-file
- packages/ui/src/components/files/FilesWorkspace.tsxunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: packages/daemon/src/domain/scope/attestation-lineage.generated.ts.
Largest clones in the code
- 533 lines in 2 placestypescript3,133 tokenspackages/cli/src/lib/scope/scope-audit.ts:1–533packages/daemon/src/domain/scope/scope-audit.ts:1–533
1import * as YAML from "yaml"; 2import { isMissionDotId, isSliceDotId } from "./dot-id.js"; 3import { isScaffoldPlaceholderText, hasAuthoredNumberedItem, isPristineScaffoldSection } from "./scaffold-placeholder.js"; 4 5export type RailStatus = "present" | "missing" | "malformed" | "readme-only"; 6export type FindingSeverity = "high" | "medium" | "low" | "info"; 7export type FindingKind = 8 | "missing_progress" 9 | "registration_ghost" 10 | "missing_id"First 10 of 533 lines.
- 230 lines in 2 placestypescript1,280 tokenspackages/cli/src/host-registry.ts:62–291packages/daemon/src/domain/hosts/hosts-registry-reader.ts:21–229
62export interface SshHostEntry { 63 id: string; 64 /** 65 * The observed, immutable self-id of the host this entry points at — the JOIN KEY. 66 * 67 * `id` is MY label for that machine; `hostId` is what that machine calls itself and stamps into 68 * every envelope it sends. Optional because every entry that exists today predates the field: 69 * absent means "never learned", which resolves exactly as it does now. Nothing populates this 70 * automatically in this slice. 71 */First 10 of 230 lines.
- 11 lines in 12 placestypescript84 tokenspackages/cli/src/commands/attach.ts:43–53packages/cli/src/commands/bind.ts:8–18packages/cli/src/commands/bootstrap.ts:27–37packages/cli/src/commands/discover.ts:8–18packages/cli/src/commands/launch.ts:49–59and 7 more
43const cmd = new Command("attach").description("Attach the current shell or agent into a rig node"); 44const getDeps = () => depsOverride ?? { lifecycleDeps: realDeps(), clientFactory: (url: string) => new DaemonClient(url) }; 45 46async function getClient(deps: StatusDeps): Promise<DaemonClient | null> { 47 const status = await getDaemonStatus(deps.lifecycleDeps); 48 if (!daemonStatusGuard(status)) return null; 49 return deps.clientFactory(getDaemonUrl(status)); 50} 51 52cmdFirst 10 of 11 lines.
7 more
- 111 lines in 2 placestypescript813 tokens
- 156 lines in 2 placestypescript813 tokens
- 215 lines in 2 placestypescript793 tokens
- 62 lines in 3 placestypescript353 tokens
- 75 lines in 2 placestypescript507 tokens
- 77 lines in 2 placestypescript505 tokens
- 10 lines in 10 placestypescript54 tokens
Largest clones over all files, tests and data included
- 1417 lines in 2 placesjavascripttests11,825 tokenspackages/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/migrate-telemetry-state-0.5.9.mjs:3–1419skills/_canonical/core/openrig-upgrade/scripts/migrate-telemetry-state-0.5.9.mjs:3–1419
3import crypto from "node:crypto"; 4import fs from "node:fs"; 5import path from "node:path"; 6import { spawnSync } from "node:child_process"; 7 8const SCHEMA = "openrig-telemetry-state-migration/v1"; 9const rig = process.env.OPENRIG_RIG_BIN || "rig"; 10const HELP = `Usage: migrate-telemetry-state-0.5.9.mjs [options] 11 12No phase flag runs the read-only plan.First 10 of 1417 lines.
- 463 lines in 2 placesmarkdowntests5,706 tokenspackages/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md:17–479skills/_canonical/process/context-engineering/SKILL.md:17–479
17# Traditional Context Engineering — 2024–2025 Snapshot 18 19## Status: provisional historical research snapshot 20 21This skill is a provisional historical research snapshot of context-engineering practice as 22published in 2024–2025. It is NOT normative. Do not apply it prescriptively to current frontier 23models without re-verification. On any conflict, OpenRig current skills, explicit user rulings, 24and directly measured OpenRig practice PREVAIL over this document. Treat these areas as 25particularly suspect pending re-verification: compaction/summarization guidance, minimal-upfront 26versus broad orientation, just-in-time lookup assumptions, fixed context ceilings, andFirst 10 of 463 lines.
- 543 lines in 2 placesmarkdowntests5,694 tokenspackages/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md:1–543skills/_canonical/core/openrig-software-factory/references/worked-example.md:1–543
1# Worked example: reviewed CSV validation 2 3Use this example to adapt reviewed work to a repository with CSV handling. Choose the simple team or queue loop first; the full Workflow files are optional. Ch… 4 5This is a concrete CSV-validation example for adaptation, not a requirement that an arbitrary repository become a CSV project or every outcome be split into tw… 6 7For the example only, repository root and work root are the same absolute directory, called `PROJECT_ROOT`. The selected project ID is `csv-tool`, mission is `… 8 9## Manual work and the queue loop 10First 10 of 543 lines.
- 123 lines in 3 placesmarkdowndocs and examples1,963 tokens
- 345 lines in 2 placesmarkdowntests3,762 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 856 | 214,891 | 708 | 10,947 | 5.09% |
| tsx | 178 | 36,651 | 39 | 445 | 1.21% |
| javascript | 47 | 8,739 | 14 | 195 | 2.23% |
| python | 2 | 888 | 1 | 6 | 0.68% |
| bash | 20 | 2,017 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 2,099 | 516,575 | 4,706 | 51,211 | 9.91% |
| tsx | 343 | 70,373 | 413 | 4,631 | 6.58% |
| markdown | 335 | 47,895 | 88 | 7,948 | 16.59% |
| yaml | 199 | 6,478 | 67 | 1,314 | 20.28% |
| javascript | 90 | 16,654 | 57 | 2,283 | 13.71% |
| bash | 69 | 3,716 | 10 | 417 | 11.22% |
| text | 31 | 488 | 7 | 120 | 24.59% |
| dot | 6 | 112 | 3 | 56 | 50% |
| json | 21 | 1,651 | 2 | 67 | 4.06% |
| txt | 4 | 421 | 2 | 202 | 47.98% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 3, 2026 | #7 | 4,432 (+683) | 3,206 | 667,104 | 5,357 | 10.23% | 4.4% | D 45.2 | 0d794d0 |
| Oct 2, 2026 | #3 | 3,833 (+642) | 3,144 | 657,666 | 5,300 | 10.31% | 4.41% | D 44.9 | 008c9fa |
| Oct 1, 2026 | #3 | 3,148 (+624) | 3,075 | 643,327 | 5,228 | 10.42% | 4.47% | D 44.6 | 76ef4d9 |
| Sep 30, 2026 | #5 | 2,554 (+737) | 3,051 | 638,317 | 5,191 | 10.45% | 4.47% | D 44.5 | f8f3aff |
| Sep 29, 2026 | #6 | 1,872 (+734) | 3,045 | 636,375 | 5,174 | 10.45% | 4.47% | D 44.5 | 50e519b |
| Sep 28, 2026 | #5 | 1,139 (+114) | 3,012 | 628,190 | 5,220 | 10.67% | 4.54% | D 44.1 | ae957e5 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.