chore: initialize nomadcode monorepo scaffold
This commit is contained in:
commit
6f5e3a119f
13 changed files with 167 additions and 0 deletions
35
.gitignore
vendored
Normal file
35
.gitignore
vendored
Normal file
|
|
@ -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/
|
||||||
24
README.md
Normal file
24
README.md
Normal file
|
|
@ -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.
|
||||||
10
agent-ops/README.md
Normal file
10
agent-ops/README.md
Normal file
|
|
@ -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`
|
||||||
5
agent-ops/rules/domain/contracts/rules.md
Normal file
5
agent-ops/rules/domain/contracts/rules.md
Normal file
|
|
@ -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.
|
||||||
5
agent-ops/rules/domain/core/rules.md
Normal file
5
agent-ops/rules/domain/core/rules.md
Normal file
|
|
@ -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.
|
||||||
5
agent-ops/rules/domain/mobile/rules.md
Normal file
5
agent-ops/rules/domain/mobile/rules.md
Normal file
|
|
@ -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.
|
||||||
5
agent-ops/rules/domain/web/rules.md
Normal file
5
agent-ops/rules/domain/web/rules.md
Normal file
|
|
@ -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.
|
||||||
16
bin/build
Executable file
16
bin/build
Executable file
|
|
@ -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
|
||||||
14
bin/dev
Executable file
14
bin/dev
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
NomadCode development entrypoints:
|
||||||
|
|
||||||
|
core: cd "$root/services/core" && bin/run
|
||||||
|
web: cd "$root/apps/web" && npm run dev
|
||||||
|
mobile: cd "$root/apps/mobile" && flutter run
|
||||||
|
|
||||||
|
Start the services you need in separate terminals.
|
||||||
|
EOF
|
||||||
16
bin/lint
Executable file
16
bin/lint
Executable file
|
|
@ -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 vet ./...)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$root/apps/web/package.json" ]; then
|
||||||
|
(cd "$root/apps/web" && npm run lint --if-present)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$root/apps/mobile/pubspec.yaml" ]; then
|
||||||
|
(cd "$root/apps/mobile" && flutter analyze)
|
||||||
|
fi
|
||||||
16
bin/test
Executable file
16
bin/test
Executable file
|
|
@ -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 test ./...)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$root/apps/web/package.json" ]; then
|
||||||
|
(cd "$root/apps/web" && npm test -- --run)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$root/apps/mobile/pubspec.yaml" ]; then
|
||||||
|
(cd "$root/apps/mobile" && flutter test)
|
||||||
|
fi
|
||||||
11
docs/monorepo.md
Normal file
11
docs/monorepo.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Monorepo Layout
|
||||||
|
|
||||||
|
The workspace is organized by runtime boundary rather than by task.
|
||||||
|
|
||||||
|
- `services/core` owns orchestration, persistence, scheduling, and external model/service adapters.
|
||||||
|
- `apps/web` owns the operator console and browser-based agent workspace.
|
||||||
|
- `apps/mobile` owns the mobile and desktop Flutter surfaces.
|
||||||
|
- `packages/contracts` owns schemas shared across clients and services.
|
||||||
|
- `agent-ops` owns root agent routing, domain rules, and repeatable task workflows.
|
||||||
|
|
||||||
|
Keep feature work scoped by domain, but land cross-boundary changes in one branch when API contracts, generated clients, and UI behavior must move together.
|
||||||
5
packages/contracts/README.md
Normal file
5
packages/contracts/README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Contracts
|
||||||
|
|
||||||
|
Shared API contracts live here.
|
||||||
|
|
||||||
|
Use this package for OpenAPI specs, protobuf files, generated clients, fixtures, and compatibility notes that need to be consumed by more than one NomadCode runtime.
|
||||||
Loading…
Reference in a new issue