@kynetic-ai/spec 0.4.0 → 0.6.0
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/dist/cli/commands/guard.d.ts +43 -0
- package/dist/cli/commands/guard.d.ts.map +1 -0
- package/dist/cli/commands/guard.js +200 -0
- package/dist/cli/commands/guard.js.map +1 -0
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/item.d.ts.map +1 -1
- package/dist/cli/commands/item.js +60 -23
- package/dist/cli/commands/item.js.map +1 -1
- package/dist/cli/commands/plan-import.js +51 -12
- package/dist/cli/commands/plan-import.js.map +1 -1
- package/dist/cli/commands/ralph.d.ts.map +1 -1
- package/dist/cli/commands/ralph.js +144 -329
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/session/checkpoint.d.ts +19 -0
- package/dist/cli/commands/session/checkpoint.d.ts.map +1 -0
- package/dist/cli/commands/session/checkpoint.js +161 -0
- package/dist/cli/commands/session/checkpoint.js.map +1 -0
- package/dist/cli/commands/session/commands.d.ts +18 -0
- package/dist/cli/commands/session/commands.d.ts.map +1 -0
- package/dist/cli/commands/session/commands.js +259 -0
- package/dist/cli/commands/session/commands.js.map +1 -0
- package/dist/cli/commands/session/context.d.ts +17 -0
- package/dist/cli/commands/session/context.d.ts.map +1 -0
- package/dist/cli/commands/session/context.js +493 -0
- package/dist/cli/commands/session/context.js.map +1 -0
- package/dist/cli/commands/session/create.d.ts +29 -0
- package/dist/cli/commands/session/create.d.ts.map +1 -0
- package/dist/cli/commands/session/create.js +147 -0
- package/dist/cli/commands/session/create.js.map +1 -0
- package/dist/cli/commands/session/format.d.ts +27 -0
- package/dist/cli/commands/session/format.d.ts.map +1 -0
- package/dist/cli/commands/session/format.js +401 -0
- package/dist/cli/commands/session/format.js.map +1 -0
- package/dist/cli/commands/session/index.d.ts +13 -0
- package/dist/cli/commands/session/index.d.ts.map +1 -0
- package/dist/cli/commands/session/index.js +17 -0
- package/dist/cli/commands/session/index.js.map +1 -0
- package/dist/cli/commands/session/log.d.ts +52 -0
- package/dist/cli/commands/session/log.d.ts.map +1 -0
- package/dist/cli/commands/session/log.js +570 -0
- package/dist/cli/commands/session/log.js.map +1 -0
- package/dist/cli/commands/session/types.d.ts +230 -0
- package/dist/cli/commands/session/types.d.ts.map +1 -0
- package/dist/cli/commands/session/types.js +7 -0
- package/dist/cli/commands/session/types.js.map +1 -0
- package/dist/cli/commands/session.d.ts +4 -179
- package/dist/cli/commands/session.d.ts.map +1 -1
- package/dist/cli/commands/session.js +6 -1424
- package/dist/cli/commands/session.js.map +1 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +69 -223
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +95 -37
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +23 -7
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +14 -2
- package/dist/cli/output.js.map +1 -1
- package/dist/parser/file-lock.d.ts +14 -0
- package/dist/parser/file-lock.d.ts.map +1 -0
- package/dist/parser/file-lock.js +124 -0
- package/dist/parser/file-lock.js.map +1 -0
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +1 -0
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/plan-document.d.ts +36 -0
- package/dist/parser/plan-document.d.ts.map +1 -1
- package/dist/parser/plan-document.js +75 -8
- package/dist/parser/plan-document.js.map +1 -1
- package/dist/parser/plans.d.ts.map +1 -1
- package/dist/parser/plans.js +28 -102
- package/dist/parser/plans.js.map +1 -1
- package/dist/parser/shadow.d.ts +5 -1
- package/dist/parser/shadow.d.ts.map +1 -1
- package/dist/parser/shadow.js +29 -17
- package/dist/parser/shadow.js.map +1 -1
- package/dist/parser/validate.d.ts +4 -1
- package/dist/parser/validate.d.ts.map +1 -1
- package/dist/parser/validate.js +50 -35
- package/dist/parser/validate.js.map +1 -1
- package/dist/parser/yaml.d.ts.map +1 -1
- package/dist/parser/yaml.js +322 -297
- package/dist/parser/yaml.js.map +1 -1
- package/dist/schema/task.d.ts +22 -0
- package/dist/schema/task.d.ts.map +1 -1
- package/dist/schema/task.js +7 -0
- package/dist/schema/task.js.map +1 -1
- package/dist/sessions/store.d.ts +254 -1
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +621 -1
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/types.d.ts +51 -2
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js +25 -0
- package/dist/sessions/types.js.map +1 -1
- package/dist/strings/labels.d.ts +2 -0
- package/dist/strings/labels.d.ts.map +1 -1
- package/dist/strings/labels.js +2 -0
- package/dist/strings/labels.js.map +1 -1
- package/dist/utils/git.d.ts +2 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +21 -5
- package/dist/utils/git.js.map +1 -1
- package/package.json +4 -1
- package/plugin/.claude-plugin/marketplace.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugins/kspec/skills/review/SKILL.md +37 -0
- package/plugin/plugins/kspec/skills/task-work/SKILL.md +16 -0
- package/plugin/plugins/kspec/skills/triage-inbox/SKILL.md +1 -1
- package/plugin/plugins/kspec/skills/writing-specs/SKILL.md +14 -0
- package/templates/agents-sections/05-commit-convention.md +14 -0
- package/templates/skills/review/SKILL.md +37 -0
- package/templates/skills/task-work/SKILL.md +16 -0
- package/templates/skills/triage-inbox/SKILL.md +1 -1
- package/templates/skills/writing-specs/SKILL.md +14 -0
|
@@ -25,3 +25,17 @@ def test_validates_input():
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Every AC SHOULD have at least one test with this annotation.
|
|
28
|
+
|
|
29
|
+
### N/A Trait ACs
|
|
30
|
+
|
|
31
|
+
When a trait AC doesn't apply to a specific spec, annotate it as N/A with a reason:
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
// AC: @trait-slug ac-N — N/A: reason why it doesn't apply
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
# AC: @trait-slug ac-N — N/A: reason why it doesn't apply
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Group N/A annotations together in a dedicated test or at the top of the test file. The `AC:` annotation marker with language-appropriate comment prefix is required — do not use prose comments or bullet lists. The annotation must be machine-parseable.
|
|
@@ -10,6 +10,43 @@ Kspec-specific review concerns for verifying spec alignment, AC coverage, and tr
|
|
|
10
10
|
|
|
11
11
|
**This is NOT a complete review workflow.** It covers kspec-specific quality gates (spec alignment, AC coverage, trait coverage, validation). Projects should wrap this in their own review skill that adds project-specific concerns (test commands, E2E patterns, coding standards).
|
|
12
12
|
|
|
13
|
+
## Spec Context Discovery
|
|
14
|
+
|
|
15
|
+
If a spec ref is not explicitly provided, discover it before proceeding with AC checks:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 1. Check commit messages for Task: or Spec: trailers
|
|
19
|
+
git log --format='%B' main..HEAD | grep -E '^(Task|Spec):'
|
|
20
|
+
|
|
21
|
+
# 2. Check changed files for // AC: annotations pointing to specs
|
|
22
|
+
git diff main..HEAD | grep '// AC: @'
|
|
23
|
+
|
|
24
|
+
# 3. If a task ref is found, get its spec_ref
|
|
25
|
+
kspec task get @task-ref --json | jq '.spec_ref'
|
|
26
|
+
|
|
27
|
+
# 4. Search recent tasks matching the scope of changes
|
|
28
|
+
kspec tasks list | grep -i "<keywords from changed files>"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If a spec is found through any method, proceed with full AC validation below.
|
|
32
|
+
If no spec context is found after all discovery steps, skip AC coverage checks and focus on code quality and regression checks.
|
|
33
|
+
|
|
34
|
+
**Principle:** The absence of a trailer is a signal to look harder, not permission to skip validation.
|
|
35
|
+
|
|
36
|
+
## CLI Lookups
|
|
37
|
+
|
|
38
|
+
Use CLI commands to resolve specs and traits. **Do NOT search `.kspec/` YAML files manually.**
|
|
39
|
+
|
|
40
|
+
| Need | Command |
|
|
41
|
+
|------|---------|
|
|
42
|
+
| Spec + all ACs (own + inherited) | `kspec item get @spec-ref` |
|
|
43
|
+
| Trait definition + ACs | `kspec item get @trait-slug` |
|
|
44
|
+
| All traits on a spec | shown in `kspec item get @spec-ref` output |
|
|
45
|
+
| Search by keyword | `kspec search "keyword"` |
|
|
46
|
+
| All traits | `kspec trait list` |
|
|
47
|
+
|
|
48
|
+
**Resolving inherited traits:** When `kspec item get` shows "Inherited from @trait-slug", run `kspec item get @trait-slug` to see the full trait ACs. This is one command — never grep through `.kspec/modules/*.yaml` files.
|
|
49
|
+
|
|
13
50
|
## Spec Alignment
|
|
14
51
|
|
|
15
52
|
Implementation must match spec intent, not just pass tests.
|
|
@@ -41,6 +41,22 @@ pending → in_progress → pending_review → completed
|
|
|
41
41
|
| `kspec task complete @ref --reason "..."` | → completed | PR merged |
|
|
42
42
|
| `kspec task block @ref --reason "..."` | → blocked | External blocker |
|
|
43
43
|
|
|
44
|
+
## CLI Lookups
|
|
45
|
+
|
|
46
|
+
Use CLI commands to find information. **Do NOT search `.kspec/` YAML files manually** — it wastes time and misses context that CLI commands provide (like inherited trait ACs).
|
|
47
|
+
|
|
48
|
+
| Need | Command |
|
|
49
|
+
|------|---------|
|
|
50
|
+
| Task details | `kspec task get @ref` |
|
|
51
|
+
| Spec + all ACs (own + inherited) | `kspec item get @ref` |
|
|
52
|
+
| Trait definition + ACs | `kspec item get @trait-slug` |
|
|
53
|
+
| Search by keyword | `kspec search "keyword"` |
|
|
54
|
+
| List by type | `kspec item list --type feature` |
|
|
55
|
+
| All traits | `kspec trait list` |
|
|
56
|
+
| Task's linked spec | `kspec task get @ref` → read `spec_ref` field |
|
|
57
|
+
|
|
58
|
+
**Key pattern:** When `kspec item get` output shows "Inherited from @trait-slug", run `kspec item get @trait-slug` to see the trait's ACs. One command — do not grep YAML files.
|
|
59
|
+
|
|
44
60
|
## Workflow Steps
|
|
45
61
|
|
|
46
62
|
### 1. Choose Task
|
|
@@ -111,7 +111,7 @@ kspec triage act @triage-ref
|
|
|
111
111
|
|
|
112
112
|
For behavior changes, check spec coverage before promoting:
|
|
113
113
|
|
|
114
|
-
1. **Check coverage**: `kspec
|
|
114
|
+
1. **Check coverage**: `kspec search "<relevant keyword>"` or `kspec item get @ref`
|
|
115
115
|
2. **Identify gaps**: Does spec have description AND acceptance criteria?
|
|
116
116
|
3. **Update spec**:
|
|
117
117
|
```bash
|
|
@@ -12,6 +12,20 @@ Create and maintain specification items — the source of truth for what to buil
|
|
|
12
12
|
|
|
13
13
|
**Not for:** Task management (use `/kspec:task-work`), plan-to-spec translation (use `/kspec:plan`), or triage (use `/kspec:triage`).
|
|
14
14
|
|
|
15
|
+
## Finding Things
|
|
16
|
+
|
|
17
|
+
Use CLI commands to discover and inspect specs. **Do NOT search `.kspec/` YAML files manually.**
|
|
18
|
+
|
|
19
|
+
| Need | Command |
|
|
20
|
+
|------|---------|
|
|
21
|
+
| View spec + all ACs | `kspec item get @ref` |
|
|
22
|
+
| Search by keyword | `kspec search "keyword"` |
|
|
23
|
+
| List by type | `kspec item list --type feature` |
|
|
24
|
+
| All modules | `kspec item list --type module` |
|
|
25
|
+
| All traits | `kspec trait list` |
|
|
26
|
+
| Trait details + ACs | `kspec item get @trait-slug` |
|
|
27
|
+
| Items under a parent | `kspec item list --under @parent` |
|
|
28
|
+
|
|
15
29
|
## Core Principles
|
|
16
30
|
|
|
17
31
|
1. **Spec defines WHAT, not HOW** — Describe the desired behavior, not the implementation
|