Fission-AI/OpenSpec
Spec-driven development (SDD) for AI coding assistants.
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- test/core/archive.test.ts514 cx
- src/core/archive.ts389 cx
- test/core/update.test.ts304 cx
- src/core/init.ts278 cx
- test/core/init.test.ts254 cx
- src/core/specs-apply.ts243 cx
- src/core/update.ts236 cx
- src/commands/schema.ts234 cx
- test/core/command-generation/adapters.test.ts201 cx
- src/core/version-check.ts199 cx
Dead code 0.11% unused · 15 findings
- website/cloudflare/router/worker.jsunused-file
- website/app/sitemap.tsunused-file
- website/app/robots.tsunused-file
- src/core/parsers/change-parser.ts:DeltaSectionunused-symbol
- vitest.setup.ts:teardownunused-export
- src/core/artifact-graph/types.ts:ApplyPhaseunused-export
- src/core/converters/json-converter.ts:Changeunused-import
- src/core/converters/json-converter.ts:Specunused-import
- src/core/init.ts:SKILL_NAMESunused-import
- src/core/init.ts:getToolSkillStatusunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 13 generated files: src/core/templates/workflows/apply-change.ts, src/core/templates/workflows/archive-change.ts, src/core/templates/workflows/bulk-archive-change.ts, src/core/templates/workflows/continue-change.ts, src/core/templates/workflows/explore.ts, src/core/templates/workflows/feedback.ts, src/core/templates/workflows/ff-change.ts, src/core/templates/workflows/new-change.ts, src/core/templates/workflows/onboard.ts, src/core/templates/workflows/propose.ts, src/core/templates/workflows/sync-specs.ts, src/core/templates/workflows/update-change.ts, src/core/templates/workflows/verify-change.ts.
Largest clones in the code
- 17 lines in 2 placestypescript223 tokens
106 `${_}${_}${D}${_}${F}${F}${_}${D}`, 107 `${_}${_}${_}${F}${_}${_}${F}${_}`, 108 `${_}${_}${_}${_}${F}${F}${_}${_}`, 109], 110// Frame 7: Full logo 111[ 112 `${_}${_}${_}${_}${_}${_}${_}${_}`, // padding row 1 113 `${_}${_}${_}${_}${_}${_}${_}${_}`, // padding row 2 114 `${_}${_}${_}${_}${_}${_}${_}${_}`, // padding row 3 115 `${_}${_}${_}${_}${F}${F}${_}${_}`,119 `${_}${_}${F}${_}${F}${F}${_}${F}`, 120 `${_}${_}${_}${F}${_}${_}${F}${_}`, 121 `${_}${_}${_}${_}${F}${F}${_}${_}`, 122], 123// Frame 8: Hold complete logo 124[ 125 `${_}${_}${_}${_}${_}${_}${_}${_}`, // padding row 1 126 `${_}${_}${_}${_}${_}${_}${_}${_}`, // padding row 2 127 `${_}${_}${_}${_}${_}${_}${_}${_}`, // padding row 3 128 `${_}${_}${_}${_}${F}${F}${_}${_}`,First 10 of 17 lines, the second copy on the right.
- 15 lines in 5 placestypescript54 tokenssrc/core/command-generation/adapters/crush.ts:20–34src/core/command-generation/adapters/devin.ts:26–40src/core/command-generation/adapters/lingma.ts:20–34src/core/command-generation/adapters/qoder.ts:20–34src/core/command-generation/adapters/zcode.ts:23–37
20 return path.join('.crush', 'commands', 'opsx', `${commandId}.md`); 21 }, 22 23 formatFile(content: CommandContent): string { 24 return `--- 25name: ${escapeYamlValue(content.name)} 26description: ${escapeYamlValue(content.description)} 27category: ${escapeYamlValue(content.category)} 28tags: ${formatTagsArray(content.tags)} 29---First 10 of 15 lines.
- 24 lines in 3 placestypescript107 tokenssrc/core/completions/installers/bash-installer.ts:251–274src/core/completions/installers/fish-installer.ts:84–107src/core/completions/installers/zsh-installer.ts:262–285
251 'If completions are not working, try: exec bash', 252 ], 253 }; 254 } 255 // File exists but content is different - this is an update 256 isUpdate = true; 257} catch (error: any) { 258 // File doesn't exist or can't be read, proceed with installation 259 console.debug(`Unable to read existing completion file at ${targetPath}: ${error.message}`); 260}First 10 of 24 lines.
7 more
- 22 lines in 2 placestypescript202 tokens
- 9 lines in 2 placestypescript162 tokens
- 9 lines in 3 placestypescript73 tokens
- 12 lines in 2 placestypescript144 tokens
- 8 lines in 3 placestypescript72 tokens
- 14 lines in 2 placestypescript132 tokens
- 19 lines in 2 placestypescript131 tokens
Largest clones over all files, tests and data included
- 172 lines in 2 placesmarkdowntests2,116 tokensopenspec/changes/archive/2025-12-23-extend-shell-completions/specs/cli-completion/spec.md:123–294openspec/specs/cli-completion/spec.md:168–339
123### Requirement: Installation Automation 124 125The completion command SHALL automatically install completion scripts into shell configuration files for all supported shells. 126 127#### Scenario: Installing for Oh My Zsh 128 129- **WHEN** user executes `openspec completion install zsh` 130- **THEN** detect if Oh My Zsh is installed by checking for `$ZSH` environment variable or `~/.oh-my-zsh/` directory 131- **AND** create custom completions directory at `~/.oh-my-zsh/custom/completions/` if it doesn't exist 132- **AND** write completion script to `~/.oh-my-zsh/custom/completions/_openspec`First 10 of 172 lines.
- 16 lines in 4 placesmarkdowndocs and examples648 tokensskills/openspec-apply-change/SKILL.md:12–27skills/openspec-continue-change/SKILL.md:12–27skills/openspec-ff-change/SKILL.md:12–27skills/openspec-new-change/SKILL.md:12–27
12Implement tasks from an OpenSpec change. 13 14**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store… 15 16**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, … 17 18One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `open… 19 20Otherwise, with no root, what happens next depends on how this workflow was reached: 21First 10 of 16 lines.
- 12 lines in 4 placesmarkdowndocs and examples636 tokensskills/openspec-apply-change/SKILL.md:14–25skills/openspec-bulk-archive-change/SKILL.md:16–27skills/openspec-explore/SKILL.md:18–29skills/openspec-onboard/SKILL.md:14–25
14**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store… 15 16**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, … 17 18One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `open… 19 20Otherwise, with no root, what happens next depends on how this workflow was reached: 21 22- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec a… 23- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this proj…First 10 of 12 lines.
- 29 lines in 4 placesmarkdowntests583 tokensopenspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-init/spec.md:20–48openspec/changes/archive/2025-10-22-add-cline-support/specs/cli-init/spec.md:69–97openspec/changes/archive/2025-10-22-add-crush-support/specs/cli-init/spec.md:39–67openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-init/spec.md:26–54
- 89 lines in 2 placesmarkupmarkup1,672 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 177 | 43,000 | 80 | 1,153 | 2.68% |
| javascript | 11 | 1,088 | 0 | 0 | 0% |
| bash | 10 | 786 | 0 | 0 | 0% |
| tsx | 8 | 385 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 419 | 127,926 | 1,005 | 11,337 | 8.86% |
| markdown | 700 | 78,855 | 363 | 7,861 | 9.97% |
| text | 96 | 3,879 | 15 | 169 | 4.36% |
| yaml | 45 | 1,815 | 4 | 55 | 3.03% |
| bash | 46 | 1,560 | 3 | 13 | 0.83% |
| json | 18 | 931 | 2 | 45 | 4.83% |
| markup | 7 | 308 | 1 | 89 | 28.9% |
| nix | 2 | 22 | 1 | 11 | 50% |
| javascript | 11 | 1,088 | 0 | 0 | 0% |
| tsx | 11 | 527 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 19, 2026 | #7 | 69,435 (+296) | 1,360 | 217,187 | 1,394 | 9.02% | 2.54% | C 62.1 | bae58cf |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.