@structured-vibe-coding/core 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 harsha09
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.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # `@structured-vibe-coding/core`
2
+
3
+ Core engine for **Structured Vibe Coding** — local-first Spec-Driven Development.
4
+
5
+ Used by:
6
+
7
+ - `@structured-vibe-coding/cli` (`sdd` command)
8
+ - VS Code / Cursor extension (`packages/vscode`)
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @structured-vibe-coding/core
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```ts
19
+ import { initProject, createChange, advanceStage, loadConfig } from "@structured-vibe-coding/core";
20
+
21
+ const root = process.cwd();
22
+ await initProject({ projectRoot: root });
23
+ const config = await loadConfig(root);
24
+ const change = await createChange({
25
+ projectRoot: root,
26
+ config,
27
+ title: "Add feature X",
28
+ workflowName: "feature",
29
+ });
30
+ await advanceStage(root, config, change.id);
31
+ ```
32
+
33
+ See the [repository README](https://github.com/structured-vibe-coding/spec-driven-development) for workflows, customization, and CLI docs.
34
+
35
+ ## License
36
+
37
+ MIT
@@ -0,0 +1,19 @@
1
+ # Architecture
2
+
3
+ <!-- High-level system shape for local development -->
4
+
5
+ ## Overview
6
+
7
+ -
8
+
9
+ ## Key components
10
+
11
+ -
12
+
13
+ ## Data stores
14
+
15
+ -
16
+
17
+ ## Non-negotiables
18
+
19
+ -
@@ -0,0 +1,15 @@
1
+ # Conventions
2
+
3
+ ## Code
4
+
5
+ -
6
+
7
+ ## Specs & process
8
+
9
+ - Spec-first for non-trivial work
10
+ - Prefer the lightest workflow that fits the change
11
+ - Local verify before `sdd complete`
12
+
13
+ ## Agent guidance
14
+
15
+ -
@@ -0,0 +1,15 @@
1
+ # Product
2
+
3
+ <!-- What are you building? Who is it for? -->
4
+
5
+ ## Vision
6
+
7
+ -
8
+
9
+ ## Users
10
+
11
+ -
12
+
13
+ ## Success metrics
14
+
15
+ -
@@ -0,0 +1,14 @@
1
+ # Acceptance
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Cases
6
+
7
+ | # | Scenario | Expected (local) |
8
+ |---|----------|------------------|
9
+ | 1 | | |
10
+ | 2 | | |
11
+
12
+ ## Explicitly not testing
13
+
14
+ -
@@ -0,0 +1,21 @@
1
+ # ARB decision
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Decision
6
+
7
+ - [ ] Approve
8
+ - [ ] Approve with conditions
9
+ - [ ] Reject
10
+
11
+ ## Conditions / constraints
12
+
13
+ -
14
+
15
+ ## Rationale
16
+
17
+ -
18
+
19
+ ## Date / attendees
20
+
21
+ -
@@ -0,0 +1,23 @@
1
+ # ARB packet
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Summary
6
+
7
+ -
8
+
9
+ ## Decision needed
10
+
11
+ -
12
+
13
+ ## Options & tradeoffs
14
+
15
+ -
16
+
17
+ ## Security / privacy / cost notes
18
+
19
+ -
20
+
21
+ ## Rollback / risk
22
+
23
+ -
@@ -0,0 +1,21 @@
1
+ # Code research
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Where to change
6
+
7
+ | Area | Path / module | Notes |
8
+ |------|---------------|-------|
9
+ | | | |
10
+
11
+ ## What to add vs modify
12
+
13
+ -
14
+
15
+ ## How (patterns to follow)
16
+
17
+ -
18
+
19
+ ## Risks / gotchas
20
+
21
+ -
@@ -0,0 +1,23 @@
1
+ # DB design
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Schema changes
6
+
7
+ -
8
+
9
+ ## Indexes
10
+
11
+ -
12
+
13
+ ## Migrations / backfill
14
+
15
+ -
16
+
17
+ ## Rollback
18
+
19
+ -
20
+
21
+ ## Local how-to
22
+
23
+ -
@@ -0,0 +1,23 @@
1
+ # Design
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Approach
6
+
7
+ -
8
+
9
+ ## Components / modules
10
+
11
+ -
12
+
13
+ ## Data flow
14
+
15
+ -
16
+
17
+ ## Alternatives considered
18
+
19
+ -
20
+
21
+ ## Risks
22
+
23
+ -
@@ -0,0 +1,27 @@
1
+ # Feature
2
+
3
+ > **{{title}}** · `{{id}}` · {{date}}
4
+
5
+ ## Problem / opportunity
6
+
7
+ -
8
+
9
+ ## Users & value
10
+
11
+ -
12
+
13
+ ## Scope
14
+
15
+ -
16
+
17
+ ## Non-goals
18
+
19
+ -
20
+
21
+ ## Success criteria
22
+
23
+ -
24
+
25
+ ## Risks / open questions
26
+
27
+ -
@@ -0,0 +1,29 @@
1
+ # High-level design
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Context
6
+
7
+ -
8
+
9
+ ## Options
10
+
11
+ ### Option A
12
+
13
+ -
14
+
15
+ ### Option B
16
+
17
+ -
18
+
19
+ ## Recommendation
20
+
21
+ -
22
+
23
+ ## Tradeoffs
24
+
25
+ -
26
+
27
+ ## Impacted systems
28
+
29
+ -
@@ -0,0 +1,19 @@
1
+ # Intent
2
+
3
+ > **{{title}}** · `{{id}}` · {{date}}
4
+
5
+ ## Problem
6
+
7
+ -
8
+
9
+ ## Proposed change
10
+
11
+ -
12
+
13
+ ## Out of scope
14
+
15
+ -
16
+
17
+ ## Local success check
18
+
19
+ -
@@ -0,0 +1,23 @@
1
+ # Low-level design
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Components & responsibilities
6
+
7
+ -
8
+
9
+ ## Interfaces / contracts
10
+
11
+ -
12
+
13
+ ## Sequences
14
+
15
+ -
16
+
17
+ ## Error handling
18
+
19
+ -
20
+
21
+ ## Testing notes (local)
22
+
23
+ -
@@ -0,0 +1,19 @@
1
+ # Local test plan
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Environment
6
+
7
+ - How to run locally:
8
+ - Branch / flags / seed data:
9
+
10
+ ## Cases
11
+
12
+ | # | Case | Steps | Expected |
13
+ |---|------|-------|----------|
14
+ | 1 | Happy path | | |
15
+ | 2 | | | |
16
+
17
+ ## Out of scope this change
18
+
19
+ -
@@ -0,0 +1,20 @@
1
+ # Local test results
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Results
6
+
7
+ | # | Result | Notes |
8
+ |---|--------|-------|
9
+ | 1 | PASS / FAIL | |
10
+
11
+ ## Commands run
12
+
13
+ ```
14
+ # paste local commands
15
+ ```
16
+
17
+ ## Sign-off
18
+
19
+ - Tested by:
20
+ - Date:
@@ -0,0 +1,17 @@
1
+ # Spike outcome
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## What we learned
6
+
7
+ -
8
+
9
+ ## Recommendation
10
+
11
+ - [ ] Promote to feature change
12
+ - [ ] Abandon
13
+ - [ ] Needs more research
14
+
15
+ ## Next steps
16
+
17
+ -
@@ -0,0 +1,20 @@
1
+ # User stories
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Stories
6
+
7
+ ### US-1: …
8
+
9
+ As a …
10
+ I want …
11
+ So that …
12
+
13
+ **Acceptance**
14
+
15
+ - [ ]
16
+ - [ ]
17
+
18
+ ### US-2: …
19
+
20
+ -
@@ -0,0 +1,15 @@
1
+ # Tasks
2
+
3
+ > **{{title}}** · `{{id}}`
4
+
5
+ ## Breakdown
6
+
7
+ - [ ] Task 1
8
+ - [ ] Task 2
9
+ - [ ] Task 3
10
+
11
+ ## Traceability
12
+
13
+ | Task | Story / design ref |
14
+ |------|--------------------|
15
+ | | |
@@ -0,0 +1,161 @@
1
+ name: enterprise-feature
2
+ description: >
3
+ Full team path — feature, HL ARB, LLD, DB design, code research,
4
+ stories, tasks, implement, local verify
5
+ version: 1
6
+ recommendation:
7
+ priority: 5
8
+ when:
9
+ keywords: [arb, architecture, migration, epic, platform]
10
+ min_complexity: high
11
+ stages:
12
+ - id: feature
13
+ title: Feature definition
14
+ summary: Capture problem, users, scope, success criteria, non-goals
15
+ skippable: false
16
+ artifacts:
17
+ - id: feature
18
+ path: feature.md
19
+ template: feature.md
20
+ required: true
21
+ gate:
22
+ type: soft
23
+ checklist:
24
+ - "Scope clear enough for high-level design"
25
+
26
+ - id: hl_arb
27
+ title: High-level design + ARB
28
+ summary: Architecture options, tradeoffs, ARB packet and decision
29
+ skippable: false
30
+ artifacts:
31
+ - id: hl-design
32
+ path: hl-design.md
33
+ template: hl-design.md
34
+ required: true
35
+ - id: arb-packet
36
+ path: arb-packet.md
37
+ template: arb-packet.md
38
+ required: true
39
+ - id: arb-decision
40
+ path: arb-decision.md
41
+ template: arb-decision.md
42
+ required: true
43
+ gate:
44
+ type: hard
45
+ mode: human_approval
46
+ overridable: false
47
+ checklist:
48
+ - "ARB decision recorded (approve / approve-with-conditions / reject)"
49
+ - "Conditions (if any) captured as constraints"
50
+
51
+ - id: lld
52
+ title: Low-level design
53
+ summary: Component contracts, sequences, error paths, interfaces
54
+ skippable: true
55
+ artifacts:
56
+ - id: lld
57
+ path: lld.md
58
+ template: lld.md
59
+ required: true
60
+ gate:
61
+ type: soft
62
+
63
+ - id: db_design
64
+ title: DB design
65
+ summary: Schema deltas, indexes, migrations, backfill
66
+ skippable: true
67
+ skip_when:
68
+ flags: [no_db]
69
+ artifacts:
70
+ - id: db-design
71
+ path: db-design.md
72
+ template: db-design.md
73
+ required: true
74
+ gate:
75
+ type: soft
76
+
77
+ - id: code_research
78
+ title: Code research
79
+ summary: Where / what / how to change in this codebase
80
+ skippable: true
81
+ artifacts:
82
+ - id: research
83
+ path: research.md
84
+ template: code-research.md
85
+ required: true
86
+ gate:
87
+ type: soft
88
+
89
+ - id: stories
90
+ title: User stories
91
+ summary: Slice into user-visible stories with acceptance
92
+ skippable: true
93
+ artifacts:
94
+ - id: stories
95
+ path: stories.md
96
+ template: stories.md
97
+ required: true
98
+ gate:
99
+ type: soft
100
+
101
+ - id: tasks
102
+ title: Task breakdown
103
+ summary: Implementable tasks traced to stories
104
+ skippable: true
105
+ artifacts:
106
+ - id: tasks
107
+ path: tasks.md
108
+ template: tasks.md
109
+ required: true
110
+ gate:
111
+ type: soft
112
+
113
+ - id: implement
114
+ title: Implementation
115
+ summary: Execute tasks; respect ARB conditions
116
+ skippable: false
117
+ artifacts:
118
+ - id: evidence
119
+ path: evidence/
120
+ required: false
121
+ gate:
122
+ type: soft
123
+ checklist:
124
+ - "Open tasks done or deferred with reason"
125
+ - "ARB conditions satisfied or waived in arb-decision.md"
126
+ agent_context:
127
+ instructions: |
128
+ Implement only open tasks in tasks.md.
129
+ Do not violate constraints in arb-decision.md.
130
+ Prefer patterns listed in research.md.
131
+
132
+ - id: local_verify
133
+ title: Local verification
134
+ summary: Run and verify the feature on the developer machine
135
+ skippable: true
136
+ artifacts:
137
+ - id: local-test-plan
138
+ path: local-test-plan.md
139
+ template: local-test-plan.md
140
+ required: true
141
+ - id: local-test-results
142
+ path: local-test-results.md
143
+ template: local-test-results.md
144
+ required: true
145
+ - id: evidence
146
+ path: evidence/local/
147
+ required: false
148
+ gate:
149
+ type: hard
150
+ overridable: true
151
+ checklist:
152
+ - "Happy path verified locally"
153
+ - "Critical edge cases from stories covered or waived"
154
+ - "Failures fixed or filed before complete"
155
+ verify:
156
+ commands: []
157
+ evidence_dir: evidence/local
158
+
159
+ on_complete:
160
+ archive: true
161
+ domain_sync: recommend
@@ -0,0 +1,82 @@
1
+ name: feature
2
+ description: Standard feature — intent, design, tasks, implement, local verify
3
+ version: 1
4
+ recommendation:
5
+ priority: 30
6
+ when:
7
+ keywords: [feature, add, build, support]
8
+ min_complexity: medium
9
+ stages:
10
+ - id: intent
11
+ title: Feature intent
12
+ summary: Problem, users, scope, non-goals, success
13
+ skippable: false
14
+ artifacts:
15
+ - id: feature
16
+ path: feature.md
17
+ template: feature.md
18
+ required: true
19
+ gate:
20
+ type: soft
21
+ checklist:
22
+ - "Scope and non-goals are explicit"
23
+ - id: design
24
+ title: Design
25
+ summary: Approach, components, risks (keep short)
26
+ skippable: true
27
+ artifacts:
28
+ - id: design
29
+ path: design.md
30
+ template: design.md
31
+ required: true
32
+ gate:
33
+ type: soft
34
+ - id: tasks
35
+ title: Tasks
36
+ summary: Break work into implementable tasks
37
+ skippable: true
38
+ artifacts:
39
+ - id: tasks
40
+ path: tasks.md
41
+ template: tasks.md
42
+ required: true
43
+ gate:
44
+ type: soft
45
+ - id: implement
46
+ title: Implement
47
+ summary: Build the feature locally
48
+ skippable: false
49
+ artifacts: []
50
+ gate:
51
+ type: soft
52
+ agent_context:
53
+ instructions: |
54
+ Implement tasks from tasks.md following design.md and feature.md.
55
+ Prefer incremental, testable steps.
56
+ - id: local_verify
57
+ title: Local verify
58
+ summary: Verify the feature on this machine
59
+ skippable: true
60
+ artifacts:
61
+ - id: local-test-plan
62
+ path: local-test-plan.md
63
+ template: local-test-plan.md
64
+ required: true
65
+ - id: local-test-results
66
+ path: local-test-results.md
67
+ template: local-test-results.md
68
+ required: true
69
+ - id: evidence
70
+ path: evidence/local/
71
+ required: false
72
+ gate:
73
+ type: soft
74
+ checklist:
75
+ - "Happy path verified locally"
76
+ - "Key edge cases covered or waived with notes"
77
+ verify:
78
+ commands: []
79
+ evidence_dir: evidence/local
80
+ on_complete:
81
+ archive: true
82
+ domain_sync: recommend