speclock 5.2.6 → 5.3.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/README.md +144 -24
- package/package.json +242 -67
- package/src/cli/index.js +137 -7
- package/src/core/auth.js +341 -341
- package/src/core/compliance.js +1 -1
- package/src/core/engine.js +63 -1
- package/src/core/lock-author.js +487 -487
- package/src/core/replay.js +236 -0
- package/src/core/rules-sync.js +548 -0
- package/src/core/templates.js +69 -0
- package/src/dashboard/index.html +2 -2
- package/src/mcp/http-server.js +3 -3
- package/src/mcp/server.js +130 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<a href="https://www.npmjs.com/package/speclock"><img src="https://img.shields.io/npm/v/speclock.svg?style=flat-square&color=4F46E5" alt="npm version" /></a>
|
|
9
9
|
<a href="https://www.npmjs.com/package/speclock"><img src="https://img.shields.io/npm/dm/speclock.svg?style=flat-square&color=22C55E" alt="npm downloads" /></a>
|
|
10
10
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT License" /></a>
|
|
11
|
-
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-42_tools-green.svg?style=flat-square" alt="MCP
|
|
11
|
+
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-42_tools-green.svg?style=flat-square" alt="MCP 46 tools" /></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<p align="center">
|
|
@@ -32,7 +32,8 @@ AI: ⚠️ BLOCKED — violates lock "Never touch the auth system"
|
|
|
32
32
|
Should I find another approach?
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
**
|
|
35
|
+
**100/100 on Claude's independent test suite. 929 tests across 18 suites. 0 false positives. 15.7ms per check.**
|
|
36
|
+
**Gemini Flash hybrid, Spec Compiler, Code Graph, Typed Constraints, Python SDK, ROS2 integration.**
|
|
36
37
|
|
|
37
38
|
---
|
|
38
39
|
|
|
@@ -111,7 +112,7 @@ Same config — add to `.cursor/mcp.json` or equivalent.
|
|
|
111
112
|
|---|:---:|:---:|:---:|:---:|
|
|
112
113
|
| Remembers context | Yes | Yes | Manual | **Yes** |
|
|
113
114
|
| **Blocks the AI from breaking things** | No | No | No | **Yes** |
|
|
114
|
-
| **Semantic conflict detection** | No | No | No | **
|
|
115
|
+
| **Semantic conflict detection** | No | No | No | **100/100 score, 0% FP** |
|
|
115
116
|
| **Tamper-proof audit trail** | No | No | No | **HMAC-SHA256 chain** |
|
|
116
117
|
| **Hard enforcement (AI cannot proceed)** | No | No | No | **Yes** |
|
|
117
118
|
| **SOC 2 / HIPAA compliance exports** | No | No | No | **Yes** |
|
|
@@ -124,9 +125,89 @@ Same config — add to `.cursor/mcp.json` or equivalent.
|
|
|
124
125
|
|
|
125
126
|
---
|
|
126
127
|
|
|
127
|
-
##
|
|
128
|
+
## Universal Rules Sync (v5.3)
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
One command syncs your SpecLock constraints to every AI coding tool:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
speclock sync --all
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
SpecLock Sync Complete
|
|
138
|
+
✓ Cursor → .cursor/rules/speclock.mdc
|
|
139
|
+
✓ Claude Code → CLAUDE.md
|
|
140
|
+
✓ AGENTS.md → AGENTS.md (Linux Foundation standard)
|
|
141
|
+
✓ Windsurf → .windsurf/rules/speclock.md
|
|
142
|
+
✓ GitHub Copilot → .github/copilot-instructions.md
|
|
143
|
+
✓ Gemini → GEMINI.md
|
|
144
|
+
✓ Aider → .aider.conf.yml
|
|
145
|
+
|
|
146
|
+
7 file(s) synced. Your AI tools will now see SpecLock constraints.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Stop maintaining 3 separate rules files. Define constraints once in SpecLock, sync everywhere.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
speclock sync --format cursor # Sync to Cursor only
|
|
153
|
+
speclock sync --preview claude # Preview without writing
|
|
154
|
+
speclock sync --list # Show all supported formats
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Incident Replay (v5.3)
|
|
160
|
+
|
|
161
|
+
Flight recorder for your AI coding sessions. See exactly what happened:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
speclock replay
|
|
165
|
+
|
|
166
|
+
Session: ses_a1b2c3 (claude-code, 47 min)
|
|
167
|
+
────────────────────────────────────────────
|
|
168
|
+
14:02 [ALLOW] Create user profile component
|
|
169
|
+
14:08 [ALLOW] Add form validation
|
|
170
|
+
14:15 [WARN] Simplify authentication flow
|
|
171
|
+
→ matched lock: "Never modify auth"
|
|
172
|
+
14:23 [BLOCK] Clean up old user records
|
|
173
|
+
→ euphemism detected: "clean up" = deletion
|
|
174
|
+
14:31 [ALLOW] Update landing page hero section
|
|
175
|
+
|
|
176
|
+
Score: 5 events | 3 allowed | 1 warned | 1 BLOCKED
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
speclock replay --list # List available sessions
|
|
181
|
+
speclock replay --session <id> # Replay specific session
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Safety Templates (v5.3)
|
|
187
|
+
|
|
188
|
+
Pre-built constraint packs for common scenarios:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
speclock template apply safe-defaults # 5 locks — "Vibe Coding Seatbelt"
|
|
192
|
+
speclock template apply solo-founder # 3 locks — auth, payments, data
|
|
193
|
+
speclock template apply hipaa # 8 locks — HIPAA healthcare
|
|
194
|
+
speclock template apply api-stability # 6 locks — API contract protection
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Safe Defaults** prevents the 5 most common AI disasters:
|
|
198
|
+
1. Database deletion
|
|
199
|
+
2. Auth removal
|
|
200
|
+
3. Secret exposure
|
|
201
|
+
4. Error handling removal
|
|
202
|
+
5. Logging disablement
|
|
203
|
+
|
|
204
|
+
One command. Instant protection. `npx speclock setup --template safe-defaults`
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Semantic Engine
|
|
209
|
+
|
|
210
|
+
Not keyword matching — **real semantic analysis** with Gemini Flash hybrid for universal domain coverage. Scored **100/100** on Claude's independent adversarial test battery (7 suites, including false positives, question framing, patch gateway, and diff analysis).
|
|
130
211
|
|
|
131
212
|
<table>
|
|
132
213
|
<tr><td><b>Category</b></td><td><b>Detection</b></td><td><b>Example</b></td></tr>
|
|
@@ -143,7 +224,7 @@ Not keyword matching — **real semantic analysis** with Gemini Flash hybrid for
|
|
|
143
224
|
<tr><td>Safe actions (true negatives)</td><td>0% FP</td><td>"Change the font" correctly passes auth locks</td></tr>
|
|
144
225
|
</table>
|
|
145
226
|
|
|
146
|
-
**Under the hood:** 65+ synonym groups · 80+ euphemism mappings · domain concept maps (fintech, e-commerce, IoT, healthcare, SaaS, payments) · intent classifier · compound sentence splitter · temporal evasion detector · verb tense normalization · UI cosmetic detection · passive voice parsing — all in pure JavaScript. Gemini Flash hybrid for grey-zone cases ($0.01/1000 checks).
|
|
227
|
+
**Under the hood:** 65+ synonym groups · 80+ euphemism mappings · domain concept maps (fintech, e-commerce, IoT, healthcare, SaaS, payments, gaming, telecom, government) · intent classifier · compound sentence splitter · temporal evasion detector · verb tense normalization · UI cosmetic detection · safe-intent patterns · passive voice parsing — all in pure JavaScript. Gemini Flash hybrid for grey-zone cases ($0.01/1000 checks).
|
|
147
228
|
|
|
148
229
|
---
|
|
149
230
|
|
|
@@ -433,7 +514,7 @@ POST /api/v2/graph/build
|
|
|
433
514
|
|
|
434
515
|
---
|
|
435
516
|
|
|
436
|
-
##
|
|
517
|
+
## 46 MCP Tools
|
|
437
518
|
|
|
438
519
|
<details>
|
|
439
520
|
<summary><b>Memory</b> — goal, locks, decisions, notes, deploy facts</summary>
|
|
@@ -541,6 +622,18 @@ POST /api/v2/graph/build
|
|
|
541
622
|
|
|
542
623
|
</details>
|
|
543
624
|
|
|
625
|
+
<details>
|
|
626
|
+
<summary><b>Universal Rules Sync & Incident Replay</b> — cross-tool sync, session replay (v5.3)</summary>
|
|
627
|
+
|
|
628
|
+
| Tool | What it does |
|
|
629
|
+
|------|-------------|
|
|
630
|
+
| `speclock_sync_rules` | Sync constraints to Cursor, Claude, Copilot, Windsurf, Gemini, Aider, AGENTS.md |
|
|
631
|
+
| `speclock_list_sync_formats` | List all available sync formats |
|
|
632
|
+
| `speclock_replay` | Replay a session's activity — what AI tried and what was caught |
|
|
633
|
+
| `speclock_list_sessions` | List available sessions for replay |
|
|
634
|
+
|
|
635
|
+
</details>
|
|
636
|
+
|
|
544
637
|
---
|
|
545
638
|
|
|
546
639
|
## CLI
|
|
@@ -568,8 +661,23 @@ speclock hook install # Pre-commit hook
|
|
|
568
661
|
speclock audit # Audit staged files
|
|
569
662
|
|
|
570
663
|
# Templates
|
|
571
|
-
speclock template apply
|
|
572
|
-
speclock template apply
|
|
664
|
+
speclock template apply safe-defaults # Vibe coding seatbelt (5 locks)
|
|
665
|
+
speclock template apply solo-founder # Indie builder essentials (3 locks)
|
|
666
|
+
speclock template apply hipaa # HIPAA healthcare (8 locks)
|
|
667
|
+
speclock template apply api-stability # API contract protection (6 locks)
|
|
668
|
+
speclock template apply nextjs # Next.js constraints
|
|
669
|
+
speclock template apply security-hardened # Security hardening
|
|
670
|
+
|
|
671
|
+
# Sync to AI tools
|
|
672
|
+
speclock sync --all # Sync to ALL tools
|
|
673
|
+
speclock sync --format cursor # Cursor only
|
|
674
|
+
speclock sync --format claude # Claude Code only
|
|
675
|
+
speclock sync --preview windsurf # Preview without writing
|
|
676
|
+
|
|
677
|
+
# Incident Replay
|
|
678
|
+
speclock replay # Replay last session
|
|
679
|
+
speclock replay --list # List sessions
|
|
680
|
+
speclock replay --session <id> # Replay specific session
|
|
573
681
|
|
|
574
682
|
# Auth
|
|
575
683
|
speclock auth create-key --role developer
|
|
@@ -613,7 +721,7 @@ The AI opens the file and sees:
|
|
|
613
721
|
│ AI Tool (Claude Code, Cursor, Bolt.new...) │
|
|
614
722
|
└────────────┬──────────────────┬──────────────────┘
|
|
615
723
|
│ │
|
|
616
|
-
MCP Protocol (
|
|
724
|
+
MCP Protocol (46 tools) npm File-Based
|
|
617
725
|
│ (SPECLOCK.md + CLI)
|
|
618
726
|
│ │
|
|
619
727
|
┌────────────▼──────────────────▼──────────────────┐
|
|
@@ -659,26 +767,33 @@ The AI opens the file and sees:
|
|
|
659
767
|
|
|
660
768
|
## Test Results
|
|
661
769
|
|
|
770
|
+
**Pre-publish gate runs all 18 suites before every npm publish. If any test fails, publish is blocked.**
|
|
771
|
+
|
|
662
772
|
| Suite | Tests | Pass Rate | What it covers |
|
|
663
773
|
|-------|------:|----------:|----------------|
|
|
664
|
-
|
|
|
665
|
-
|
|
|
774
|
+
| Real-World Testers | 111 | 100% | 5 developers, 30+ locks, diverse domains |
|
|
775
|
+
| Adversarial Conflict | 46 | 100% | Euphemisms, temporal evasion, compound sentences |
|
|
666
776
|
| Phase 4 (Multi-domain) | 91 | 100% | Fintech, e-commerce, IoT, healthcare, SaaS |
|
|
667
|
-
| John (Indie Dev Journey) | 86 | 100% | 8-session Bolt.new build with 5 locks |
|
|
668
777
|
| Sam (Enterprise HIPAA) | 124 | 100% | HIPAA locks, PHI, encryption, RBAC |
|
|
669
778
|
| Auth & Crypto | 114 | 100% | API keys, RBAC, AES-256 encryption |
|
|
670
|
-
|
|
|
671
|
-
|
|
|
779
|
+
| John (Indie Dev Journey) | 86 | 100% | 8-session Bolt.new build with 5 locks |
|
|
780
|
+
| Diff-Native Review | 76 | 100% | Interface breaks, schema changes, API impact |
|
|
781
|
+
| Patch Gateway | 57 | 100% | ALLOW/WARN/BLOCK verdicts, blast radius |
|
|
672
782
|
| Compliance Export | 50 | 100% | SOC 2, HIPAA, CSV formats |
|
|
673
|
-
|
|
|
674
|
-
|
|
|
783
|
+
| Enforcement | 40 | 100% | Hard/advisory mode, overrides |
|
|
784
|
+
| Audit Chain | 35 | 100% | HMAC-SHA256 chain integrity |
|
|
675
785
|
| Code Graph | 33 | 100% | Import parsing, blast radius, lock mapping |
|
|
676
|
-
|
|
|
677
|
-
|
|
|
678
|
-
|
|
|
679
|
-
|
|
|
786
|
+
| Spec Compiler | 24 | 100% | NL→constraints parsing, auto-apply |
|
|
787
|
+
| Typed Constraints | 13 | 100% | Numerical, range, state, temporal validation |
|
|
788
|
+
| Claude Regression | 9 | 100% | Vue detection, safe-intent, patch gateway |
|
|
789
|
+
| Question Framing | 9 | 100% | "What if we..." and "How hard would it be..." |
|
|
790
|
+
| REST API v2 | 9 | 100% | Typed constraint endpoints, SSE |
|
|
791
|
+
| PII/Export Detection | 8 | 100% | SSN, email export, data access violations |
|
|
792
|
+
| **Total** | **929** | **100%** | **18 suites, 15+ domains** |
|
|
680
793
|
|
|
681
|
-
|
|
794
|
+
**External validation:** Claude's independent 7-suite adversarial test battery — **100/100 (100%)** on v5.3.0. Zero false positives. Zero missed violations. 15.7ms per check.
|
|
795
|
+
|
|
796
|
+
Tested across: fintech, e-commerce, IoT, healthcare, SaaS, gaming, biotech, aerospace, payments, payroll, robotics, autonomous systems, telecom, insurance, government. All 11 Indian payment gateways detected. Zero false positives on UI/cosmetic actions.
|
|
682
797
|
|
|
683
798
|
---
|
|
684
799
|
|
|
@@ -712,8 +827,13 @@ Issues and PRs welcome on [GitHub](https://github.com/sgroy10/speclock).
|
|
|
712
827
|
|
|
713
828
|
## Author
|
|
714
829
|
|
|
715
|
-
|
|
830
|
+
**SpecLock** is created and maintained by **[Sandeep Roy](https://github.com/sgroy10)**.
|
|
831
|
+
|
|
832
|
+
Sandeep Roy is the sole developer of SpecLock — the AI Constraint Engine that enforces project rules across AI coding sessions. All 46 MCP tools, the semantic conflict detection engine, enterprise security features (SOC 2, HIPAA, RBAC, encryption), and the pre-publish test gate were designed and built by Sandeep Roy.
|
|
833
|
+
|
|
834
|
+
- GitHub: [@sgroy10](https://github.com/sgroy10)
|
|
835
|
+
- npm: [speclock](https://www.npmjs.com/package/speclock)
|
|
716
836
|
|
|
717
837
|
---
|
|
718
838
|
|
|
719
|
-
<p align="center"><i>v5.
|
|
839
|
+
<p align="center"><i>SpecLock v5.3.0 — Developed by Sandeep Roy — 929 tests, 100% pass rate, 46 MCP tools, Universal Rules Sync, Incident Replay, AI Patch Firewall, Spec Compiler, Code Graph, Typed Constraints, Python SDK, ROS2, REST API v2. Because remembering isn't enough.</i></p>
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
"name": "speclock",
|
|
4
4
|
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.3.0",
|
|
6
6
|
|
|
7
|
-
"description": "AI Constraint Engine
|
|
7
|
+
"description": "AI Constraint Engine by Sandeep Roy — Universal Rules Sync (one command syncs constraints to Cursor, Claude Code, Copilot, Windsurf, Gemini, Aider, AGENTS.md). AI Patch Firewall, diff-native review, Patch Gateway (ALLOW/WARN/BLOCK), Spec Compiler (NL→constraints), Code Graph (blast radius), Typed constraints, REST API v2, Python SDK, ROS2 integration. 46 MCP tools, Gemini LLM hybrid, HMAC audit chain, RBAC, encryption, SOC 2/HIPAA compliance. Developed by Sandeep Roy.",
|
|
8
8
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
|
|
@@ -12,91 +12,133 @@
|
|
|
12
12
|
|
|
13
13
|
"bin": {
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
"speclock": "./bin/speclock.js"
|
|
16
17
|
|
|
17
18
|
},
|
|
18
19
|
|
|
19
20
|
"scripts": {
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
|
|
23
|
+
"start": "node src/mcp/server.js",
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
|
|
26
|
+
"serve": "node src/mcp/server.js",
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
"test": "node tests/pre-publish-gate.mjs",
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
"prepublishOnly": "node tests/pre-publish-gate.mjs"
|
|
26
33
|
|
|
27
34
|
},
|
|
28
35
|
|
|
29
36
|
"keywords": [
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
|
|
39
|
+
"mcp",
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
|
|
42
|
+
"mcp-server",
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
|
|
45
|
+
"ai",
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
|
|
48
|
+
"ai-memory",
|
|
38
49
|
|
|
39
|
-
|
|
50
|
+
|
|
51
|
+
"ai-continuity",
|
|
40
52
|
|
|
41
|
-
|
|
53
|
+
|
|
54
|
+
"context",
|
|
42
55
|
|
|
43
|
-
|
|
56
|
+
|
|
57
|
+
"memory",
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
|
|
60
|
+
"claude",
|
|
46
61
|
|
|
47
|
-
|
|
62
|
+
|
|
63
|
+
"claude-code",
|
|
48
64
|
|
|
49
|
-
|
|
65
|
+
|
|
66
|
+
"cursor",
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
|
|
69
|
+
"codex",
|
|
52
70
|
|
|
53
|
-
|
|
71
|
+
|
|
72
|
+
"windsurf",
|
|
54
73
|
|
|
55
|
-
|
|
74
|
+
|
|
75
|
+
"cline",
|
|
56
76
|
|
|
57
|
-
|
|
77
|
+
|
|
78
|
+
"speclock",
|
|
58
79
|
|
|
59
|
-
|
|
80
|
+
|
|
81
|
+
"ai-amnesia",
|
|
60
82
|
|
|
61
|
-
|
|
83
|
+
|
|
84
|
+
"model-context-protocol",
|
|
62
85
|
|
|
63
|
-
|
|
86
|
+
|
|
87
|
+
"drift-detection",
|
|
64
88
|
|
|
65
|
-
|
|
89
|
+
|
|
90
|
+
"constraint-enforcement",
|
|
66
91
|
|
|
67
|
-
|
|
92
|
+
|
|
93
|
+
"enterprise",
|
|
68
94
|
|
|
69
|
-
|
|
95
|
+
|
|
96
|
+
"soc2",
|
|
70
97
|
|
|
71
|
-
|
|
98
|
+
|
|
99
|
+
"hipaa",
|
|
72
100
|
|
|
73
|
-
|
|
101
|
+
|
|
102
|
+
"compliance",
|
|
74
103
|
|
|
75
|
-
|
|
104
|
+
|
|
105
|
+
"audit-trail",
|
|
76
106
|
|
|
77
|
-
|
|
107
|
+
|
|
108
|
+
"hmac",
|
|
78
109
|
|
|
79
|
-
|
|
110
|
+
|
|
111
|
+
"encryption",
|
|
80
112
|
|
|
81
|
-
|
|
113
|
+
|
|
114
|
+
"aes-256",
|
|
82
115
|
|
|
83
|
-
|
|
116
|
+
|
|
117
|
+
"api-key",
|
|
84
118
|
|
|
85
|
-
|
|
119
|
+
|
|
120
|
+
"authentication",
|
|
86
121
|
|
|
87
|
-
|
|
122
|
+
|
|
123
|
+
"rbac",
|
|
88
124
|
|
|
89
|
-
|
|
125
|
+
|
|
126
|
+
"policy-as-code",
|
|
90
127
|
|
|
91
|
-
|
|
128
|
+
|
|
129
|
+
"sso",
|
|
92
130
|
|
|
93
|
-
|
|
131
|
+
|
|
132
|
+
"oauth",
|
|
94
133
|
|
|
95
|
-
|
|
134
|
+
|
|
135
|
+
"oidc",
|
|
96
136
|
|
|
97
|
-
|
|
137
|
+
|
|
138
|
+
"dashboard",
|
|
98
139
|
|
|
99
|
-
|
|
140
|
+
|
|
141
|
+
"telemetry"
|
|
100
142
|
|
|
101
143
|
],
|
|
102
144
|
|
|
@@ -108,79 +150,212 @@
|
|
|
108
150
|
|
|
109
151
|
"bugs": {
|
|
110
152
|
|
|
111
|
-
|
|
153
|
+
|
|
154
|
+
"url": "https://github.com/sgroy10/speclock/issues"
|
|
112
155
|
|
|
113
156
|
},
|
|
114
157
|
|
|
115
158
|
"repository": {
|
|
116
159
|
|
|
117
|
-
|
|
160
|
+
|
|
161
|
+
"type": "git",
|
|
118
162
|
|
|
119
|
-
|
|
163
|
+
|
|
164
|
+
"url": "git+https://github.com/sgroy10/speclock.git"
|
|
120
165
|
|
|
121
166
|
},
|
|
122
167
|
|
|
123
168
|
"engines": {
|
|
124
169
|
|
|
125
|
-
|
|
170
|
+
|
|
171
|
+
"node": ">=18"
|
|
126
172
|
|
|
127
173
|
},
|
|
128
174
|
|
|
129
175
|
"dependencies": {
|
|
130
176
|
|
|
131
|
-
|
|
177
|
+
|
|
178
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
132
179
|
|
|
133
|
-
|
|
180
|
+
|
|
181
|
+
"chokidar": "^3.6.0",
|
|
134
182
|
|
|
135
|
-
|
|
183
|
+
|
|
184
|
+
"zod": "^3.25.0"
|
|
136
185
|
|
|
137
186
|
},
|
|
138
187
|
|
|
139
188
|
"files": [
|
|
140
189
|
|
|
141
|
-
|
|
190
|
+
|
|
191
|
+
"bin/",
|
|
142
192
|
|
|
143
|
-
|
|
193
|
+
|
|
194
|
+
"src/",
|
|
144
195
|
|
|
145
|
-
|
|
196
|
+
|
|
197
|
+
"src/dashboard/",
|
|
146
198
|
|
|
147
|
-
|
|
199
|
+
|
|
200
|
+
"README.md",
|
|
148
201
|
|
|
149
|
-
|
|
202
|
+
|
|
203
|
+
"SPECLOCK-INSTRUCTIONS.md",
|
|
150
204
|
|
|
151
|
-
|
|
205
|
+
|
|
206
|
+
"LICENSE"
|
|
152
207
|
|
|
153
208
|
],
|
|
154
209
|
|
|
155
210
|
"devDependencies": {
|
|
156
211
|
|
|
157
|
-
|
|
212
|
+
|
|
213
|
+
"esbuild": "^0.27.3",
|
|
158
214
|
|
|
159
|
-
|
|
215
|
+
|
|
216
|
+
"jest": "^30.2.0"
|
|
160
217
|
|
|
161
218
|
},
|
|
162
219
|
|
|
163
220
|
"speclock": {
|
|
164
221
|
|
|
165
|
-
|
|
222
|
+
|
|
223
|
+
"active": true,
|
|
166
224
|
|
|
167
|
-
|
|
225
|
+
|
|
226
|
+
"message": "STOP — This project has SpecLock constraints. Read SPECLOCK.md and .speclock/context/latest.md BEFORE making ANY changes. Run 'npx speclock check' before ALL code changes. If a lock below is violated, STOP and ask user to unlock.",
|
|
168
227
|
|
|
169
|
-
|
|
228
|
+
|
|
229
|
+
"locks": [
|
|
170
230
|
|
|
171
|
-
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
"The /api/refine endpoint response must NOT exceed 5MB total JSON size. If GLB is larger than 3MB after decimation, return file URLs via /api/files/{filename} instead of base64. The browser WILL fail on 20MB+ JSON responses — this was proven when 16MB GLB caused \"Failed to fetch\".",
|
|
172
234
|
|
|
173
|
-
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
"Each Hitem3D run costs ~$2 USD. NEVER deploy untested code that touches the pipeline. Test every API endpoint with curl BEFORE asking user to test. Verify response sizes, status codes, and content. The user's time and money are at stake — treat every deploy as production.",
|
|
174
238
|
|
|
175
|
-
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
"Hitem3D settings: model=hitem3dv2.0, resolution=1536pro, face=2000000, request_type=1 (geometry only), format=2 (GLB). Submit+poll architecture — POST /api/generate-3d/submit returns task_id, GET /api/generate-3d/poll/{task_id} polls status. 15 min max poll. These settings are PROVEN WORKING — do not change.",
|
|
176
242
|
|
|
177
|
-
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
"NEVER make multiple changes at once. When fixing a bug, fix ONLY that one thing. Do not refactor, do not \"improve\" unrelated code, do not touch working prompts. Test the fix before deploying. One commit per fix.",
|
|
178
246
|
|
|
179
|
-
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
"Blender refine.py must NOT use voxel_remesh() or subdivide() — these destroy prong tips and stone seat detail. Hitem3D 2M face output has enough detail. Blender only does: scale to mm → light cleanup (remove doubles, fix normals) → sharpen edges → weighted normals → decimate to 100K faces → export STL + GLB.",
|
|
180
250
|
|
|
181
|
-
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
"Wax views must show OPEN THROUGH-HOLES at every stone position — not closed cups. You must see background through each hole. This is production jewelry CAD standard. The sketch prompt must ask for drilled through-holes, gold render must preserve them, wax must clone them exactly.",
|
|
182
254
|
|
|
183
|
-
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
"JewelCraft Grounding Pattern is MANDATORY. Pipeline: Photo → Pencil Sketch (same angle, through-holes not cups) → Gold Render (from sketch, holes preserved) → Wax Views (from gold render, exact material clone). Each stage feeds PREVIOUS stage's output image. NEVER send original photo to Hitem3D. NEVER skip grounding. NEVER fallback to original image.",
|
|
184
258
|
|
|
185
|
-
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
"Memory system: per-project auto-saved memory (goal, decisions, constraints, context). Stored in PostgreSQL project_memory table. Loaded into system prompt at every conversation turn. User can view/edit in Memory panel. Inspired by Claude memory + OpenClaw bootstrap injection.",
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
"SpecLock constraint engine MUST be baked into the codebase — not an external MCP call. Port the core semantics.js logic into the v3 codebase. Auto-detect constraints from conversation, enforce on every generation.",
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
"Built-in database for user apps: Railway PostgreSQL with schema-per-project isolation. User never sees connection strings or SQL. AI auto-provisions tables. Free tier: 1 project, 100MB.",
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
"VibeLock v3 is a CLEAN BUILD — zero bolt.diy code. Fresh Next.js 15, fresh components, fresh architecture. No copying from the bolt.diy fork. The v3 branch starts empty.",
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
"Railway environment variables are already set: DATABASE_URL (Railway PostgreSQL internal), DEEPSEEK_API_KEY, BETTER_AUTH_SECRET, BETTER_AUTH_URL, NEXT_PUBLIC_APP_URL, PORT=5173, NODE_ENV=production, DEFAULT_NUM_CTX=32768. OpenRouter API key is set via OPEN_ROUTER_API_KEY. Add new env vars via Railway GraphQL API or CLI: railway variables set KEY=VALUE.",
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
"DEPLOY PIPELINE: Code lives in github.com/sgroy10/vibelock branch v3. Railway project is \"captivating-tranquility\" (ID: ced04e82-b903-458d-9351-ac5944054e92), service ID: 439001ce-1854-454f-8b05-842fa925963f, environment ID: c2cb15c3-9a96-4854-a65c-c3aa0c3ee253. GitHub repo trigger IS connected — git push to the configured branch auto-deploys. Domain: www.vibelock.in. Railway CLI is installed and authenticated as sgroy10@gmail.com. To redeploy from git: use GraphQL mutation serviceInstanceRedeploy. To check deploy status: query deployments via GraphQL. NEVER waste time polling curl — check deploy status via API.",
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
"vibelock.in is the LIVE production domain, pointing to Railway project \"captivating-tranquility\". It runs the main branch (Remix/bolt.diy fork codebase). When anyone asks about vibelock.in, this is the codebase — NOT the v2 Next.js branch.",
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
"Auto-deploy pipeline: push to git → Railway auto-deploys → URL works. No manual railway up commands. Clean CI/CD from day one.",
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
"UI must be Apple-level polished — every pixel matters. Hermes brand colors (orange-black), subtle animations, beautiful typography, perfect spacing. First impressions are critical. No ugly scaffolds, no default gray UIs. Think Lovable/Orchid level branding but with our own identity.",
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
"ZERO bolt.diy code — this is a clean-room build. No copy-pasting from the fork. Fresh architecture, fresh components, fresh code. We learned our lesson from 10 hours of debugging someone else's mess.",
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
"Non-technical users must NEVER need to configure a database manually. Storage must work out of the box with zero configuration.",
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
"Preview experience must match or exceed Lovable/Bolt — responsive preview frames (mobile/tablet/desktop), new-tab preview, fast refresh, and eventually shareable preview links. The sandbox must feel polished and professional.",
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
"Rola (robotics layer) must NOT be rushed into production before the core platform (app creation + SpecLock + multilingual + design quality) is rock solid. Stage 4 per vision timeline.",
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
"Never expose SpecLock complexity to normal users — its power should be FELT (safety, continuity, nothing breaks) more than explained. No jargon, no constraint IDs, no JSON. Just trust.",
|
|
186
314
|
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
"VibeLock is NOT a Bolt clone — we are constraint-first, multilingual, and robotics-capable. Every product decision must answer: \"Does this move VibeLock closer to becoming the trusted platform for multilingual natural-language creation of apps, agents, devices, and robot behaviors?\"",
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
"Multilingual is NOT just translation — the AI must understand cultural context, respond in the user's language naturally, generate UI labels in the user's language, and make non-English speakers feel first-class. Support Gujarati, Hindi, Spanish, English at minimum, with universal language detection for any language.",
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
"SpecLock MUST be automatic and invisible to non-technical users — constraints detected from natural conversation, locked silently, protection felt but not explained. Power users can see the constraint dashboard. No manual setup required.",
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
"Every generated app MUST look beautiful by default — modern typography, gradient accents, micro-interactions, proper spacing, responsive design. A todo app must have a stunning landing page. No ugly scaffolds. Design quality is a core differentiator.",
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
"ZERO bolt.diy branding anywhere — no \"bolt\" in user-facing UI, page titles, meta tags, social previews, or marketing. Internal code references (CSS variables, artifact tags) must be migrated to vibelock namespace.",
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
"Never commit code changes without bumping the version number. Every code change that touches src/ files requires a patch version bump before commit.",
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
"Never push code to git without completing the full release checklist: (1) bump version in ALL 7 files (package.json, http-server.js, server.js, compliance.js, cli/index.js, dashboard/index.html x2), (2) npm publish, (3) git commit, (4) git push, (5) git tag vX.Y.Z, (6) git push origin tag, (7) railway up, (8) curl health to verify version. All 8 steps are mandatory — skipping any step is a violation.",
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
"Never modify authentication files without security review",
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
"No breaking changes to public API"
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
],
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
"context": ".speclock/context/latest.md",
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
"rules": "SPECLOCK.md"
|
|
359
|
+
|
|
360
|
+
}
|
|
361
|
+
}
|