Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Substrate is a local-first room where humans, agents, and other tools take turns

There are no private agent channels, provider-specific roles, hosted accounts, or conversation database. A room is an append-only directory of Markdown entries. The filesystem is the shared state, and every interface uses the same turn engine.

One turn engine now backs five interfaces: TUI, MCP, CLI, HTTP proxy, and
unattended agents. Independent processes share the same append-only room state,
with filesystem locks and recovery records covering concurrent writes.

```text
humans ─┐
agents ─┼── TUI / MCP / CLI / HTTP proxy ──> .substrate/ ──> one shared room
Expand Down Expand Up @@ -519,3 +523,7 @@ go test -race ./...
CI tests Linux, macOS, and Windows, plus the race detector. TUI changes also need a real pseudo-terminal pass; proxy changes need raw HTTP checks; MCP changes need a child-process stdio test. Green unit tests are necessary, not sufficient, at those boundaries.

Start with the short product contract in [docs/notes/README.md](docs/notes/README.md). Package boundaries and open design work are in [docs/architecture.md](docs/architecture.md).

Related: [alignment.farm](https://alignment.farm) |
[construct](https://github.com/alignment-farm/construct) |
[materialize](https://github.com/alignment-farm/materialize)
4 changes: 2 additions & 2 deletions cmd/substrate-mcp/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/stack-research/substrate/internal/mcpserver"
"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/mcpserver"
"github.com/alignment-farm/substrate/internal/substrate"
)

func TestMCPHelperProcess(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/substrate-mcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"strings"

"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/stack-research/substrate/internal/lifecycle"
"github.com/stack-research/substrate/internal/mcpserver"
"github.com/stack-research/substrate/internal/substrate"
"github.com/stack-research/substrate/internal/version"
"github.com/alignment-farm/substrate/internal/lifecycle"
"github.com/alignment-farm/substrate/internal/mcpserver"
"github.com/alignment-farm/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/version"
)

type pathsFlag []string
Expand Down
4 changes: 2 additions & 2 deletions cmd/substrate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"os"

"github.com/stack-research/substrate/internal/cli"
"github.com/stack-research/substrate/internal/lifecycle"
"github.com/alignment-farm/substrate/internal/cli"
"github.com/alignment-farm/substrate/internal/lifecycle"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/stack-research/substrate
module github.com/alignment-farm/substrate

go 1.26.0

Expand Down
10 changes: 5 additions & 5 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"time"

"github.com/spf13/cobra"
"github.com/stack-research/substrate/internal/proxy"
"github.com/stack-research/substrate/internal/substrate"
"github.com/stack-research/substrate/internal/ui"
"github.com/stack-research/substrate/internal/version"
"github.com/stack-research/substrate/internal/watcher"
"github.com/alignment-farm/substrate/internal/proxy"
"github.com/alignment-farm/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/ui"
"github.com/alignment-farm/substrate/internal/version"
"github.com/alignment-farm/substrate/internal/watcher"
)

type App struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

func runCLI(t *testing.T, input string, args ...string) (string, error) {
Expand Down
4 changes: 2 additions & 2 deletions internal/mcpserver/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/fsnotify/fsnotify"
"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/stack-research/substrate/internal/substrate"
"github.com/stack-research/substrate/internal/version"
"github.com/alignment-farm/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/version"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/mcpserver/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/stack-research/substrate/internal/substrate"
"github.com/stack-research/substrate/internal/version"
"github.com/alignment-farm/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/version"
)

func setupSpace(t *testing.T) (*substrate.Space, substrate.Name) {
Expand Down
2 changes: 1 addition & 1 deletion internal/mcpserver/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sort"
"strings"

"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

type SpaceSource struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strconv"
"strings"

"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

type Participant struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/proxy/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"testing"

"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

func proxySpace(t *testing.T) (*substrate.Space, substrate.Name) {
Expand Down
4 changes: 2 additions & 2 deletions internal/ui/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"charm.land/bubbles/v2/viewport"
tea "charm.land/bubbletea/v2"
"github.com/fsnotify/fsnotify"
"github.com/stack-research/substrate/internal/substrate"
"github.com/stack-research/substrate/internal/watcher"
"github.com/alignment-farm/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/watcher"
)

type focus int
Expand Down
4 changes: 2 additions & 2 deletions internal/ui/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

tea "charm.land/bubbletea/v2"
"github.com/stack-research/substrate/internal/substrate"
"github.com/stack-research/substrate/internal/watcher"
"github.com/alignment-farm/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/watcher"
)

func TestThemePaletteIsMonochrome(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"charm.land/glamour/v2"
"charm.land/lipgloss/v2"
"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

func (m *Model) render() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

"github.com/fsnotify/fsnotify"
"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

func Watch(ctx context.Context, space *substrate.Space, thread substrate.Name, forName *substrate.Name, command string, out, errOut io.Writer) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/stack-research/substrate/internal/substrate"
"github.com/alignment-farm/substrate/internal/substrate"
)

type lockedBuffer struct {
Expand Down
Loading