Skip to content

Commit edcd4d6

Browse files
gmoonclaude
andcommitted
Trim SKILL.md and prompt templates — reference CLI instead of duplicating
Replace static node/edge type tables and command examples with references to lattice help concepts, lattice help workflows, and lattice --json. Keep only behavioral rules (editing policy, workflow, gap filing) that the CLI can't teach. 266 lines → 122 lines (54% reduction). No more manual updates needed when node types or edge types change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e47b954 commit edcd4d6

3 files changed

Lines changed: 25 additions & 169 deletions

File tree

prompts/LATTICE_CLAUDE_MD.md

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ This project uses [Lattice](https://github.com/forkzero/lattice) for knowledge c
55
## Quick Reference
66

77
```bash
8-
lattice summary # Status overview (nodes, resolution, drift)
8+
lattice summary # Status overview
99
lattice health # Unified PASS/WARN/FAIL health check
10-
lattice list requirements # All requirements
11-
lattice list messages # All messages
12-
lattice get REQ-XXX-001 # Full details with edges
13-
lattice search -q "keyword" # Text search
14-
lattice plan REQ-A REQ-B # Implementation order
15-
lattice drift # Check for stale edge bindings
1610
lattice help concepts # Node types, edge semantics, versioning
11+
lattice help workflows # Common task-oriented command sequences
12+
lattice help # Full grouped command list
1713
```
1814

1915
## When Working on Features
@@ -23,23 +19,6 @@ lattice help concepts # Node types, edge semantics, versioning
2319
3. **After completing**: `lattice resolve REQ-XXX-001 --verified`
2420
4. **Verify**: `lattice drift` to confirm no stale edges
2521

26-
## Node Types
27-
28-
| Type | Purpose | ID Pattern |
29-
|------|---------|------------|
30-
| Source | Research/references | `SRC-XXX` |
31-
| Thesis | Strategic claims (can be `contested`) | `THX-XXX` |
32-
| Requirement | Specifications | `REQ-XXX-NNN` |
33-
| Implementation | Code bindings | `IMP-XXX-NNN` |
34-
| Message | Persona-specific claims | `MSG-XXX-NNN` |
35-
36-
## Key Edge Types
37-
38-
- `supported_by`, `derives_from`, `satisfies`, `depends_on` (traceability)
39-
- `reveals_gap_in`, `challenges`, `validates` (feedback)
40-
- `rebuts`, `concedes` (adversarial debate)
41-
- `grounded_in` (message → thesis)
42-
4322
## Resolution States
4423

4524
- `verified` - Implemented and tested

prompts/LATTICE_MCP_CLAUDE_MD.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,24 @@
11
# Lattice Integration (MCP)
22

3-
This project uses [Lattice](https://github.com/forkzero/lattice) for knowledge coordination via MCP. The `.lattice/` directory contains sources, theses, requirements, implementations, and messages connected by version-tracked edges.
3+
This project uses [Lattice](https://github.com/forkzero/lattice) for knowledge coordination via MCP.
44

55
## MCP Tools
66

77
| Tool | Purpose |
88
|------|---------|
9-
| `lattice_summary` | Status overview — nodes, resolution, drift, contested theses |
10-
| `lattice_search` | Find nodes by criteria (text, priority, resolution, tags) |
9+
| `lattice_summary` | Status overview — start here |
10+
| `lattice_search` | Find nodes by criteria |
1111
| `lattice_get` | Full node details with edges |
12-
| `lattice_list` | List nodes by type (sources, theses, requirements, implementations, messages) |
13-
| `lattice_resolve` | Mark requirement status (verified, blocked, deferred, wontfix) |
12+
| `lattice_list` | List nodes by type |
13+
| `lattice_resolve` | Mark requirement status |
1414
| `lattice_add_requirement` | Create new requirement |
1515
| `lattice_drift` | Check for stale edge bindings |
1616

17-
## Node Types
18-
19-
| Type | ID Pattern | Purpose |
20-
|------|-----------|---------|
21-
| Source | `SRC-*` | Research, papers, references |
22-
| Thesis | `THX-*` | Strategic claims (can be `contested`) |
23-
| Requirement | `REQ-*` | Testable specifications |
24-
| Implementation | `IMP-*` | Code that satisfies requirements |
25-
| Message | `MSG-*` | Persona-specific claims grounded in theses |
26-
2717
## Workflow
2818

2919
1. **Start**: `lattice_summary` for current state
3020
2. **Find work**: `lattice_search` with `resolution: "unresolved"`
3121
3. **Get details**: `lattice_get` for full specification
3222
4. **Complete**: `lattice_resolve` with `status: "verified"`
3323

34-
## Reference Requirements
35-
36-
When implementing features, note the requirement ID in commits:
37-
```
38-
Implements REQ-XXX-001
39-
```
24+
Reference requirement IDs in commits: `Implements REQ-XXX-001`

skills/lattice/SKILL.md

Lines changed: 16 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: lattice
3-
description: "Lattice knowledge graph integration. Use when working in a project with a .lattice/ directory — for requirements, theses, sources, implementations, drift detection, or lattice CLI commands."
3+
description: "Lattice knowledge graph integration. Use when working in a project with a .lattice/ directory — for requirements, theses, sources, implementations, messages, drift detection, or lattice CLI commands."
44
allowed-tools: Bash(lattice *), Bash(./target/release/lattice *), Bash(./target/debug/lattice *), Bash(gh issue *), Read, Grep, Glob
55
---
66

@@ -10,30 +10,14 @@ You have access to a **Lattice** knowledge graph in this project. The `.lattice/
1010

1111
The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY in this document are to be interpreted as described in RFC 2119.
1212

13-
## Quick Reference
13+
## Discovery
1414

1515
```bash
16-
# Health & Analysis
17-
lattice summary # Status overview (counts, drift, messages, contested)
18-
lattice health # Unified PASS/WARN/FAIL verdict
19-
lattice health --check # CI gate — exits 2 on FAIL
20-
lattice drift # Check for stale edge bindings
21-
lattice freshness # Check if lattice is updated alongside code
22-
lattice assess # Change pressure (contested theses, drift)
23-
lattice lint # Structural issues
24-
lattice plan REQ-A REQ-B # Implementation order for requirements
25-
26-
# Query
27-
lattice list requirements # All requirements
28-
lattice list messages # All messages
29-
lattice get REQ-XXX-001 # Full node details with edges
30-
lattice search -q "keyword" # Text search (defaults to requirements)
31-
32-
# Modify
33-
lattice edit REQ-XXX --title "..." # Edit node fields (auto-bumps version)
34-
lattice add edge --from IMP-XXX --type satisfies --to REQ-XXX # Wire edges
35-
lattice remove edge --from IMP-XXX --type satisfies --to REQ-XXX
36-
lattice replace edge --from IMP-XXX --type satisfies --old-to REQ-OLD --new-to REQ-NEW
16+
lattice help # Grouped command list
17+
lattice help concepts # Node types, edge semantics, versioning, ID conventions
18+
lattice help workflows # Common task-oriented command sequences
19+
lattice <command> --help # Help for any specific command
20+
lattice --json --compact # Machine-readable command schema
3721
```
3822

3923
## Editing Rules
@@ -43,7 +27,7 @@ The CLI handles timestamps, version bumps, edge wiring, and ID validation.
4327

4428
If the CLI does not support a required operation, agents MAY edit `.lattice/` YAML files directly, but MUST run `lattice lint` immediately after to verify correctness.
4529

46-
If a CLI gap is found, agents SHOULD file an issue on `forkzero/lattice` describing the missing capability:
30+
If a CLI gap is found, agents SHOULD file an issue on `forkzero/lattice`:
4731
```bash
4832
gh issue create --repo forkzero/lattice \
4933
--title "CLI gap: <what's missing>" \
@@ -55,121 +39,29 @@ gh issue create --repo forkzero/lattice \
5539

5640
### Before Starting Work
5741
1. Run `lattice summary` to understand the current state
58-
2. Run `lattice plan` or `lattice search --priority P0 --resolution unresolved` to find what to work on
59-
3. Run `lattice get REQ-XXX` to read full requirement details before implementing
42+
2. Run `lattice health` to check overall lattice health
43+
3. Run `lattice plan` or `lattice search --priority P0 --resolution unresolved` to find what to work on
44+
4. Run `lattice get REQ-XXX` to read full requirement details before implementing
6045

6146
### While Working
6247
- Reference requirement IDs in commits: `Implements REQ-XXX-001`
6348
- Use `lattice get <ID> --format json` for structured data when you need to parse output
6449

6550
### After Completing Work
66-
- `lattice resolve REQ-XXX --verified` to mark requirements as done
67-
- `lattice verify IMP-XXX satisfies REQ-XXX --tests-pass` to record satisfaction evidence
68-
- If you implemented a new feature, add matching requirement(s) and resolve them as verified
69-
- `lattice edit IMP-XXX --body "updated description" --files "src/new.rs,src/lib.rs" --test-command "cargo test"` to update implementation nodes
70-
- `lattice add edge --from IMP-XXX --type satisfies --to REQ-XXX` to wire new edges
71-
- Run `lattice drift` to confirm no unresolved drift
51+
1. `lattice resolve REQ-XXX --verified` to mark requirements as done
52+
2. `lattice verify IMP-XXX satisfies REQ-XXX --tests-pass` to record satisfaction evidence
53+
3. `lattice edit IMP-XXX --files "src/new.rs" --test-command "cargo test"` to update implementation nodes
54+
4. `lattice add edge --from IMP-XXX --type satisfies --to REQ-XXX` to wire new edges
55+
5. Run `lattice drift` to confirm no unresolved drift
7256

7357
### If Gaps Are Found
7458
- `lattice refine REQ-XXX --gap-type missing_requirement --title "..." --description "..."` to create sub-requirements
7559
- `lattice add edge --from IMP-XXX --type reveals_gap_in --to REQ-XXX --rationale "..."` to record feedback
7660

77-
## Node Types
78-
79-
| Type | ID Pattern | Purpose |
80-
|------|-----------|---------|
81-
| Source | `SRC-XXX` | Research, papers, references |
82-
| Thesis | `THX-XXX` | Strategic claims backed by sources (can be `contested`) |
83-
| Requirement | `REQ-XXX-NNN` | Testable specifications derived from theses |
84-
| Implementation | `IMP-XXX-NNN` | Code that satisfies requirements |
85-
| Message | `MSG-XXX-NNN` | Persona-specific claims grounded in theses |
86-
87-
## Edge Types
88-
89-
| Edge | Direction | Meaning |
90-
|------|----------|---------|
91-
| `supported_by` | Thesis → Source | Evidence backing a claim |
92-
| `derives_from` | Requirement → Thesis | Specification from strategy |
93-
| `satisfies` | Implementation → Requirement | Code fulfills spec |
94-
| `depends_on` | Requirement → Requirement | Dependency ordering |
95-
| `reveals_gap_in` | Implementation → Requirement/Thesis | Discovered underspecification |
96-
| `challenges` | Any → Thesis | Contradictory evidence |
97-
| `validates` | Implementation → Thesis | Confirming evidence |
98-
| `rebuts` | Thesis → Thesis | Adversarial debate — direct counter-argument |
99-
| `concedes` | Thesis → Thesis | Partial agreement in debate |
100-
| `grounded_in` | Message → Thesis | Messaging claim traces to strategic position |
101-
102-
## Resolution States
103-
104-
- `verified` — Implemented and tested
105-
- `blocked` — Waiting on external dependency (with reason)
106-
- `deferred` — Postponed to later milestone (with reason)
107-
- `wontfix` — Rejected or out of scope (with reason)
108-
109-
## Adding Nodes
110-
111-
```bash
112-
lattice add requirement \
113-
--id REQ-FEAT-001 --title "Short description" \
114-
--body "Detailed specification" --priority P1 \
115-
--category FEAT --derives-from THX-XXX --created-by "agent:claude"
116-
117-
lattice add thesis \
118-
--id THX-NEW --title "Claim" --body "Reasoning" \
119-
--category technical --supported-by SRC-XXX --created-by "agent:claude"
120-
121-
lattice add source \
122-
--id SRC-NEW --title "Reference" --body "Summary" \
123-
--url "https://..." --created-by "agent:claude"
124-
125-
lattice add implementation \
126-
--id IMP-FEAT-001 --title "Feature implementation" \
127-
--body "Description of what was implemented" \
128-
--language rust --files "src/main.rs,src/lib.rs" \
129-
--test-command "cargo test" --satisfies REQ-FEAT-001 \
130-
--created-by "agent:claude"
131-
132-
lattice add message \
133-
--id MSG-DEV-001 --title "Zero infrastructure" \
134-
--body "File-based YAML, no servers needed" \
135-
--persona developer --grounded-in THX-XXX \
136-
--created-by "agent:claude"
137-
138-
lattice add edge \
139-
--from IMP-XXX --type validates --to THX-XXX \
140-
--rationale "Implementation confirms thesis"
141-
```
142-
143-
## Managing Edges
144-
145-
```bash
146-
# Remove an edge
147-
lattice remove edge --from IMP-XXX --type satisfies --to REQ-XXX
148-
149-
# Replace an edge target (retarget to a different node)
150-
lattice replace edge --from IMP-XXX --type satisfies \
151-
--old-to REQ-OLD --new-to REQ-NEW --rationale "Requirement was split"
152-
```
153-
154-
## Editing Nodes
155-
156-
```bash
157-
lattice edit REQ-XXX --title "New title" --body "New body"
158-
lattice edit REQ-XXX --priority P0 --tags "core,storage"
159-
lattice edit IMP-XXX --files "src/new.rs,src/lib.rs" --test-command "cargo test"
160-
lattice edit IMP-XXX --body "Updated description" --status active
161-
```
162-
163-
Agents MUST use `lattice edit` to modify existing nodes. The `edit` command auto-bumps the patch version and preserves all other fields. Type-specific flags: `--priority` (requirements only), `--files` and `--test-command` (implementations only).
164-
16561
## JSON Output
16662

16763
All read and write commands accept `--format json` for structured output. Use this when you need to parse results programmatically.
16864

169-
## Drift Detection
170-
171-
Edges are version-bound. When a node is updated, edges referencing the old version become stale. Run `lattice drift` to detect these. Use `lattice drift --check` in CI (exits non-zero on drift).
172-
17365
## Product Owner Agent
17466

17567
For backlog triage, strategic critique, and planning work, use the **product-owner** agent (`/product-owner`). It manages the lattice as persistent working memory for product strategy.

0 commit comments

Comments
 (0)