@synsci/thesis 0.1.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/LICENSE +21 -0
- package/README.md +46 -0
- package/bin/thesis.mjs +6 -0
- package/package.json +50 -0
- package/skills/thesis/SKILL.md +58 -0
- package/skills/thesis/getting-started/quickstart.md +209 -0
- package/skills/thesis/getting-started/tutorial-overview.md +220 -0
- package/skills/thesis/reference/command-presets.md +273 -0
- package/skills/thesis/reference/experiment-design-protocol.md +200 -0
- package/skills/thesis/reference/thesis-mcp-tool-map.md +201 -0
- package/src/agents.mjs +259 -0
- package/src/cli.mjs +1111 -0
- package/src/mcp-writer.mjs +441 -0
- package/src/setup-auth.mjs +548 -0
- package/src/skill-installer.mjs +467 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Synthetic Sciences
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @synsci/thesis
|
|
2
|
+
|
|
3
|
+
**Thesis by Synthetic Sciences** — graph-based research management.
|
|
4
|
+
Structure your research. Let agents do the rest.
|
|
5
|
+
|
|
6
|
+
## Quick Setup
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx --yes @synsci/thesis setup
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
This will:
|
|
13
|
+
1. Detect your installed AI hosts (Claude Code, Codex, Cursor, OpenCode, etc.)
|
|
14
|
+
2. Open your browser to authenticate
|
|
15
|
+
3. Configure MCP connections for all detected hosts
|
|
16
|
+
|
|
17
|
+
### Remote Setup (SSH)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx --yes @synsci/thesis setup \
|
|
21
|
+
--auth-mode device \
|
|
22
|
+
--base-url https://thesis.syntheticsciences.ai
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Uninstall
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx --yes @synsci/thesis uninstall
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Web Connector Hosts (Claude.ai, ChatGPT.com)
|
|
32
|
+
|
|
33
|
+
For web-based MCP hosts, use the URL when prompted:
|
|
34
|
+
```
|
|
35
|
+
https://thesis.syntheticsciences.ai/mcp-server
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## What is Thesis?
|
|
39
|
+
|
|
40
|
+
Thesis is "git for research" — a graph-based system for tracking research work, decisions, and evidence. Agents and researchers collaborate through a DAG of nodes, where each node represents an observation or experiment.
|
|
41
|
+
|
|
42
|
+
- **MCP-first**: Works with any MCP host (Claude Code, Codex, Cursor, OpenCode, etc.)
|
|
43
|
+
- **63 tools**: Full node lifecycle, artifact management, compute provisioning, collaboration
|
|
44
|
+
- **Graph structure**: Branch, merge, and iterate on ideas like code
|
|
45
|
+
|
|
46
|
+
[thesis.syntheticsciences.ai](https://thesis.syntheticsciences.ai)
|
package/bin/thesis.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@synsci/thesis",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Thesis by Synthetic Sciences — graph-based research management. One-command MCP setup.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"thesis": "./bin/thesis.mjs"
|
|
8
|
+
},
|
|
9
|
+
"main": "src/cli.mjs",
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/",
|
|
12
|
+
"src/",
|
|
13
|
+
"skills/",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"thesis",
|
|
19
|
+
"mcp",
|
|
20
|
+
"research",
|
|
21
|
+
"experiment-tracking",
|
|
22
|
+
"dag",
|
|
23
|
+
"ai-agents",
|
|
24
|
+
"synthetic-sciences"
|
|
25
|
+
],
|
|
26
|
+
"author": "Synthetic Sciences",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/synthetic-sciences/thesis"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://thesis.syntheticsciences.ai",
|
|
33
|
+
"scripts": {
|
|
34
|
+
"test": "node --test tests/*.test.mjs"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"commander": "^13.0.0",
|
|
38
|
+
"inquirer": "^12.0.0",
|
|
39
|
+
"ora": "^8.0.0",
|
|
40
|
+
"picocolors": "^1.0.0",
|
|
41
|
+
"open": "^10.0.0",
|
|
42
|
+
"js-yaml": "^4.1.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thesis
|
|
3
|
+
description: Use for Thesis experiment design, turning source material into Thesis graphs, staged frontier planning with `/lookahead`, budgeted autonomous research with `/fsd`, MCP-assisted execution, and platform setup/troubleshooting across supported hosts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Thesis Skill
|
|
7
|
+
|
|
8
|
+
Use this skill to structure research work and to route setup/support questions to the smallest relevant Thesis docs.
|
|
9
|
+
|
|
10
|
+
## When To Use
|
|
11
|
+
|
|
12
|
+
Use this skill when the conversation is about any of the following:
|
|
13
|
+
|
|
14
|
+
- planning experiments, hypotheses, comparisons, or next-branch decisions
|
|
15
|
+
- turning source material into a Thesis graph
|
|
16
|
+
- using command-like Thesis workflows such as `/to-graph`, `/reproduce`,
|
|
17
|
+
`/lookahead`, or `/fsd`
|
|
18
|
+
- running or interpreting empirical work in Thesis
|
|
19
|
+
- choosing between `insight` and `empirical` nodes
|
|
20
|
+
- setting up, updating, authenticating, or troubleshooting Thesis MCP
|
|
21
|
+
- managed compute, local hardware, campaigns, or Thesis Web UI navigation
|
|
22
|
+
|
|
23
|
+
If the request is ambiguous, default to experiment-design guidance before platform mechanics.
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
1. Classify the request as research guidance, platform support, or mixed.
|
|
28
|
+
2. Load only the minimum files needed for the current task.
|
|
29
|
+
3. If the user is using command-like language such as `/to-graph`,
|
|
30
|
+
`/reproduce`, `/lookahead`, or `/fsd`, load
|
|
31
|
+
`reference/command-presets.md` first.
|
|
32
|
+
4. For research requests, run a short design pass before execution:
|
|
33
|
+
ask 1-2 questions to clarify objective, assumptions, and decision criteria.
|
|
34
|
+
5. If design is solid and the user wants to proceed, shift to execution support.
|
|
35
|
+
6. Use Thesis MCP tools for live behavior/contract checks when available.
|
|
36
|
+
7. Summarize evidence and propose the most likely next branch.
|
|
37
|
+
|
|
38
|
+
## Routing Map
|
|
39
|
+
|
|
40
|
+
Choose one primary file first, then add at most one supporting file only if needed:
|
|
41
|
+
|
|
42
|
+
- `reference/experiment-design-protocol.md` for structured experiment design and readiness checks
|
|
43
|
+
- `reference/command-presets.md` for `/to-graph`, `/reproduce`, `/lookahead`,
|
|
44
|
+
and `/fsd`
|
|
45
|
+
- `reference/thesis-mcp-tool-map.md` for exact tool surface and contract behavior
|
|
46
|
+
- `getting-started/tutorial-overview.md` for orientation and learning path
|
|
47
|
+
- `getting-started/quickstart.md` for fastest first-use setup and auth recovery
|
|
48
|
+
|
|
49
|
+
## Guardrails
|
|
50
|
+
|
|
51
|
+
- Keep guidance harness-agnostic unless the user explicitly asks for a specific host.
|
|
52
|
+
- Prefer concrete steps and decision points over long narrative explanations.
|
|
53
|
+
- Do not run broad document reads; load only what is required by the current request.
|
|
54
|
+
- Do not start compute-heavy execution before design intent is clear.
|
|
55
|
+
- Keep `/reproduce` narrow: validate existing knowledge claims rather than
|
|
56
|
+
expanding an open-ended research frontier.
|
|
57
|
+
- Treat `/lookahead` as planning only and `/fsd` as budgeted autonomous
|
|
58
|
+
frontier advancement.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Thesis Quickstart
|
|
2
|
+
|
|
3
|
+
Get from zero to a working Thesis graph in minutes.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- An active Thesis account with valid credentials
|
|
8
|
+
- A supported AI agent harness (Claude Code, Cursor, or any MCP-compatible host)
|
|
9
|
+
- Thesis MCP server configured and connected
|
|
10
|
+
|
|
11
|
+
## Step 1: Verify Authentication
|
|
12
|
+
|
|
13
|
+
Before doing anything else, confirm that your MCP connection is live and
|
|
14
|
+
authenticated.
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
mcp__thesis__thesis_auth_status
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
If authentication fails:
|
|
21
|
+
|
|
22
|
+
1. Check that the Thesis MCP server is running
|
|
23
|
+
2. Verify your credentials are current
|
|
24
|
+
3. Re-authenticate through your harness's MCP configuration
|
|
25
|
+
4. Run `mcp__thesis__thesis_auth_status` again to confirm
|
|
26
|
+
|
|
27
|
+
## Step 2: Review the Contract
|
|
28
|
+
|
|
29
|
+
Read the runtime contract to understand the current rules for node commits,
|
|
30
|
+
artifact uploads, and budget policies.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
mcp__thesis__thesis_get_contract
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You can also read a specific section:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
mcp__thesis__thesis_get_contract_section(section_id="node_commit")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This step is optional for experienced users but strongly recommended when
|
|
43
|
+
starting out or after a platform update.
|
|
44
|
+
|
|
45
|
+
## Step 3: Create Your First Node
|
|
46
|
+
|
|
47
|
+
Create a root node to anchor your research graph. A root node is a staged
|
|
48
|
+
(draft) node with no parent.
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
mcp__thesis__thesis_stage_node_create(
|
|
52
|
+
title="My First Research Topic",
|
|
53
|
+
content="Initial exploration of [your topic here].",
|
|
54
|
+
summary="Root node for [topic] research."
|
|
55
|
+
)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This returns a node ID and revision number. Save the node ID -- you will need
|
|
59
|
+
it for subsequent operations.
|
|
60
|
+
|
|
61
|
+
## Step 4: Update the Staged Node
|
|
62
|
+
|
|
63
|
+
Add more detail to your staged node before committing.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
mcp__thesis__thesis_stage_node_update(
|
|
67
|
+
node_id="<your-node-id>",
|
|
68
|
+
expected_revision=<current-revision>,
|
|
69
|
+
content="Detailed description of the research direction...",
|
|
70
|
+
summary="Root node exploring [specific question]."
|
|
71
|
+
)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Always pass `expected_revision` to avoid lost updates from concurrent edits.
|
|
75
|
+
|
|
76
|
+
## Step 5: Commit the Node
|
|
77
|
+
|
|
78
|
+
Commit the node to make it permanent in the graph. You must specify `kind`,
|
|
79
|
+
`outcome`, and `summary`.
|
|
80
|
+
|
|
81
|
+
For an insight node (synthesis, rationale, design decisions):
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
mcp__thesis__thesis_commit_node(
|
|
85
|
+
node_id="<your-node-id>",
|
|
86
|
+
expected_revision=<current-revision>,
|
|
87
|
+
kind="insight",
|
|
88
|
+
outcome="committed",
|
|
89
|
+
summary="Established root direction for [topic] research.",
|
|
90
|
+
insights="Key insight: [what you learned or decided]."
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
For an empirical node (experiment results, evidence):
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
mcp__thesis__thesis_commit_node(
|
|
98
|
+
node_id="<your-node-id>",
|
|
99
|
+
expected_revision=<current-revision>,
|
|
100
|
+
kind="empirical",
|
|
101
|
+
outcome="committed",
|
|
102
|
+
summary="Baseline measurement of [metric].",
|
|
103
|
+
hypothesis="[Your falsifiable hypothesis]."
|
|
104
|
+
)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Remember:
|
|
108
|
+
|
|
109
|
+
- `insight` commits require non-empty `insights`
|
|
110
|
+
- `empirical` commits require non-empty `hypothesis` and either artifacts or `no_artifacts_reason`
|
|
111
|
+
|
|
112
|
+
## Step 6: Branch From Your Root
|
|
113
|
+
|
|
114
|
+
Create child nodes to explore different directions from your root.
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
mcp__thesis__thesis_branch_node(
|
|
118
|
+
parent_node_id="<root-node-id>",
|
|
119
|
+
title="Branch A: [direction]",
|
|
120
|
+
content="Exploring [specific sub-question]..."
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Repeat for each research direction. This builds the DAG (directed acyclic graph)
|
|
125
|
+
that represents your research tree.
|
|
126
|
+
|
|
127
|
+
## Step 7: Attach Artifacts
|
|
128
|
+
|
|
129
|
+
When you have results, figures, data, or other files to attach:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
mcp__thesis__thesis_prepare_artifact_uploads(
|
|
133
|
+
node_id="<your-node-id>",
|
|
134
|
+
artifacts=[
|
|
135
|
+
{
|
|
136
|
+
"filename": "results.json",
|
|
137
|
+
"artifact_type": "json",
|
|
138
|
+
"size_bytes": 2048
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
This returns signed upload URLs. Upload your file bytes to those URLs via HTTP
|
|
145
|
+
PUT, then finalize:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
mcp__thesis__thesis_finalize_artifact_uploads(
|
|
149
|
+
node_id="<your-node-id>",
|
|
150
|
+
upload_batch_id="<batch-id-from-prepare>"
|
|
151
|
+
)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Example: Complete First-Use Workflow
|
|
155
|
+
|
|
156
|
+
Here is a complete workflow from start to finish:
|
|
157
|
+
|
|
158
|
+
1. **Authenticate**: `thesis_auth_status` -- confirm connection
|
|
159
|
+
2. **Create root**: `thesis_stage_node_create` -- "Evaluating LLM summarization quality"
|
|
160
|
+
3. **Update root**: `thesis_stage_node_update` -- add detailed research context
|
|
161
|
+
4. **Commit root**: `thesis_commit_node` -- kind=insight, capture initial direction
|
|
162
|
+
5. **Branch**: `thesis_branch_node` -- "Baseline: GPT-4 ROUGE scores on CNN/DailyMail"
|
|
163
|
+
6. **Update branch**: `thesis_stage_node_update` -- set hypothesis, metric, budget
|
|
164
|
+
7. **Run experiment**: acquire compute, run evaluation, collect scores
|
|
165
|
+
8. **Upload artifacts**: prepare + upload + finalize -- results table, score distribution plot
|
|
166
|
+
9. **Commit branch**: `thesis_commit_node` -- kind=empirical, outcome, hypothesis, summary
|
|
167
|
+
10. **Next branch**: `thesis_branch_node` -- "Comparison: Claude vs GPT-4 on same benchmark"
|
|
168
|
+
|
|
169
|
+
## Common Patterns
|
|
170
|
+
|
|
171
|
+
### Check your credit balance
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
mcp__thesis__thesis_get_credits_balance
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### List your nodes
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
mcp__thesis__thesis_list_nodes
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### View a subtree
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
mcp__thesis__thesis_get_node_tree(node_id="<root-node-id>")
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Get a condensed summary
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
mcp__thesis__thesis_summarize_node_tree(node_id="<root-node-id>")
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Share with collaborators
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
mcp__thesis__thesis_set_sharing_for_node(
|
|
199
|
+
node_id="<node-id>",
|
|
200
|
+
sharing_policy={...}
|
|
201
|
+
)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## What Next
|
|
205
|
+
|
|
206
|
+
- Read `tutorial-overview.md` for a deeper understanding of Thesis concepts
|
|
207
|
+
- Read `reference/experiment-design-protocol.md` to learn the 5-phase design process
|
|
208
|
+
- Read `reference/command-presets.md` to use `/to-graph`, `/reproduce`, `/lookahead`, and `/fsd`
|
|
209
|
+
- Read `reference/thesis-mcp-tool-map.md` for the complete tool reference
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Thesis Tutorial Overview
|
|
2
|
+
|
|
3
|
+
Thesis by Synthetic Sciences is a graph-based system for tracking research work,
|
|
4
|
+
decisions, and evidence over time. This document covers the core concepts that
|
|
5
|
+
agents and users need to understand before working with Thesis.
|
|
6
|
+
|
|
7
|
+
## What Thesis Is
|
|
8
|
+
|
|
9
|
+
Thesis is a structured research graph. It replaces flat notes, scattered
|
|
10
|
+
documents, and unlinked experiment logs with a directed acyclic graph (DAG)
|
|
11
|
+
where every piece of research has a clear place, clear provenance, and clear
|
|
12
|
+
relationships to the work around it.
|
|
13
|
+
|
|
14
|
+
Thesis is designed to be operated by AI agents through MCP (Model Context
|
|
15
|
+
Protocol) tools. Agents read and write the graph, plan experiments, execute
|
|
16
|
+
compute, and record evidence -- all within a structured framework that
|
|
17
|
+
preserves context across sessions and collaborators.
|
|
18
|
+
|
|
19
|
+
## Key Concepts
|
|
20
|
+
|
|
21
|
+
### Nodes
|
|
22
|
+
|
|
23
|
+
A node is the fundamental unit of Thesis. Every piece of research -- a question,
|
|
24
|
+
a hypothesis, a result, a design decision, a synthesis -- lives in a node.
|
|
25
|
+
|
|
26
|
+
Each node has:
|
|
27
|
+
|
|
28
|
+
- **title**: short human-readable name
|
|
29
|
+
- **content**: the primary narrative, reasoning, or description (markdown)
|
|
30
|
+
- **summary**: a brief synopsis for tree views and quick scanning
|
|
31
|
+
- **kind**: either `insight` or `empirical` (set at commit time)
|
|
32
|
+
- **outcome**: the resolution status (set at commit time)
|
|
33
|
+
- **artifacts**: attached files, figures, tables, data
|
|
34
|
+
|
|
35
|
+
### The DAG (Directed Acyclic Graph)
|
|
36
|
+
|
|
37
|
+
Nodes are connected by parent-child edges forming a DAG. This is not a flat
|
|
38
|
+
list or a simple tree -- nodes can have multiple parents (via `add_parent`)
|
|
39
|
+
and the graph can represent convergent research paths, not just divergent
|
|
40
|
+
branching.
|
|
41
|
+
|
|
42
|
+
Key properties:
|
|
43
|
+
|
|
44
|
+
- **Root nodes** have no parents and anchor a research topic
|
|
45
|
+
- **Branch nodes** are children created via `branch_node` to explore sub-questions
|
|
46
|
+
- **Merge nodes** combine insights from multiple parent branches
|
|
47
|
+
- **The graph is acyclic**: no node can be its own ancestor
|
|
48
|
+
|
|
49
|
+
### Kinds: Insight vs Empirical
|
|
50
|
+
|
|
51
|
+
Every committed node has a `kind` that determines its contract requirements:
|
|
52
|
+
|
|
53
|
+
**Insight nodes** capture synthesis, rationale, design decisions, literature
|
|
54
|
+
review, or any non-empirical knowledge. They require:
|
|
55
|
+
|
|
56
|
+
- Non-empty `insights` field at commit time
|
|
57
|
+
- No artifact requirement (though artifacts are welcome)
|
|
58
|
+
|
|
59
|
+
Use insight nodes for:
|
|
60
|
+
|
|
61
|
+
- Research direction decisions
|
|
62
|
+
- Literature synthesis
|
|
63
|
+
- Experiment design rationale
|
|
64
|
+
- Open questions and decomposition
|
|
65
|
+
- Planning and strategy
|
|
66
|
+
|
|
67
|
+
**Empirical nodes** capture work that produces evidence -- experiment runs,
|
|
68
|
+
benchmark results, data analysis, measurements. They require:
|
|
69
|
+
|
|
70
|
+
- Non-empty `hypothesis` field at commit time
|
|
71
|
+
- Artifacts attached, or a `no_artifacts_reason` explaining their absence
|
|
72
|
+
|
|
73
|
+
Use empirical nodes for:
|
|
74
|
+
|
|
75
|
+
- Experiment results
|
|
76
|
+
- Benchmark comparisons
|
|
77
|
+
- Data analysis outputs
|
|
78
|
+
- Measurement and observation records
|
|
79
|
+
|
|
80
|
+
### Node Lifecycle
|
|
81
|
+
|
|
82
|
+
Every node follows a staged-then-committed lifecycle:
|
|
83
|
+
|
|
84
|
+
1. **Staged (draft)**: Created via `thesis_stage_node_create`. The node exists
|
|
85
|
+
in the graph but is mutable. You can update it freely with
|
|
86
|
+
`thesis_stage_node_update`.
|
|
87
|
+
|
|
88
|
+
2. **Committed**: Finalized via `thesis_commit_node`. The node's kind, outcome,
|
|
89
|
+
and summary are locked. Committed nodes represent completed units of work.
|
|
90
|
+
|
|
91
|
+
Important: staged nodes should not be left indefinitely. They represent
|
|
92
|
+
in-progress work. Commit them when the work they represent is resolved, or
|
|
93
|
+
delete them if the direction is abandoned.
|
|
94
|
+
|
|
95
|
+
### Optimistic Locking
|
|
96
|
+
|
|
97
|
+
All mutation operations use `expected_revision` for optimistic locking. When
|
|
98
|
+
you read a node, you get its current revision number. When you update or commit
|
|
99
|
+
it, you pass that revision number back. If someone else has modified the node
|
|
100
|
+
in the meantime, the operation fails with a revision conflict, preventing lost
|
|
101
|
+
updates.
|
|
102
|
+
|
|
103
|
+
Always:
|
|
104
|
+
|
|
105
|
+
1. Read the node to get the current revision
|
|
106
|
+
2. Pass that revision to your mutation call
|
|
107
|
+
3. Handle revision conflicts by re-reading and retrying
|
|
108
|
+
|
|
109
|
+
### Artifacts
|
|
110
|
+
|
|
111
|
+
Artifacts are files attached to nodes: results tables, plots, figures, code,
|
|
112
|
+
datasets, checkpoints, notebooks, and more.
|
|
113
|
+
|
|
114
|
+
Supported artifact types include:
|
|
115
|
+
`text`, `table`, `json`, `image`, `banner`, `html`, `plotly_html`, `vega`,
|
|
116
|
+
`checkpoint`, and `diff_carousel`.
|
|
117
|
+
|
|
118
|
+
Artifact upload is a two-step process:
|
|
119
|
+
|
|
120
|
+
1. **Prepare**: Call `thesis_prepare_artifact_uploads` with filenames, types, and
|
|
121
|
+
sizes. This returns signed upload URLs and a batch ID.
|
|
122
|
+
2. **Upload**: HTTP PUT the raw file bytes to each signed URL.
|
|
123
|
+
3. **Finalize**: Call `thesis_finalize_artifact_uploads` with the batch ID to
|
|
124
|
+
complete the upload.
|
|
125
|
+
|
|
126
|
+
Never skip the finalize step -- artifacts are not visible until finalized.
|
|
127
|
+
|
|
128
|
+
### Tags
|
|
129
|
+
|
|
130
|
+
Tags are lightweight annotations you can attach to nodes for filtering,
|
|
131
|
+
grouping, and organizing. Create tag definitions with `thesis_create_node_tag`,
|
|
132
|
+
then assign them to nodes with `thesis_set_node_tag_assignments`.
|
|
133
|
+
|
|
134
|
+
Tags are useful for:
|
|
135
|
+
|
|
136
|
+
- Marking experiment status (e.g., "needs-review", "baseline", "promising")
|
|
137
|
+
- Categorizing research areas
|
|
138
|
+
- Filtering node lists in large graphs
|
|
139
|
+
|
|
140
|
+
### Sharing and Collaboration
|
|
141
|
+
|
|
142
|
+
Thesis graphs can be shared with collaborators through access policies.
|
|
143
|
+
Use `thesis_get_node_sharing` to check current policies and
|
|
144
|
+
`thesis_set_sharing_for_node` to grant or revoke access.
|
|
145
|
+
|
|
146
|
+
For handoff, use `thesis_export_summary` or `thesis_export_subgraph` to create
|
|
147
|
+
portable representations of your work.
|
|
148
|
+
|
|
149
|
+
### Managed Compute
|
|
150
|
+
|
|
151
|
+
Thesis provides managed compute for running experiments. The flow is:
|
|
152
|
+
|
|
153
|
+
1. Maintain an approval session (`thesis_approval_session_heartbeat`)
|
|
154
|
+
2. Request budget approval (`thesis_request_compute_grant_approval`)
|
|
155
|
+
3. Acquire a compute instance (`thesis_compute_acquire`)
|
|
156
|
+
4. Use the instance (check status, get connection details)
|
|
157
|
+
5. Release when done (`thesis_compute_release`)
|
|
158
|
+
|
|
159
|
+
Compute costs credits. Always check your balance with
|
|
160
|
+
`thesis_get_credits_balance` and set explicit budget caps before acquiring
|
|
161
|
+
compute.
|
|
162
|
+
|
|
163
|
+
### Campaigns
|
|
164
|
+
|
|
165
|
+
Campaigns are organized research efforts with shared budgets. Organizers
|
|
166
|
+
create campaign budgets (`thesis_create_campaign_budget`) that participants
|
|
167
|
+
can draw from. Use `thesis_get_campaign_snapshot` to see the current state
|
|
168
|
+
of a campaign.
|
|
169
|
+
|
|
170
|
+
## How Agents Use Thesis
|
|
171
|
+
|
|
172
|
+
AI agents interact with Thesis through MCP tools. The typical agent workflow is:
|
|
173
|
+
|
|
174
|
+
1. **Orient**: Read the existing graph (`thesis_list_nodes`,
|
|
175
|
+
`thesis_get_node_tree`, `thesis_summarize_node_tree`) to understand what
|
|
176
|
+
work exists.
|
|
177
|
+
|
|
178
|
+
2. **Design**: Use the experiment design protocol to clarify what the user
|
|
179
|
+
wants to learn. Capture the design in an `insight` node.
|
|
180
|
+
|
|
181
|
+
3. **Execute**: Create `empirical` branches, acquire compute if needed, run
|
|
182
|
+
experiments, and upload artifacts.
|
|
183
|
+
|
|
184
|
+
4. **Synthesize**: Commit nodes with clear summaries and outcomes. Branch
|
|
185
|
+
again for follow-up questions.
|
|
186
|
+
|
|
187
|
+
5. **Repeat**: The graph grows as a persistent record of research decisions
|
|
188
|
+
and evidence, usable across sessions and agents.
|
|
189
|
+
|
|
190
|
+
### Agent Best Practices
|
|
191
|
+
|
|
192
|
+
- Always read before writing. Check the existing graph state before creating
|
|
193
|
+
new nodes.
|
|
194
|
+
- Use the design protocol before spending compute. Clarify the question first.
|
|
195
|
+
- Keep `content` readable. The node content should tell the story; artifacts
|
|
196
|
+
provide supporting evidence.
|
|
197
|
+
- Commit nodes promptly. Do not leave large numbers of staged nodes lingering.
|
|
198
|
+
- Use `insight` nodes for planning and `empirical` nodes for evidence. Do not
|
|
199
|
+
conflate them.
|
|
200
|
+
- Respect budget caps. Never acquire compute without an explicit budget ceiling.
|
|
201
|
+
- Name uncertainty. If results are ambiguous, say so in the summary rather than
|
|
202
|
+
overstating confidence.
|
|
203
|
+
|
|
204
|
+
## Workflow Commands
|
|
205
|
+
|
|
206
|
+
Thesis supports four command presets that encode common research workflows:
|
|
207
|
+
|
|
208
|
+
- `/to-graph` -- Convert source material into a structured Thesis graph
|
|
209
|
+
- `/reproduce` -- Structure source material and run budgeted empirical validation
|
|
210
|
+
- `/lookahead` -- Plan the next frontier of work without executing
|
|
211
|
+
- `/fsd` -- Autonomous frontier advancement under a hard budget
|
|
212
|
+
|
|
213
|
+
See `reference/command-presets.md` for full details on each command.
|
|
214
|
+
|
|
215
|
+
## Further Reading
|
|
216
|
+
|
|
217
|
+
- `getting-started/quickstart.md` -- Hands-on first steps
|
|
218
|
+
- `reference/experiment-design-protocol.md` -- The 5-phase design protocol
|
|
219
|
+
- `reference/command-presets.md` -- Command preset details
|
|
220
|
+
- `reference/thesis-mcp-tool-map.md` -- Complete MCP tool reference
|