blob: 7831540faa8be146515c6dfb59fc1d721b2065bf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
---
name: makima-chain
description: Chain commands for makima multi-contract orchestration. Use when running chains of contracts defined in YAML, checking chain status, or managing contract dependencies.
---
# Makima Chain Commands
Chains are DAGs (directed acyclic graphs) of contracts that work together. Contracts can depend on each other and run in parallel when no dependencies exist.
Environment variables (`MAKIMA_API_URL`, `MAKIMA_API_KEY`) must be set.
## Running Chains
### Run chain from YAML
```bash
makima chain run <yaml_file>
```
Parses the chain definition, validates the DAG, and creates contracts.
Options:
- `--dry-run` - Validate and preview without creating
### Validate chain YAML
```bash
makima chain validate <yaml_file>
```
Checks syntax and validates DAG structure (no cycles).
### Preview chain
```bash
makima chain preview <yaml_file>
```
Shows execution order and contract details without creating.
## Chain Status
### Get chain status
```bash
makima chain status <chain_id>
```
### List all chains
```bash
makima chain list
```
Options:
- `--status <active|completed|archived>` - Filter by status
- `--limit <n>` - Limit results (default: 50)
### List contracts in chain
```bash
makima chain contracts <chain_id>
```
### Display ASCII DAG visualization
```bash
makima chain graph <chain_id>
```
Options:
- `--with-status` - Show contract status in visualization
## Chain Management
### Archive chain
```bash
makima chain archive <chain_id>
```
Marks chain as archived (does not delete contracts).
## Chain YAML Format
```yaml
name: my-chain
description: Optional description
repository_url: https://github.com/org/repo
contracts:
- name: setup
contract_type: implementation
description: Initial setup work
- name: feature-a
contract_type: implementation
depends_on: [setup]
description: Implement feature A
- name: feature-b
contract_type: implementation
depends_on: [setup]
description: Implement feature B (parallel with A)
- name: integration
contract_type: review
depends_on: [feature-a, feature-b]
description: Integrate and test
```
## Output Format
All commands output JSON to stdout.
Example workflow:
```bash
# Validate before running
makima chain validate my-chain.yaml
# Preview execution
makima chain preview my-chain.yaml
# Run the chain
chain_id=$(makima chain run my-chain.yaml | jq -r '.chainId')
# Monitor progress
makima chain status "$chain_id"
makima chain graph "$chain_id" --with-status
```
|