commit 6f5e3a119fe0cb0bad469771e2a8cfcef93c9230 Author: toki Date: Thu May 21 13:35:09 2026 +0900 chore: initialize nomadcode monorepo scaffold diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ed8dbc --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# OS/editor +.DS_Store +.idea/ +.vscode/ + +# Local env +.env +.env.* +!.env.example + +# Logs and generated task archives +*.log +agent-task/archive/ + +# Node +node_modules/ +dist/ +coverage/ + +# Go +bin/*.test +*.out + +# Flutter/Dart +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +build/ + +# Native build outputs +DerivedData/ +Pods/ +*.xcworkspace/xcuserdata/ +*.xcodeproj/xcuserdata/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..63afc70 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# NomadCode + +NomadCode is the monorepo for the mobile app, web console, core service, shared contracts, and agent-operation rules that coordinate AI-assisted development workflows. + +## Workspace + +- `apps/mobile`: Flutter client. +- `apps/web`: React/Vite web console. +- `services/core`: Go backend and orchestration service. +- `packages/contracts`: shared API contracts and generated client boundary. +- `agent-ops`: root-level rules, skills, and routing context for AI agents. +- `docs`: architecture and operations notes. +- `bin`: workspace helper commands. + +## Common Commands + +```sh +bin/test +bin/build +bin/lint +bin/dev +``` + +Each command delegates to the projects that are present in the workspace. diff --git a/agent-ops/README.md b/agent-ops/README.md new file mode 100644 index 0000000..b314983 --- /dev/null +++ b/agent-ops/README.md @@ -0,0 +1,10 @@ +# Agent Ops + +Root-level agent instructions and reusable workflows for the NomadCode monorepo. + +Domain rules should describe ownership boundaries and quality gates for: + +- `core` +- `web` +- `mobile` +- `contracts` diff --git a/agent-ops/rules/domain/contracts/rules.md b/agent-ops/rules/domain/contracts/rules.md new file mode 100644 index 0000000..cba76ff --- /dev/null +++ b/agent-ops/rules/domain/contracts/rules.md @@ -0,0 +1,5 @@ +# Contracts Domain Rules + +- Own shared schemas, OpenAPI/protobuf definitions, generated clients, and compatibility notes under `packages/contracts`. +- Contract changes should be reviewed with every affected runtime in the same branch. +- Prefer additive changes unless a coordinated breaking change is explicitly planned. diff --git a/agent-ops/rules/domain/core/rules.md b/agent-ops/rules/domain/core/rules.md new file mode 100644 index 0000000..3ff7fec --- /dev/null +++ b/agent-ops/rules/domain/core/rules.md @@ -0,0 +1,5 @@ +# Core Domain Rules + +- Own backend orchestration, persistence, scheduling, workflow execution, and service adapters under `services/core`. +- Keep API behavior explicit through shared contracts when clients depend on it. +- Add or update focused Go tests for scheduler, adapter, persistence, and HTTP behavior changes. diff --git a/agent-ops/rules/domain/mobile/rules.md b/agent-ops/rules/domain/mobile/rules.md new file mode 100644 index 0000000..7435504 --- /dev/null +++ b/agent-ops/rules/domain/mobile/rules.md @@ -0,0 +1,5 @@ +# Mobile Domain Rules + +- Own Flutter mobile and desktop surfaces under `apps/mobile`. +- Keep platform-specific native changes isolated and document required capabilities. +- Add widget or service tests for notification, auth, and local workflow behavior changes. diff --git a/agent-ops/rules/domain/web/rules.md b/agent-ops/rules/domain/web/rules.md new file mode 100644 index 0000000..aa759da --- /dev/null +++ b/agent-ops/rules/domain/web/rules.md @@ -0,0 +1,5 @@ +# Web Domain Rules + +- Own browser console, project workspace, agent workspace, and backend integration under `apps/web`. +- Keep UI state predictable and align API assumptions with `packages/contracts` or `services/core`. +- Prefer focused component, store, and API-client tests as the web surface grows. diff --git a/bin/build b/bin/build new file mode 100755 index 0000000..f4a4b9d --- /dev/null +++ b/bin/build @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +if [ -f "$root/services/core/go.mod" ]; then + (cd "$root/services/core" && go build ./...) +fi + +if [ -f "$root/apps/web/package.json" ]; then + (cd "$root/apps/web" && npm run build) +fi + +if [ -f "$root/apps/mobile/pubspec.yaml" ]; then + (cd "$root/apps/mobile" && flutter build web) +fi diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000..59699c2 --- /dev/null +++ b/bin/dev @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +cat <