dotdog 0.1.0 → 0.1.4

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 (3) hide show
  1. package/README.md +76 -0
  2. package/dist/cli.js +2 -2
  3. package/package.json +16 -5
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # spec-platform
2
+
3
+ Monorepo for the Spec Platform — a knowledge graph system where specs ARE the database and LLMs ARE the query engine.
4
+
5
+ ## The Flywheel
6
+
7
+ ```
8
+ spec → validate → app → data → better spec → better app → ...
9
+ ```
10
+
11
+ The spec describes the platform. The platform validates the spec. The validation report improves the spec. Each cycle adds granularity.
12
+
13
+ ## Structure
14
+
15
+ ```
16
+ spec-platform/
17
+ ├── packages/
18
+ │ ├── spec-engine/ # Core types and ontology (shared by everything)
19
+ │ ├── spec-mcp/ # MCP Server — AI agents query specs via stdio
20
+ │ └── spec-cli/ # CLI — spec validate, init, simulate, list
21
+ ├── projects/ # Spec genomes (dogfooding)
22
+ │ └── spec-platform/
23
+ │ └── specs/
24
+ │ ├── SPEC.dog # Product spec — screens, flows, stories
25
+ │ ├── constitution.dog # Immutable rules
26
+ │ └── data-model.dog # Graph ontology — nodes, edges, tasks, predictions, vectors
27
+ ├── templates/ # Spec genome templates for new projects
28
+ └── package.json # Bun workspace root
29
+ ```
30
+
31
+ ## Quick Start
32
+
33
+ ```bash
34
+ bun install
35
+ cd projects/spec-platform/specs
36
+
37
+ # Validate our own spec (dogfood)
38
+ bun ../../../packages/spec-cli/src/index.ts validate ../..
39
+
40
+ # List projects
41
+ bun ../../../packages/spec-cli/src/index.ts list
42
+ ```
43
+
44
+ ## $0 Stack
45
+
46
+ | Component | Technology | Cost |
47
+ |-----------|-----------|------|
48
+ | Runtime | Bun | $0 |
49
+ | Database | bun:sqlite (embedded) | $0 |
50
+ | Types | TypeScript (strict) | $0 |
51
+ | CLI | Commander.js + chalk | $0 |
52
+ | MCP Server | @modelcontextprotocol/sdk (stdio) | $0 |
53
+ | Embeddings | all-MiniLM-L6-v2 (local) | $0 |
54
+ | Hosting | None needed (local-first) | $0 |
55
+
56
+ ## The Spec Graph
57
+
58
+ The spec is not a document. It's a knowledge graph.
59
+
60
+ - **Nodes**: entities, tasks, predictions, screens, constraints, user stories
61
+ - **Edges**: contains, depends_on, implements, references, calls, precedes
62
+ - **Vectors**: every section embedded for semantic search, contradiction detection, staleness checks
63
+ - **Predictions**: forecasts with triggers, timeframes, confidence, and actual outcome tracking
64
+
65
+ LLMs traverse the graph at query time. They don't read prose and guess — they get exact typed values.
66
+
67
+ ## Score
68
+
69
+ ```
70
+ spec validate → 43% complete
71
+
72
+ ✓ SPEC.dog
73
+ ✓ constitution.dog
74
+ ✓ data-model.dog
75
+ ⚠ COPY.dog, DESIGN-SYSTEM.dog, plan.dog, INDEX.dog
76
+ ```
package/dist/cli.js CHANGED
@@ -2893,7 +2893,6 @@ function parseInlineObject(value) {
2893
2893
  }
2894
2894
  return obj;
2895
2895
  }
2896
-
2897
2896
  // src/cli.ts
2898
2897
  function parseSections2(markdown) {
2899
2898
  const lines = markdown.split(`
@@ -2927,7 +2926,8 @@ function parseSections2(markdown) {
2927
2926
  return sections;
2928
2927
  }
2929
2928
  var program2 = new Command;
2930
- program2.name("spec").alias("dotdog").description("The spec dog — validate, analyze, generate .dog files").version("0.1.0");
2929
+ var pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
2930
+ program2.name("spec").alias("dotdog").description("The spec dog — validate, analyze, generate .dog files").version(pkg.version);
2931
2931
  program2.command("validate [dir]").action((d = ".") => {
2932
2932
  const dirs = [join(d, "projects"), join(d, "specs")];
2933
2933
  let found = false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dotdog",
3
- "version": "0.1.0",
4
- "description": "The spec dog validate, analyze, parse, and generate .dog spec genome files",
3
+ "version": "0.1.4",
4
+ "description": "The spec dog \u2014 validate, analyze, parse, and generate .dog spec genome files",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
7
7
  "bin": {
@@ -10,16 +10,27 @@
10
10
  },
11
11
  "files": [
12
12
  "dist/",
13
- "LICENSE",
14
13
  "README.md",
15
- "CHANGELOG.md"
14
+ "CHANGELOG.md",
15
+ "LICENSE"
16
+ ],
17
+ "keywords": [
18
+ "spec",
19
+ "dogfood",
20
+ "specification",
21
+ "ai",
22
+ "documentation",
23
+ "dotdog",
24
+ "dog"
16
25
  ],
17
- "keywords": ["spec", "dogfood", "specification", "ai", "documentation", "dotdog", "dog"],
18
26
  "license": "MIT",
19
27
  "author": "specdog",
20
28
  "repository": "github:specdog/spec",
21
29
  "dependencies": {
22
30
  "commander": "^15.0.0",
23
31
  "chalk": "^5.6.0"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
24
35
  }
25
36
  }