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
55 changes: 20 additions & 35 deletions .github/workflows/build-calm-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ on:
paths:
- 'calm-suite/calm-guard/**'
- '.github/workflows/build-calm-guard.yml'
- 'package.json'
- 'package-lock.json'
push:
branches:
- 'main'
- 'release*'
paths:
- 'calm-suite/calm-guard/**'
- '.github/workflows/build-calm-guard.yml'

defaults:
run:
working-directory: calm-suite/calm-guard
- 'package.json'
- 'package-lock.json'

jobs:
lint:
Expand All @@ -31,26 +31,21 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Install pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: calm-suite/calm-guard/package.json

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: 22
cache: pnpm
cache-dependency-path: calm-suite/calm-guard/pnpm-lock.yaml
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: npm ci

- name: Lint
run: pnpm lint
run: npm run lint --workspace=calmguard

- name: Typecheck
run: pnpm typecheck
run: npm run typecheck --workspace=calmguard

test:
name: Test
Expand All @@ -60,23 +55,18 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Install pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: calm-suite/calm-guard/package.json

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: 22
cache: pnpm
cache-dependency-path: calm-suite/calm-guard/pnpm-lock.yaml
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: npm ci

- name: Run tests
run: pnpm test:run
run: npm run test:run --workspace=calmguard

build:
name: Build
Expand All @@ -88,20 +78,15 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Install pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: calm-suite/calm-guard/package.json

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: 22
cache: pnpm
cache-dependency-path: calm-suite/calm-guard/pnpm-lock.yaml
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: npm ci

- name: Build
run: pnpm build
run: npm run build --workspace=calmguard
18 changes: 13 additions & 5 deletions calm-suite/calm-guard/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Built for the DTCC/FINOS Innovate.DTCC AI Hackathon (Feb 23-27, 2026).
| Layer | Choice | Notes |
|-------|--------|-------|
| Framework | Next.js 14+ (App Router) | `src/app/` routing, API routes for SSE |
| Package Manager | pnpm | Use `pnpm` for all package operations |
| Package Manager | npm (workspaces) | CalmGuard is a workspace of the monorepo root. Run `npm` commands from the repo root or use `--workspace=calmguard`. The docs sub-package is `calmguard-docs`. |
| Language | TypeScript (strict mode) | No `any` types. Use Zod for runtime validation |
| LLM SDK | Vercel AI SDK (`ai`) | `generateObject` with Zod schemas for all agent outputs |
| Default LLM | Google Gemini | `@ai-sdk/google`. Multi-provider: also supports Anthropic, OpenAI, Ollama, Grok |
Expand Down Expand Up @@ -136,11 +136,19 @@ examples/ # Demo CALM architecture JSON files

## Key Commands

Run from monorepo root (preferred) or from `calm-suite/calm-guard/` (drop the `--workspace=calmguard` flag).

```bash
pnpm dev # Start dev server
pnpm build # Production build
pnpm lint # ESLint
pnpm typecheck # TypeScript strict check
# From monorepo root
npm ci # Install all workspaces (one-time / on lockfile change)
npm run dev --workspace=calmguard # Start dev server
npm run build --workspace=calmguard # Production build
npm run lint --workspace=calmguard # ESLint
npm run typecheck --workspace=calmguard # TypeScript strict check
npm run test:run --workspace=calmguard # Vitest single run

# Docs site (Docusaurus)
npm run docs:dev # From calm-suite/calm-guard/
```

## Environment Variables
Expand Down
24 changes: 17 additions & 7 deletions calm-suite/calm-guard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<img src="https://img.shields.io/badge/TypeScript-strict-blue?logo=typescript&logoColor=white" alt="TypeScript" />
<img src="https://img.shields.io/badge/FINOS-CALM_1.0--1.2-00A3E0?logo=linux-foundation&logoColor=white" alt="FINOS CALM" />
<img src="https://img.shields.io/badge/Node-22+-339933?logo=node.js&logoColor=white" alt="Node 22+" />
<img src="https://img.shields.io/badge/pnpm-9+-F69220?logo=pnpm&logoColor=white" alt="pnpm" />
<img src="https://img.shields.io/badge/npm-10+-CB3837?logo=npm&logoColor=white" alt="npm" />
</p>

---
Expand Down Expand Up @@ -70,15 +70,17 @@ You could [Access the Presentation ->](https://github.com/finos-labs/dtcch-2026-

### Prerequisites

- **Node.js 22+** and **pnpm 9+**
- **Node.js 22+** and **npm 10+**
- At least one LLM provider API key (Gemini is the default)

### Setup

CalmGuard is a workspace of the [`finos/architecture-as-code`](https://github.com/finos/architecture-as-code) monorepo. Clone the monorepo and install all workspaces from the root:

```bash
git clone https://github.com/finos-labs/dtcch-2026-opsflow-llc.git
cd dtcch-2026-opsflow-llc
pnpm install
git clone https://github.com/finos/architecture-as-code.git
cd architecture-as-code
npm ci
```

Create a `.env.local` file:
Expand All @@ -98,8 +100,16 @@ GITHUB_TOKEN=your-github-token

### Run

From the monorepo root:

```bash
npm run dev --workspace=calmguard # Start dev server at http://localhost:3000
```

Or from `calm-suite/calm-guard/`:

```bash
pnpm dev # Start dev server at http://localhost:3000
npm run dev
```

Visit the dashboard — click **"Demo Mode"** to see CALMGuard analyze a sample architecture without any API keys.
Expand Down Expand Up @@ -377,7 +387,7 @@ Unknown node types (e.g., `lambda`) are mapped to `service` — maximizing compa

## Documentation

Full documentation is available in [`docs/`](docs/). Run locally with `pnpm docs:dev`, or browse directly on GitHub:
Full documentation is available in [`docs/`](docs/). Run locally with `npm run docs:dev`, or browse directly on GitHub:

### Getting Started

Expand Down
26 changes: 23 additions & 3 deletions calm-suite/calm-guard/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,44 @@

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

It is published as the `calmguard-docs` workspace of the [`finos/architecture-as-code`](https://github.com/finos/architecture-as-code) monorepo.

## Installation

From the monorepo root:

```bash
pnpm install
npm ci
```

## Local Development

From the monorepo root:

```bash
npm run start --workspace=calmguard-docs
```

Or from `calm-suite/calm-guard/`:

```bash
pnpm start
npm run docs:dev
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

From the monorepo root:

```bash
npm run build --workspace=calmguard-docs
```

Or from `calm-suite/calm-guard/`:

```bash
pnpm build
npm run docs:build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
2 changes: 1 addition & 1 deletion calm-suite/calm-guard/docs/docs/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: API Reference
# API Reference

> This page is auto-generated from Zod schema source files by `scripts/generate-api-docs.ts`.
> Run `pnpm docs:api` to regenerate.
> Run `npm run docs:api --workspace=calmguard` to regenerate.

*Generated: 2026-02-24T08:36:31.355Z*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CALMGuard is built on Next.js 15 with a multi-agent AI architecture. This page c
| Charts | Recharts | Compliance gauges, heat maps |
| State | Zustand | Flat state, SSE event updates |
| Validation | Zod | CALM parsing + agent output validation |
| Package Manager | pnpm | Workspace tooling |
| Package Manager | npm (workspaces) | Root of `finos/architecture-as-code` monorepo |

## Architecture Diagram

Expand Down
30 changes: 16 additions & 14 deletions calm-suite/calm-guard/docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ CALMGuard is an open-source project built for the DTCC/FINOS Innovate Hackathon
### Prerequisites

- Node.js 22+
- pnpm 9+
- npm 10+
- A Gemini API key (free tier works for development)

### Installation

CalmGuard lives in the [`finos/architecture-as-code`](https://github.com/finos/architecture-as-code) monorepo as the `calmguard` npm workspace.

```bash
git clone https://github.com/finos/dtcch-2026-opsflow-llc.git
cd dtcch-2026-opsflow-llc
pnpm install
cp .env.example .env.local
git clone https://github.com/finos/architecture-as-code.git
cd architecture-as-code
npm ci
cp calm-suite/calm-guard/.env.example calm-suite/calm-guard/.env.local
# Edit .env.local and add your GOOGLE_GENERATIVE_AI_API_KEY
pnpm dev
npm run dev --workspace=calmguard
```

## Project Structure
Expand Down Expand Up @@ -68,11 +70,11 @@ See the [System Overview](/architecture/system-overview) for a full directory br

## Testing

Run the test suite:
Run the test suite (from monorepo root):

```bash
pnpm test # Watch mode
pnpm test:run # Single run
npm run test --workspace=calmguard # Watch mode
npm run test:run --workspace=calmguard # Single run
```

Tests use Vitest with jsdom for component testing.
Expand All @@ -88,12 +90,12 @@ Tests use Vitest with jsdom for component testing.
1. Fork the repository
2. Create a feature branch: `git checkout -b feat/my-feature`
3. Make your changes with tests
4. Run the full check suite:
4. Run the full check suite (from monorepo root):
```bash
pnpm typecheck
pnpm lint
pnpm test:run
pnpm build
npm run typecheck --workspace=calmguard
npm run lint --workspace=calmguard
npm run test:run --workspace=calmguard
npm run build --workspace=calmguard
```
5. Commit with DCO sign-off: `git commit -s -m "feat: add my feature"`
6. Push and open a Pull Request
Expand Down
20 changes: 13 additions & 7 deletions calm-suite/calm-guard/docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,32 @@ Get CALMGuard running locally in under 5 minutes.
| Requirement | Minimum Version | Notes |
|------------|-----------------|-------|
| Node.js | 22+ | LTS recommended |
| pnpm | 9+ | `npm install -g pnpm` |
| npm | 10+ | Ships with Node 22 |
| Git | Any | For cloning |
| Google Gemini API key | — | Free tier sufficient for demo |

CalmGuard is the `calmguard` workspace inside the [`finos/architecture-as-code`](https://github.com/finos/architecture-as-code) monorepo. All commands run from the monorepo root.

## Installation

### 1. Clone the repository
### 1. Clone the monorepo

```bash
git clone https://github.com/finos/dtcch-2026-opsflow-llc.git
cd dtcch-2026-opsflow-llc
git clone https://github.com/finos/architecture-as-code.git
cd architecture-as-code
```

### 2. Install dependencies

```bash
pnpm install
npm ci
```

This installs all workspaces (calm-guard, calm-studio, cli, server, etc.) from the root `package-lock.json`.

### 3. Configure environment variables

Create a `.env.local` file in the project root:
Create a `.env.local` file in `calm-suite/calm-guard/`:

```bash
# Required — Gemini is the default LLM provider
Expand All @@ -51,8 +55,10 @@ OPENAI_API_KEY=your-openai-key

### 4. Start the development server

From the monorepo root:

```bash
pnpm dev
npm run dev --workspace=calmguard
```

The app will be available at [http://localhost:3000](http://localhost:3000).
Expand Down
6 changes: 3 additions & 3 deletions calm-suite/calm-guard/docs/docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,18 @@ We follow responsible disclosure and will credit reporters in our changelog.

## Dependencies

Security-relevant dependencies are audited with `pnpm audit`. Run:
Security-relevant dependencies are audited with `npm audit`. Run from the monorepo root:

```bash
pnpm audit
npm audit
```

Known issues will be tracked in GitHub Issues with the `security` label.

License compliance is checked with:

```bash
pnpm license-check
npm run license-check --workspace=calmguard
```

This fails on GPL/AGPL dependencies to ensure no copyleft code enters the project.
Loading
Loading