Skip to content
Merged
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
26 changes: 26 additions & 0 deletions .agentsmithy-borrowed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "1"

project:
name: "Borrowed"
instruction: |
You are SmithyCLI, a config drive AI stack builder.
Used to locally build and manage Smithy Agents and MCP Servers.
Use the `smithy-cli` MCP tools to look up codebase context before
answering implementation questions.
models:
borrowed:
default:
model: "default"
maxTokens: 1024

tools:
mcp:
smithy-cli: "http://127.0.0.1:8080/"

pipeline:
autonomous:
model:
provider: borrowed
name: default
tools:
- smithy-cli
26 changes: 26 additions & 0 deletions .agentsmithy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "1"

project:
name: "SmithyCLI"
instruction: |
You are SmithyCLI, a config drive AI stack builder.
Used to locally build and manage Smithy Agents and MCP Servers.
Use the `smithy-cli` MCP tools to look up codebase context before
answering implementation questions.
models:
openai:
default:
model: "qwen2.5:7b-instruct"
baseUrl: "http://localhost:11434/v1"

tools:
mcp:
smithy-cli: "http://127.0.0.1:8080/"

pipeline:
autonomous:
model:
provider: openai
name: default
tools:
- smithy-cli
46 changes: 46 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docker

on:
workflow_dispatch:
# push:
# tags: ["v*"]

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Docs

on:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs/user
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/user/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build site
run: npm run build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/user/build

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
ext=""
if [ "$GOOS" = "windows" ]; then ext=".exe"; fi
go build -trimpath -ldflags="-s -w" \
-o smithy-${GOOS}-${GOARCH}${ext} ./cmd/smithy

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: smithy-${{ matrix.goos }}-${{ matrix.goarch }}
path: smithy-*

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: smithy-*
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run tests
run: go test ./...

gen-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Generate docs
run: go run ./cmd/gen-docs/

- name: Check for uncommitted changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::error::Generated docs are out of date. Run 'go run ./cmd/gen-docs/' and commit the changes."
git diff
exit 1
fi
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*.dll
*.so
*.dylib
smithy
.smithy

# Test binary, built with `go test -c`
*.test
Expand All @@ -30,3 +32,5 @@ go.work.sum
# Editor/IDE
# .idea/
# .vscode/

.DS_Store
94 changes: 94 additions & 0 deletions .mcpsmithy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
version: "1"

project:
name: "smithy-cli"
description: "Unified CLI for running and managing smithy MCP servers and agents."
sources:
local:
runtime:
paths: ["internal/runtime/**/*.go"]
description: "Compose translator, MCP runner adapter, and fan-out launcher"
commands:
paths: ["internal/commands/**/*.go"]
description: "Kong subcommand wiring (stack, mcp, agent)"
config:
paths: ["internal/config/**/*.go"]
description: "Versioned smithy-stack.yaml loader and v1 schema"
setup:
paths: ["internal/setup/**/*.go", "internal/setup/sections/*.md"]
description: "Authoring MCP server (`smithy stack setup`)"
tests:
paths: ["internal/**/*_test.go"]
description: "Stdlib table-driven unit tests"
developer-docs:
paths: ["docs/development/**/*.md"]
description: "Plan, architecture, and development conventions"
user-docs:
paths: ["docs/user/**/*.md", "README.md"]
description: "User-facing reference and getting-started"

conventions:
code-style:
scope: "**/*.go"
docs:
- source: developer-docs
description: |
Standard Go style. Stdlib testing only — no third-party assertion
libraries. Prefer table-driven tests when a function has multiple
input/output variations. No decorative separator comments.

stack-runtime:
scope: "internal/runtime/**"
docs:
- source: developer-docs
paths:
- docs/development/plan.md
description: |
The runtime package owns the stack lifecycle. It stays small
on purpose: a Translate that resolves the v1 schema into a Plan,
a RunMCP adapter that delegates to mcpsmithy/pkg/api, and a
Launch that fans out via errgroup. Daemon, IPC, log files, and
per-service supervision land in later phases.

config-schema:
scope: "internal/config/**"
docs:
- source: developer-docs
description: |
Versioned YAML config. The smithy struct tag is the single source
of truth for required fields, defaults, and generated reference
docs. Enums are named string types implementing Valuer — there is
no enum= tag directive.

tools:
project_info:
description: "Returns project name, description, sources, and conventions. Call at the start of every session."
template: |
{{ .mcpsmithy.Project }}

Tools:
{{ .mcpsmithy.Tools }}

Conventions:
{{ .mcpsmithy.Conventions }}

find_convention:
description: "Returns conventions for a specific file path."
template: "{{ conventions_for .path }}"
params:
- name: "path"
type: "string"
required: true
description: "File path to check conventions for"

project_commands:
description: "How to build, test, and run smithy-cli."
template: |
Project commands (run from {{ .mcpsmithy.Project.Root }}):

Build: go build ./cmd/smithy
Test: go test ./...
Lint: go vet ./...
Docs gen: go run ./cmd/gen-docs
Validate: go run ./cmd/smithy stack validate
Up: go run ./cmd/smithy stack up
8 changes: 8 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"servers": {
"smithy-setup": {
"command": "${workspaceFolder}/smithy",
"args": ["stack", "setup"]
}
}
}
Loading
Loading