spec-ctx 0.1.0 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-ctx",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Deterministic context engine and task workflow for OpenSpec projects.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -5,14 +5,27 @@ A fork of the OpenSpec `spec-driven` schema. It adds stable IDs from spec-ctx to
5
5
  - The spec template starts each requirement with `REQ-<CAP>-NNN` and each scenario with `SCN-<CAP>-NNN-<n>`.
6
6
  - The instructions tell the agent to get IDs from `specctx id new` and to link IDs with `Refs:` lines.
7
7
  - The tasks template cites REQ IDs and puts the `Verify:` command in a code span, so `specctx task done` can run it.
8
- - `config-fragment.yaml` holds the `rules` and `operations` that `specctx init --schema` adds to `openspec/config.yaml`.
8
+ - `config-fragment.yaml` holds the `rules` and `operations` for `openspec/config.yaml`.
9
9
 
10
- Forked from OpenSpec 1.14.3 with `openspec schema fork spec-driven spec-driven-ids`. CI validates it against that version.
10
+ ## Install by copy
11
+
12
+ - Clone the repository: `git clone https://github.com/sonqh/spec-ctx`.
13
+ - Copy `schemas/spec-driven-ids` to `openspec/schemas/spec-driven-ids` in your project.
14
+ - Set `schema: spec-driven-ids` in `openspec/config.yaml`.
15
+ - Merge `config-fragment.yaml` into `openspec/config.yaml` by hand. Add its `rules` and `operations` keys. Keep every item quoted.
16
+ - Run `openspec schema validate spec-driven-ids`.
11
17
 
12
- ## Install
18
+ ## Install with init --schema
13
19
 
14
20
  ```bash
15
- npx spec-ctx init --schema
21
+ npx -y spec-ctx init --schema
16
22
  ```
17
23
 
18
- The command copies this folder to `openspec/schemas/spec-driven-ids/` and sets `schema: spec-driven-ids` in `openspec/config.yaml`.
24
+ - The command copies this folder to `openspec/schemas/spec-driven-ids/`.
25
+ - It sets `schema: spec-driven-ids` in `openspec/config.yaml`.
26
+ - It adds the `rules` and `operations` keys that the config does not have yet. It leaves other keys as they are.
27
+ - It quotes a list item that YAML would read as a mapping.
28
+
29
+ ## Version
30
+
31
+ Forked from OpenSpec 1.14.3 with `openspec schema fork spec-driven spec-driven-ids`. CI validates it against that version.
@@ -2,24 +2,24 @@
2
2
  # that the project config does not have yet. It never changes a key that exists.
3
3
  rules:
4
4
  specs:
5
- - Every requirement header starts with its ID, e.g. "### Requirement: REQ-ABC-001 Name". Get the ID from `specctx id new REQ ABC`.
6
- - Every scenario header starts with its ID, e.g. "#### Scenario: SCN-ABC-001-1 Name".
7
- - A requirement may end with a line "Refs: REQ-ABC-002, ADR-001" to link related IDs.
8
- - Requirement text stays under 500 characters. Move detail into scenarios.
5
+ - 'Every requirement header starts with its ID, e.g. "### Requirement: REQ-ABC-001 Name". Get the ID from `specctx id new REQ ABC`.'
6
+ - 'Every scenario header starts with its ID, e.g. "#### Scenario: SCN-ABC-001-1 Name".'
7
+ - 'A requirement may end with a line "Refs: REQ-ABC-002, ADR-001" to link related IDs.'
8
+ - 'Requirement text stays under 500 characters. Move detail into scenarios.'
9
9
  design:
10
- - Each decision is one bullet under "## Decisions". Add new decisions at the end.
10
+ - 'Each decision is one bullet under "## Decisions". Add new decisions at the end.'
11
11
  tasks:
12
- - Every task cites at least one REQ ID in square brackets, e.g. "[REQ-ABC-001]".
13
- - Every task states its verification as a command in a code span after "Verify:".
12
+ - 'Every task cites at least one REQ ID in square brackets, e.g. "[REQ-ABC-001]".'
13
+ - 'Every task states its verification as a command in a code span after "Verify:".'
14
14
 
15
15
  operations:
16
16
  apply:
17
17
  guidance:
18
- - Start each task with `specctx task start <id>` and read the bundle it prints before you read specs.
19
- - Tag code with the REQ ID it implements (a comment `// REQ-ABC-001`). Tag tests with `// Covers: REQ-ABC-001`.
20
- - Close each task with `specctx task done <id>`. Never tick a checkbox by hand.
21
- - Run `specctx check --strict` after each task group.
18
+ - 'Start each task with `specctx task start <id>` and read the bundle it prints before you read specs.'
19
+ - 'Tag code with the REQ ID it implements (a comment `// REQ-ABC-001`). Tag tests with `// Covers: REQ-ABC-001`.'
20
+ - 'Close each task with `specctx task done <id>`. Never tick a checkbox by hand.'
21
+ - 'Run `specctx check --strict` after each task group.'
22
22
  archive:
23
23
  guidance:
24
- - Run `specctx check --strict` and `openspec validate --all --strict`. Both must pass before archive.
25
- - Run `openspec validate --all --strict` again after archive and before push.
24
+ - 'Run `specctx check --strict` and `openspec validate --all --strict`. Both must pass before archive.'
25
+ - 'Run `openspec validate --all --strict` again after archive and before push.'
@@ -11,7 +11,7 @@ Close the current task with evidence. Run `specctx` as `npx spec-ctx` when it is
11
11
 
12
12
  1. Run `specctx task done <task>`. It runs the `Verify:` command of the task in the project root.
13
13
  2. On exit 0 it writes `.ctx/evidence/<change>/<task>.json` and sets `[x]` on the task line. Nothing else in `tasks.md` changes.
14
- 3. On a failure it prints the last 20 lines of output and exits 1. The task stays open. Fix the cause and run step 1 again.
14
+ 3. On a failure it prints the last 20 lines of output and then the line `Verify failed (exit <n>). The task stays open.` It exits 1. Fix the cause and run step 1 again.
15
15
  4. If the task has prose after `Verify:` and no command, run `specctx task done <task> --manual "<what you checked>"`.
16
16
  5. After the last task of a group, run `specctx check --strict`. Fix every finding before the next group.
17
17
  6. Run `specctx handoff write`. It writes `.ctx/handoff.md` from the index, the evidence, and the open questions.