specspec 0.0.1__tar.gz

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 (36) hide show
  1. specspec-0.0.1/.gitignore +18 -0
  2. specspec-0.0.1/LICENSE +21 -0
  3. specspec-0.0.1/PKG-INFO +253 -0
  4. specspec-0.0.1/README.md +221 -0
  5. specspec-0.0.1/pyproject.toml +53 -0
  6. specspec-0.0.1/src/specspec/__init__.py +3 -0
  7. specspec-0.0.1/src/specspec/__main__.py +3 -0
  8. specspec-0.0.1/src/specspec/annotation_commands.py +118 -0
  9. specspec-0.0.1/src/specspec/annotations.py +493 -0
  10. specspec-0.0.1/src/specspec/api_transport.py +42 -0
  11. specspec-0.0.1/src/specspec/application.py +161 -0
  12. specspec-0.0.1/src/specspec/batch.py +219 -0
  13. specspec-0.0.1/src/specspec/body_replacements.py +83 -0
  14. specspec-0.0.1/src/specspec/cli.py +905 -0
  15. specspec-0.0.1/src/specspec/cli_help.py +463 -0
  16. specspec-0.0.1/src/specspec/deletion.py +97 -0
  17. specspec-0.0.1/src/specspec/edit_cli.py +106 -0
  18. specspec-0.0.1/src/specspec/editor.py +263 -0
  19. specspec-0.0.1/src/specspec/format.py +231 -0
  20. specspec-0.0.1/src/specspec/git.py +285 -0
  21. specspec-0.0.1/src/specspec/git_objects.py +164 -0
  22. specspec-0.0.1/src/specspec/graph.py +206 -0
  23. specspec-0.0.1/src/specspec/inspection.py +180 -0
  24. specspec-0.0.1/src/specspec/model.py +82 -0
  25. specspec-0.0.1/src/specspec/node_text.py +32 -0
  26. specspec-0.0.1/src/specspec/output.py +301 -0
  27. specspec-0.0.1/src/specspec/query.py +407 -0
  28. specspec-0.0.1/src/specspec/query_select.py +270 -0
  29. specspec-0.0.1/src/specspec/query_sources.py +243 -0
  30. specspec-0.0.1/src/specspec/replacement_matching.py +270 -0
  31. specspec-0.0.1/src/specspec/source_commands.py +282 -0
  32. specspec-0.0.1/src/specspec/source_schema.py +65 -0
  33. specspec-0.0.1/src/specspec/sources.py +448 -0
  34. specspec-0.0.1/src/specspec/templates/AGENTS.md +205 -0
  35. specspec-0.0.1/src/specspec/wire.py +51 -0
  36. specspec-0.0.1/src/specspec/workspace.py +830 -0
@@ -0,0 +1,18 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
7
+ *.egg-info/
8
+ .specspec/local/
9
+ .vscode-test/
10
+ node_modules/
11
+ vscode/out/
12
+ vscode/media/
13
+ graph-ui-common/media/vendor/
14
+ electron/build/
15
+ electron/release/
16
+ *.vsix
17
+ # Generated local Python Environments discovery; launch/tasks/workspace stay shared.
18
+ /.vscode/settings.json
specspec-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Julian Habekost
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,253 @@
1
+ Metadata-Version: 2.5
2
+ Name: specspec
3
+ Version: 0.0.1
4
+ Summary: Connect intentions, revisable choices and implementation in versioned Markdown
5
+ Project-URL: Homepage, https://github.com/jejay/specspec
6
+ Project-URL: Repository, https://github.com/jejay/specspec
7
+ Project-URL: Documentation, https://github.com/jejay/specspec/tree/main/docs
8
+ Project-URL: Issues, https://github.com/jejay/specspec/issues
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: coding-agents,git,markdown,requirements,specification
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development :: Documentation
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: click<9,>=8.1
24
+ Requires-Dist: markdown-it-py<5,>=4
25
+ Requires-Dist: ruamel-yaml<0.19,>=0.18.6
26
+ Provides-Extra: dev
27
+ Requires-Dist: build<2,>=1; extra == 'dev'
28
+ Requires-Dist: pillow<13,>=12; extra == 'dev'
29
+ Requires-Dist: pytest<10,>=8; extra == 'dev'
30
+ Requires-Dist: ruff<1,>=0.11; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ <picture>
34
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jejay/specspec/main/branding/specspec-logo-dark.png">
35
+ <img src="https://raw.githubusercontent.com/jejay/specspec/main/branding/specspec-logo-light.png" alt="specspec" width="640">
36
+ </picture>
37
+
38
+ # specspec
39
+
40
+ **Keep the intention. Reconsider the solution. Know what the code is meant to do.**
41
+
42
+ An agent can produce working code quickly. Keeping track of *why this solution*,
43
+ which assumptions came from whom, and what should survive a change of approach is
44
+ harder. A long conversation is a poor place to keep that understanding.
45
+
46
+ specspec connects **your intentions, revisable choices and implementation** in a
47
+ Git-versioned Markdown graph. Read and edit it through a small CLI, your own VS Code
48
+ instance, or a standalone desktop window. People and coding agents use the same
49
+ specification, with full explanations rather than a pile of unchecked task titles.
50
+
51
+ > Engineering is on the spectrum now
52
+
53
+ Hands-on engineering and delegated agent work are not a binary choice. You can
54
+ direct one decision carefully and leave the next open. specspec makes that reasoning
55
+ visible; it does not choose your level of delegation or run an agent for you.
56
+
57
+ **0.0.1 is an early, local-first release.** The CLI and both graph editors are usable;
58
+ expect rough edges and changing interfaces. There is no hosted service, Marketplace
59
+ listing, automatic coding agent, or correctness guarantee. Your specification stays
60
+ in your repository. [Scope and release notes](https://github.com/jejay/specspec/blob/main/CHANGELOG.md) · [Install](https://github.com/jejay/specspec/blob/main/docs/install.md)
61
+
62
+ ## A spectrum, not a checklist
63
+
64
+ ```text
65
+ Manifesto Help a small team understand its plan
66
+ Requirement Make timing and dependencies understandable
67
+ Requirement Present tasks on an interactive timeline
68
+ Requirement Use a local browser view with explicit JSON export
69
+ Implementation Explain the view and link its actual source/tests
70
+ ```
71
+
72
+ The timeline is a choice serving an intention, not the intention itself. A later
73
+ approach can replace it without quietly losing the goal. One conclusion can serve
74
+ several intentions: the structure is a rooted DAG, not just a hierarchy.
75
+
76
+ - **Read the why.** Query a decision and every ancestor that justifies it.
77
+ - **Revise deliberately.** Keep consequential choices separately addressable;
78
+ compare specification changes with Git and inspect potential downstream effects.
79
+ - **Connect the realization.** Implementation explanations link to files or tracked
80
+ source regions, with explicit uncertainty when those links stop being reliable.
81
+ - **Work visually or in the terminal.** Both UIs share one renderer and Python
82
+ backend. The CLI works well with an agent's existing shell tools.
83
+
84
+ Graph position is a relationship, not an approval or confidence score. Passing
85
+ validation establishes structure, not whether a product actually meets its purpose.
86
+
87
+ ## Choose how to use it
88
+
89
+ | Entry point | What you install | What you need |
90
+ | --- | --- | --- |
91
+ | **specspec CLI** | Global isolated Python tool | Python 3.11+, uv or pipx; Git including initialization |
92
+ | **specspec-vscode** | Build a VSIX, install into your ordinary editor | Global CLI, VS Code 1.90+, Node 22.12+ and npm 10+ for building |
93
+ | **specspec-desktop** | Run from source or build a portable Electron app | Global CLI and Git; Node/npm for source builds |
94
+
95
+ The CLI needs **no Node, VS Code or Electron**. The UIs use `specspec` on PATH by
96
+ default; neither bundles a second Python runtime. Desktop targets Windows/Linux;
97
+ macOS users can use the CLI and VS Code. See [platform qualification](https://github.com/jejay/specspec/blob/main/docs/platforms.md).
98
+
99
+ ### Install the CLI globally
100
+
101
+ Install **[specspec from PyPI](https://pypi.org/project/specspec/)**:
102
+
103
+ ```sh
104
+ uv tool install specspec
105
+ specspec --version
106
+ specspec --help
107
+ ```
108
+
109
+ Or use `pipx install specspec`. Both install a user-wide command in an isolated
110
+ environment, not a dependency in every project. No source checkout or Node is needed
111
+ for the CLI. Upgrade with `uv tool upgrade specspec` or `pipx upgrade specspec`.
112
+ Restart your terminal/editor after fixing PATH with `uv tool update-shell` or
113
+ `pipx ensurepath` if necessary. No administrator or `sudo pip` installation is needed.
114
+ The [installation guide](https://github.com/jejay/specspec/blob/main/docs/install.md) covers source/wheel alternatives and
115
+ replacing an older local build.
116
+
117
+ ### Use it in your own VS Code — no Marketplace
118
+
119
+ Only UI source builds need a checkout. After installing the CLI:
120
+
121
+ ```sh
122
+ git clone https://github.com/jejay/specspec.git
123
+ cd specspec
124
+ npm ci
125
+ npm run package:vscode
126
+ code --install-extension dist/specspec-vscode-0.0.1.vsix
127
+ ```
128
+
129
+ Reload VS Code, open your project and run **specspec: Open Graph** from the Command
130
+ Palette. Or use **Extensions → … → Install from VSIX…** with that file. This is a
131
+ normal installed extension, not an F5-only development window. No package is sent
132
+ to the Marketplace. [Setup and troubleshooting](https://github.com/jejay/specspec/blob/main/vscode/README.md)
133
+
134
+ ### Run the desktop
135
+
136
+ From the repository root:
137
+
138
+ ```sh
139
+ npm ci
140
+ npm run desktop
141
+ # Or open this checkout's graph directly:
142
+ npm run desktop -- --project .
143
+ ```
144
+
145
+ Choose **Open project**, select your project and **Trust and Open**. The explicit
146
+ `--project` launch argument authorizes that folder instead. To create a portable
147
+ Windows/Linux package, activate the development Python environment described in
148
+ [contributing](https://github.com/jejay/specspec/blob/main/CONTRIBUTING.md) and run `npm run package:electron`. Output is under
149
+ `dist/`. End users of the portable archive need the global CLI and Git, **not Node**.
150
+ [Desktop guide](https://github.com/jejay/specspec/blob/main/electron/README.md)
151
+
152
+ ## Start a project
153
+
154
+ In a different directory — this checkout already has a graph:
155
+
156
+ ```sh
157
+ mkdir my-project
158
+ cd my-project
159
+ specspec init -m "# Understand our plan" -m "Help a small team agree on timing."
160
+ specspec query --max-distance 2
161
+ ```
162
+
163
+ Initialization requires Git and initializes a repository when needed. It creates
164
+ `.specspec/` and creates root **`AGENTS.md`**, or appends the
165
+ [shipped guide](https://github.com/jejay/specspec/blob/main/src/specspec/templates/AGENTS.md) after existing instructions.
166
+ The reserved `.specspec/local/` subtree holds ignored recovery and spotlight data,
167
+ not nodes. Staging, commits, identity and hooks remain yours.
168
+
169
+ Both UIs check for the CLI immediately and show a blocking installation message
170
+ when it is missing. A directory without a graph offers a centered **Initialize
171
+ specspec** action. Opening a folder alone does not create one.
172
+
173
+ Copy the full manifesto ID printed by `init`, including its trailing `=`, and use
174
+ it in place of `MANIFESTO_ID` below:
175
+
176
+ ```sh
177
+ specspec add --parent MANIFESTO_ID -m "# Readable timing" -m "Show task timing clearly."
178
+ specspec query NODE_ID --max-distance 0 --with-ancestors
179
+ specspec update NODE_ID --replace "task timing" "timing and dependencies"
180
+ specspec check --sources
181
+ specspec diff --with-context
182
+ ```
183
+
184
+ `NODE_ID` is another full ID from the result. Messages are literal Markdown; repeat
185
+ `-m` for paragraphs. `--replace` selects unique passages while tolerating ordinary
186
+ prose wrapping and line-ending differences; inserted text remains literal. Compose
187
+ add/update/delete for one recoverable transaction. See [the CLI guide](https://github.com/jejay/specspec/blob/main/docs/cli.md)
188
+ and each command's concise `--help`. Without messages, text comes from stdin;
189
+ use shell redirection for large bodies.
190
+
191
+ The hidden `.specspec/` directory contains direct `<id>.md` nodes and the reserved
192
+ `local/` runtime subtree. Headings, query and the graph editor provide discovery.
193
+ Internal schema/protocol details stay out of ordinary usage. The directory is `.specspec`, not the development-only underscore name;
194
+ [upgrade notes](https://github.com/jejay/specspec/blob/main/docs/install.md#upgrading-pre-release-workspaces) explain the boundary.
195
+
196
+ ## See a project change its mind
197
+
198
+ [The Gantt example](https://github.com/jejay/specspec/blob/main/example/gantt/README.md) has a runnable local planner and an
199
+ independent Git history with two substantial changes of direction.
200
+ Create a real example workspace outside this checkout:
201
+
202
+ ```sh
203
+ python example/gantt/history/checkout.py
204
+ ```
205
+
206
+ Open the resulting folder in either UI and compare `stage/01-code` → `stage/02-spec`
207
+ or `stage/02-code` → `stage/03-spec`. Existing example clones are never reset.
208
+ The tracked `example/gantt/` folder is a snapshot, not its own Git workspace.
209
+
210
+ ## Ownership and boundaries
211
+
212
+ Markdown is editable directly as well as through the tools. A completed graph is
213
+ rooted and shortcut-free; intermediate invalid graphs remain diagnosable and
214
+ repairable. Deletion removes **exactly selected files** and retains surviving
215
+ conclusions and their declarations. `--require-valid` checks a complete candidate;
216
+ `check` remains strict. There are no stored approval states or parent-review gates.
217
+
218
+ VS Code file tabs retain native Save, dirty state and undo/redo. Electron and
219
+ managed project actions use locked, original-byte-checked, recoverable writes.
220
+ Interrupted edits need `specspec recover`; this is not a universal Undo or a
221
+ power-loss-safe database. Watchers are hints, with explicit Refresh available.
222
+
223
+ The renderers load bundled assets and render project text literally. CLI execution
224
+ requires trusted host/project configuration. Source symbols are descriptive; source
225
+ tracking and passing tests supply evidence, not proof of semantic fulfillment.
226
+ Large graphs are not virtualized. Signing, installers, auto-updates and hosted
227
+ agent connectors are outside this initial release.
228
+
229
+ ## Go deeper
230
+
231
+ - [Installation, upgrades and PATH](https://github.com/jejay/specspec/blob/main/docs/install.md) · [Agent process and template](https://github.com/jejay/specspec/blob/main/docs/agents.md)
232
+ - [CLI reference](https://github.com/jejay/specspec/blob/main/docs/cli.md) · [Query selection](https://github.com/jejay/specspec/blob/main/docs/query.md) · [Canvas controls](https://github.com/jejay/specspec/blob/main/docs/node-canvas.md)
233
+ - [Graph structure](https://github.com/jejay/specspec/blob/main/docs/graph-structure.md) · [Sources](https://github.com/jejay/specspec/blob/main/docs/source-regions.md) · [Deletion](https://github.com/jejay/specspec/blob/main/docs/deletion.md)
234
+ - [Invalid-state repair](https://github.com/jejay/specspec/blob/main/docs/invalid-graphs.md) · [Native documents](https://github.com/jejay/specspec/blob/main/docs/native-editors.md) · [Remote workspaces](https://github.com/jejay/specspec/blob/main/docs/remote-workspaces.md)
235
+ - [Architecture](https://github.com/jejay/specspec/blob/main/docs/architecture.md) · [specspec's own graph](https://github.com/jejay/specspec/blob/main/docs/own-spec.md) · [Brand provenance](https://github.com/jejay/specspec/blob/main/branding/README.md)
236
+ - [Contributing and monorepo commands](https://github.com/jejay/specspec/blob/main/CONTRIBUTING.md) · [Release and PyPI publishing](https://github.com/jejay/specspec/blob/main/docs/releasing.md) · [MIT license](https://github.com/jejay/specspec/blob/main/LICENSE)
237
+
238
+ ## Monorepo map
239
+
240
+ | Path | Responsibility |
241
+ | --- | --- |
242
+ | `src/specspec/`, `pyproject.toml` | Python library/CLI and packaged initialization guide |
243
+ | `vscode/` | VS Code adapter and local VSIX packaging |
244
+ | `electron/` | Sandboxed desktop adapter and portable packaging |
245
+ | `graph-ui-common/` | Shared renderer, session, host ports and bundled dependency notices |
246
+ | `package.json`, `package-lock.json` | One private npm workspace, locked UI/build dependencies and root commands |
247
+ | `branding/`, `docs/` | Selected identity, onboarding and detailed guides |
248
+ | `.specspec/` | This product's own intentions, choices and implementation explanations |
249
+ | `example/gantt/` | Maintained independent history fixture and runnable example snapshot |
250
+
251
+ Source and release artifacts are built here; publishing remains an explicit owner
252
+ action. The supplied original dog artwork stays archived, while the application
253
+ and documentation use the selected Spectrum flow identity.
@@ -0,0 +1,221 @@
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jejay/specspec/main/branding/specspec-logo-dark.png">
3
+ <img src="https://raw.githubusercontent.com/jejay/specspec/main/branding/specspec-logo-light.png" alt="specspec" width="640">
4
+ </picture>
5
+
6
+ # specspec
7
+
8
+ **Keep the intention. Reconsider the solution. Know what the code is meant to do.**
9
+
10
+ An agent can produce working code quickly. Keeping track of *why this solution*,
11
+ which assumptions came from whom, and what should survive a change of approach is
12
+ harder. A long conversation is a poor place to keep that understanding.
13
+
14
+ specspec connects **your intentions, revisable choices and implementation** in a
15
+ Git-versioned Markdown graph. Read and edit it through a small CLI, your own VS Code
16
+ instance, or a standalone desktop window. People and coding agents use the same
17
+ specification, with full explanations rather than a pile of unchecked task titles.
18
+
19
+ > Engineering is on the spectrum now
20
+
21
+ Hands-on engineering and delegated agent work are not a binary choice. You can
22
+ direct one decision carefully and leave the next open. specspec makes that reasoning
23
+ visible; it does not choose your level of delegation or run an agent for you.
24
+
25
+ **0.0.1 is an early, local-first release.** The CLI and both graph editors are usable;
26
+ expect rough edges and changing interfaces. There is no hosted service, Marketplace
27
+ listing, automatic coding agent, or correctness guarantee. Your specification stays
28
+ in your repository. [Scope and release notes](https://github.com/jejay/specspec/blob/main/CHANGELOG.md) · [Install](https://github.com/jejay/specspec/blob/main/docs/install.md)
29
+
30
+ ## A spectrum, not a checklist
31
+
32
+ ```text
33
+ Manifesto Help a small team understand its plan
34
+ Requirement Make timing and dependencies understandable
35
+ Requirement Present tasks on an interactive timeline
36
+ Requirement Use a local browser view with explicit JSON export
37
+ Implementation Explain the view and link its actual source/tests
38
+ ```
39
+
40
+ The timeline is a choice serving an intention, not the intention itself. A later
41
+ approach can replace it without quietly losing the goal. One conclusion can serve
42
+ several intentions: the structure is a rooted DAG, not just a hierarchy.
43
+
44
+ - **Read the why.** Query a decision and every ancestor that justifies it.
45
+ - **Revise deliberately.** Keep consequential choices separately addressable;
46
+ compare specification changes with Git and inspect potential downstream effects.
47
+ - **Connect the realization.** Implementation explanations link to files or tracked
48
+ source regions, with explicit uncertainty when those links stop being reliable.
49
+ - **Work visually or in the terminal.** Both UIs share one renderer and Python
50
+ backend. The CLI works well with an agent's existing shell tools.
51
+
52
+ Graph position is a relationship, not an approval or confidence score. Passing
53
+ validation establishes structure, not whether a product actually meets its purpose.
54
+
55
+ ## Choose how to use it
56
+
57
+ | Entry point | What you install | What you need |
58
+ | --- | --- | --- |
59
+ | **specspec CLI** | Global isolated Python tool | Python 3.11+, uv or pipx; Git including initialization |
60
+ | **specspec-vscode** | Build a VSIX, install into your ordinary editor | Global CLI, VS Code 1.90+, Node 22.12+ and npm 10+ for building |
61
+ | **specspec-desktop** | Run from source or build a portable Electron app | Global CLI and Git; Node/npm for source builds |
62
+
63
+ The CLI needs **no Node, VS Code or Electron**. The UIs use `specspec` on PATH by
64
+ default; neither bundles a second Python runtime. Desktop targets Windows/Linux;
65
+ macOS users can use the CLI and VS Code. See [platform qualification](https://github.com/jejay/specspec/blob/main/docs/platforms.md).
66
+
67
+ ### Install the CLI globally
68
+
69
+ Install **[specspec from PyPI](https://pypi.org/project/specspec/)**:
70
+
71
+ ```sh
72
+ uv tool install specspec
73
+ specspec --version
74
+ specspec --help
75
+ ```
76
+
77
+ Or use `pipx install specspec`. Both install a user-wide command in an isolated
78
+ environment, not a dependency in every project. No source checkout or Node is needed
79
+ for the CLI. Upgrade with `uv tool upgrade specspec` or `pipx upgrade specspec`.
80
+ Restart your terminal/editor after fixing PATH with `uv tool update-shell` or
81
+ `pipx ensurepath` if necessary. No administrator or `sudo pip` installation is needed.
82
+ The [installation guide](https://github.com/jejay/specspec/blob/main/docs/install.md) covers source/wheel alternatives and
83
+ replacing an older local build.
84
+
85
+ ### Use it in your own VS Code — no Marketplace
86
+
87
+ Only UI source builds need a checkout. After installing the CLI:
88
+
89
+ ```sh
90
+ git clone https://github.com/jejay/specspec.git
91
+ cd specspec
92
+ npm ci
93
+ npm run package:vscode
94
+ code --install-extension dist/specspec-vscode-0.0.1.vsix
95
+ ```
96
+
97
+ Reload VS Code, open your project and run **specspec: Open Graph** from the Command
98
+ Palette. Or use **Extensions → … → Install from VSIX…** with that file. This is a
99
+ normal installed extension, not an F5-only development window. No package is sent
100
+ to the Marketplace. [Setup and troubleshooting](https://github.com/jejay/specspec/blob/main/vscode/README.md)
101
+
102
+ ### Run the desktop
103
+
104
+ From the repository root:
105
+
106
+ ```sh
107
+ npm ci
108
+ npm run desktop
109
+ # Or open this checkout's graph directly:
110
+ npm run desktop -- --project .
111
+ ```
112
+
113
+ Choose **Open project**, select your project and **Trust and Open**. The explicit
114
+ `--project` launch argument authorizes that folder instead. To create a portable
115
+ Windows/Linux package, activate the development Python environment described in
116
+ [contributing](https://github.com/jejay/specspec/blob/main/CONTRIBUTING.md) and run `npm run package:electron`. Output is under
117
+ `dist/`. End users of the portable archive need the global CLI and Git, **not Node**.
118
+ [Desktop guide](https://github.com/jejay/specspec/blob/main/electron/README.md)
119
+
120
+ ## Start a project
121
+
122
+ In a different directory — this checkout already has a graph:
123
+
124
+ ```sh
125
+ mkdir my-project
126
+ cd my-project
127
+ specspec init -m "# Understand our plan" -m "Help a small team agree on timing."
128
+ specspec query --max-distance 2
129
+ ```
130
+
131
+ Initialization requires Git and initializes a repository when needed. It creates
132
+ `.specspec/` and creates root **`AGENTS.md`**, or appends the
133
+ [shipped guide](https://github.com/jejay/specspec/blob/main/src/specspec/templates/AGENTS.md) after existing instructions.
134
+ The reserved `.specspec/local/` subtree holds ignored recovery and spotlight data,
135
+ not nodes. Staging, commits, identity and hooks remain yours.
136
+
137
+ Both UIs check for the CLI immediately and show a blocking installation message
138
+ when it is missing. A directory without a graph offers a centered **Initialize
139
+ specspec** action. Opening a folder alone does not create one.
140
+
141
+ Copy the full manifesto ID printed by `init`, including its trailing `=`, and use
142
+ it in place of `MANIFESTO_ID` below:
143
+
144
+ ```sh
145
+ specspec add --parent MANIFESTO_ID -m "# Readable timing" -m "Show task timing clearly."
146
+ specspec query NODE_ID --max-distance 0 --with-ancestors
147
+ specspec update NODE_ID --replace "task timing" "timing and dependencies"
148
+ specspec check --sources
149
+ specspec diff --with-context
150
+ ```
151
+
152
+ `NODE_ID` is another full ID from the result. Messages are literal Markdown; repeat
153
+ `-m` for paragraphs. `--replace` selects unique passages while tolerating ordinary
154
+ prose wrapping and line-ending differences; inserted text remains literal. Compose
155
+ add/update/delete for one recoverable transaction. See [the CLI guide](https://github.com/jejay/specspec/blob/main/docs/cli.md)
156
+ and each command's concise `--help`. Without messages, text comes from stdin;
157
+ use shell redirection for large bodies.
158
+
159
+ The hidden `.specspec/` directory contains direct `<id>.md` nodes and the reserved
160
+ `local/` runtime subtree. Headings, query and the graph editor provide discovery.
161
+ Internal schema/protocol details stay out of ordinary usage. The directory is `.specspec`, not the development-only underscore name;
162
+ [upgrade notes](https://github.com/jejay/specspec/blob/main/docs/install.md#upgrading-pre-release-workspaces) explain the boundary.
163
+
164
+ ## See a project change its mind
165
+
166
+ [The Gantt example](https://github.com/jejay/specspec/blob/main/example/gantt/README.md) has a runnable local planner and an
167
+ independent Git history with two substantial changes of direction.
168
+ Create a real example workspace outside this checkout:
169
+
170
+ ```sh
171
+ python example/gantt/history/checkout.py
172
+ ```
173
+
174
+ Open the resulting folder in either UI and compare `stage/01-code` → `stage/02-spec`
175
+ or `stage/02-code` → `stage/03-spec`. Existing example clones are never reset.
176
+ The tracked `example/gantt/` folder is a snapshot, not its own Git workspace.
177
+
178
+ ## Ownership and boundaries
179
+
180
+ Markdown is editable directly as well as through the tools. A completed graph is
181
+ rooted and shortcut-free; intermediate invalid graphs remain diagnosable and
182
+ repairable. Deletion removes **exactly selected files** and retains surviving
183
+ conclusions and their declarations. `--require-valid` checks a complete candidate;
184
+ `check` remains strict. There are no stored approval states or parent-review gates.
185
+
186
+ VS Code file tabs retain native Save, dirty state and undo/redo. Electron and
187
+ managed project actions use locked, original-byte-checked, recoverable writes.
188
+ Interrupted edits need `specspec recover`; this is not a universal Undo or a
189
+ power-loss-safe database. Watchers are hints, with explicit Refresh available.
190
+
191
+ The renderers load bundled assets and render project text literally. CLI execution
192
+ requires trusted host/project configuration. Source symbols are descriptive; source
193
+ tracking and passing tests supply evidence, not proof of semantic fulfillment.
194
+ Large graphs are not virtualized. Signing, installers, auto-updates and hosted
195
+ agent connectors are outside this initial release.
196
+
197
+ ## Go deeper
198
+
199
+ - [Installation, upgrades and PATH](https://github.com/jejay/specspec/blob/main/docs/install.md) · [Agent process and template](https://github.com/jejay/specspec/blob/main/docs/agents.md)
200
+ - [CLI reference](https://github.com/jejay/specspec/blob/main/docs/cli.md) · [Query selection](https://github.com/jejay/specspec/blob/main/docs/query.md) · [Canvas controls](https://github.com/jejay/specspec/blob/main/docs/node-canvas.md)
201
+ - [Graph structure](https://github.com/jejay/specspec/blob/main/docs/graph-structure.md) · [Sources](https://github.com/jejay/specspec/blob/main/docs/source-regions.md) · [Deletion](https://github.com/jejay/specspec/blob/main/docs/deletion.md)
202
+ - [Invalid-state repair](https://github.com/jejay/specspec/blob/main/docs/invalid-graphs.md) · [Native documents](https://github.com/jejay/specspec/blob/main/docs/native-editors.md) · [Remote workspaces](https://github.com/jejay/specspec/blob/main/docs/remote-workspaces.md)
203
+ - [Architecture](https://github.com/jejay/specspec/blob/main/docs/architecture.md) · [specspec's own graph](https://github.com/jejay/specspec/blob/main/docs/own-spec.md) · [Brand provenance](https://github.com/jejay/specspec/blob/main/branding/README.md)
204
+ - [Contributing and monorepo commands](https://github.com/jejay/specspec/blob/main/CONTRIBUTING.md) · [Release and PyPI publishing](https://github.com/jejay/specspec/blob/main/docs/releasing.md) · [MIT license](https://github.com/jejay/specspec/blob/main/LICENSE)
205
+
206
+ ## Monorepo map
207
+
208
+ | Path | Responsibility |
209
+ | --- | --- |
210
+ | `src/specspec/`, `pyproject.toml` | Python library/CLI and packaged initialization guide |
211
+ | `vscode/` | VS Code adapter and local VSIX packaging |
212
+ | `electron/` | Sandboxed desktop adapter and portable packaging |
213
+ | `graph-ui-common/` | Shared renderer, session, host ports and bundled dependency notices |
214
+ | `package.json`, `package-lock.json` | One private npm workspace, locked UI/build dependencies and root commands |
215
+ | `branding/`, `docs/` | Selected identity, onboarding and detailed guides |
216
+ | `.specspec/` | This product's own intentions, choices and implementation explanations |
217
+ | `example/gantt/` | Maintained independent history fixture and runnable example snapshot |
218
+
219
+ Source and release artifacts are built here; publishing remains an explicit owner
220
+ action. The supplied original dog artwork stays archived, while the application
221
+ and documentation use the selected Spectrum flow identity.
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27,<2"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "specspec"
7
+ version = "0.0.1"
8
+ description = "Connect intentions, revisable choices and implementation in versioned Markdown"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ dependencies = ["click>=8.1,<9", "ruamel.yaml>=0.18.6,<0.19", "markdown-it-py>=4,<5"]
13
+ keywords = ["specification", "coding-agents", "requirements", "markdown", "git"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
+ "Topic :: Software Development :: Documentation",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/jejay/specspec"
29
+ Repository = "https://github.com/jejay/specspec"
30
+ Documentation = "https://github.com/jejay/specspec/tree/main/docs"
31
+ Issues = "https://github.com/jejay/specspec/issues"
32
+
33
+ [project.optional-dependencies]
34
+ dev = ["pytest>=8,<10", "ruff>=0.11,<1", "build>=1,<2", "pillow>=12,<13"]
35
+
36
+ [project.scripts]
37
+ specspec = "specspec.cli:main"
38
+
39
+ [tool.hatch.build.targets.wheel]
40
+ packages = ["src/specspec"]
41
+
42
+ [tool.hatch.build.targets.sdist]
43
+ include = ["/src/specspec", "/pyproject.toml", "/README.md", "/LICENSE"]
44
+
45
+ [tool.pytest.ini_options]
46
+ testpaths = ["tests"]
47
+
48
+ [tool.ruff]
49
+ target-version = "py311"
50
+ line-length = 100
51
+
52
+ [tool.ruff.lint]
53
+ select = ["E", "F", "I", "UP", "B"]
@@ -0,0 +1,3 @@
1
+ """specspec's reusable graph and workspace API."""
2
+
3
+ __version__ = "0.0.1"
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ main()