@chrisdudek/yg 2.12.0 → 4.0.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.
@@ -0,0 +1,12 @@
1
+ # yg-architecture.yaml — Schema for architecture constraints
2
+ # File: .yggdrasil/yg-architecture.yaml
3
+ # Defines node types with architectural constraints.
4
+ # All properties except description are optional — absence means no enforcement.
5
+
6
+ node_types:
7
+ <type-id>:
8
+ description: <string> # required — what this type is for
9
+ aspects: [<aspect-id>] # optional — required on every file of this type
10
+ parents: [<type-id>] # optional — allowed parent types
11
+ relations: # optional — allowed relation targets
12
+ <relation-type>: [<type-id>] # calls | uses | extends | implements | emits | listens
@@ -7,7 +7,3 @@
7
7
  name: CrossCuttingRequirementName # required — display name
8
8
  description: "Short description for discovery via yg aspects" # optional
9
9
  # implies: [other-aspect, another-aspect] # optional — other aspect identifiers included automatically (recursive, must be acyclic)
10
- # stability: protocol # optional — schema | protocol | implementation
11
- # schema = enforced by data model (most stable)
12
- # protocol = enforced by convention/contract
13
- # implementation = specific mechanism (least stable, review after any code change)
@@ -2,36 +2,26 @@
2
2
  # Located at .yggdrasil/yg-config.yaml — one per project.
3
3
  # Edit this after running yg init to describe your project.
4
4
 
5
- version: "2.0.0" # managed by CLI — do not edit manually. Tracks the CLI version
6
- # that created or last migrated this config. Used by the migration
7
- # system to determine which migrations to run on upgrade.
5
+ version: "4.0.0" # managed by CLI — do not edit manually. Tracks the CLI version
6
+ # that last initialized or upgraded this config.
8
7
 
9
- name: "My Project" # requiredproject display name
8
+ quality: # optionalquality thresholds
9
+ max_direct_relations: 10 # maximum outgoing relations per node (warning if above)
10
+ max_mapping_source_files: 10 # maximum source files per node (warning if above, for nodes with aspects)
10
11
 
11
- node_types: # requirednon-empty object of node type definitions
12
- module: # key = type name used in yg-node.yaml
13
- description: "Business logic unit with clear domain responsibility"
14
- # required_aspects: [] # optional — aspects every node of this type must have
15
- service:
16
- description: "Component providing functionality to other nodes"
17
- library:
18
- description: "Shared utility code with no domain knowledge"
12
+ parallel: 1 # optionalconcurrency limit for batch approve (positive integer, default: 1)
19
13
 
20
- artifacts: # requiredartifact type definitions
21
- responsibility.md: # key = filename in node directories
22
- required: always # always | never | { when: <condition> }
23
- description: "What this node is responsible for, and what it is not"
24
- included_in_relations: true # true = included in dependency context packages
25
- interface.md:
26
- required:
27
- when: has_incoming_relations # conditions: has_incoming_relations, has_outgoing_relations, has_aspect:<id>
28
- description: "Public API — methods, parameters, return types, contracts"
29
- included_in_relations: true
30
- # Additional artifact types: logic.md, constraints.md, errors.md, model.md, state.md, decisions.md
14
+ debug: false # optionalwhen true, appends all command output to .yggdrasil/.debug.log
15
+ # Default: false (off). Log is append-only; rotate or delete manually.
31
16
 
32
- quality: # optionalquality thresholds
33
- min_artifact_length: 50 # minimum characters for an artifact (warning if below)
34
- max_direct_relations: 10 # maximum outgoing relations per node (warning if above)
35
- context_budget: # token budget for context packages
36
- warning: 10000 # tokens — warning threshold
37
- error: 20000 # tokens — error threshold (suggests splitting)
17
+ reviewer: # requiredaspect verification during yg approve
18
+ active: ollama # required when multiple providers configured
19
+ consensus: 1 # positive odd integer >= 1 (3+ for majority vote)
20
+ ollama: # provider-specific config
21
+ model: "qwen3.5:9b" # model ID
22
+ endpoint: "http://localhost:11434" # custom endpoint
23
+ temperature: 0 # reduces variability — keep at 0
24
+ max_tokens: auto # auto = query provider, or explicit number
25
+ context_length_field: "" # ollama model_info key for context window size
26
+ claude-code: # alternative provider — uses claude CLI subprocess
27
+ model: haiku # haiku, sonnet, or opus
@@ -1,6 +1,5 @@
1
1
  # yg-flow.yaml — Schema for end-to-end business flows
2
- # Each flow is a directory under .yggdrasil/flows/ containing this file
3
- # plus description.md with required sections (see rules).
2
+ # Each flow is a directory under .yggdrasil/flows/ containing this file.
4
3
 
5
4
  name: EndToEndProcessName # required — display name
6
5
  description: "Short description of this business process" # optional
@@ -1,27 +1,23 @@
1
1
  # yg-node.yaml — Schema for model nodes
2
- # Every node is a directory under .yggdrasil/model/ containing this file
3
- # plus artifact .md files defined in yg-config.yaml.
2
+ # Every node is a directory under .yggdrasil/model/ containing this file.
4
3
 
5
4
  name: ComponentName # required — display name
6
- type: service # required — must match a type from config.node_types
5
+ type: service # required — must match a type from yg-architecture.yaml
7
6
  description: "Short description of what this node does" # optional
8
- blackbox: false # optional, default false — if true, coarse-grained coverage without deep artifacts
9
7
 
10
- aspects: # optional — list of aspect configurations
11
- - aspect: aspect-id # required — aspect identifier (directory path under aspects/)
12
- exceptions: # optional — how this node deviates from the aspect's pattern
13
- - "Description of deviation and why"
14
- anchors: # optional — code patterns for aspect staleness detection
15
- - functionName # yg validate checks each pattern exists in mapped source files (W014)
16
- - CONSTANT_NAME
8
+ aspects: # optional — list of aspect identifiers
9
+ - aspect-id # aspect directory name under aspects/
10
+
11
+ ports: # optional named entry points with required aspects (on target nodes)
12
+ port-name:
13
+ description: "What this port provides" # required
14
+ aspects: [aspect-id] # required — aspects consumers must satisfy
17
15
 
18
16
  relations: # optional — outgoing dependencies to other nodes
19
17
  - target: other/module-path # required — path relative to model/
20
18
  type: calls # required — calls | uses | extends | implements | emits | listens
21
- consumes: [methodA, methodB] # optional — what is consumed from target
22
- failure: 'retry 3x, then circuit-break' # optional — failure handling strategy
23
- # event_name: OrderPlaced # optional — display name for event relations (emits, listens)
19
+ consumes: [port-name] # optional — port names consumed from target (required when target has ports)
24
20
 
25
- mapping: # optional — link to source files for ownership and drift detection
26
- paths: # required when mapping is present — list of file or directory paths
27
- - src/modules/component/ # paths are relative to repository root
21
+ mapping: # optional — flat list of source file or directory paths
22
+ - src/modules/component/ # paths are relative to repository root
23
+ - src/modules/component.ts
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@chrisdudek/yg",
3
- "version": "2.12.0",
4
- "description": "Make your repository self-aware. Persistent semantic memory and deterministic context assembly for AI agents.",
3
+ "version": "4.0.0",
4
+ "description": "Continuous architecture enforcement for AI-assisted development. Aspects, review, enforcement.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "yg": "dist/bin.js"
8
8
  },
9
9
  "files": [
10
- "dist/",
10
+ "dist/**/*.js",
11
+ "dist/**/*.d.ts",
11
12
  "graph-schemas/"
12
13
  ],
13
14
  "engines": {
@@ -18,6 +19,7 @@
18
19
  "dev": "tsup --watch",
19
20
  "test": "vitest run",
20
21
  "test:watch": "vitest",
22
+ "test:external": "vitest run --config vitest.external.config.ts",
21
23
  "test:coverage": "vitest run --coverage",
22
24
  "lint": "eslint src/",
23
25
  "lint:fix": "eslint src/ --fix",
@@ -26,13 +28,13 @@
26
28
  },
27
29
  "keywords": [
28
30
  "yggdrasil",
29
- "graph",
30
- "ai",
31
- "specification",
32
- "architecture",
31
+ "ai-agents",
32
+ "architecture-enforcement",
33
+ "code-review",
34
+ "ai-governance",
33
35
  "cli",
34
- "agent-commands",
35
- "code-generation"
36
+ "developer-tools",
37
+ "ai-coding"
36
38
  ],
37
39
  "author": "Krzysztof Dudek <me@chrisdudek.com>",
38
40
  "license": "MIT",
@@ -50,6 +52,7 @@
50
52
  "access": "public"
51
53
  },
52
54
  "dependencies": {
55
+ "@clack/prompts": "^1.2.0",
53
56
  "chalk": "^5.6.2",
54
57
  "commander": "^14.0.3",
55
58
  "ignore": "^7.0.5",
@@ -64,7 +67,7 @@
64
67
  "eslint": "^10.0.1",
65
68
  "prettier": "^3.8.1",
66
69
  "tsup": "^8.5.1",
67
- "typescript": "^5.9.3",
70
+ "typescript": "^6.0.2",
68
71
  "typescript-eslint": "^8.56.0",
69
72
  "vitest": "^4.0.18"
70
73
  }