Skip to content

Commit 80ad2c1

Browse files
committed
fix: update AGENTS.md to match actual template APIs
- Replace deprecated OlapTable/Stream/IngestApi examples with IngestPipeline - Python templates: use Pydantic BaseModel + IngestPipelineConfig, fix "export" terminology to "import in main.py" - TypeScript templates: add explicit entry file path (app/index.ts) - Fix duplicated step number in typescript-mcp AGENTS.md
1 parent 00d6495 commit 80ad2c1

File tree

17 files changed

+184
-218
lines changed

17 files changed

+184
-218
lines changed

templates/ads-b-frontend/AGENTS.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ Use `moose --help` to discover all commands. Most useful for getting context:
6464

6565
### Adding a data model
6666

67-
MooseStack's core pattern: define a TypeScript interface once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
67+
MooseStack's core pattern: define a TypeScript interface once, then configure an `IngestPipeline` to create your data pipeline.
6868

6969
```typescript
70-
import { OlapTable, Stream, IngestApi } from "@514labs/moose-lib";
70+
import { IngestPipeline } from "@514labs/moose-lib";
7171

7272
export interface PageView {
7373
viewId: string;
@@ -77,16 +77,10 @@ export interface PageView {
7777
durationMs: number;
7878
}
7979

80-
export const PageViewTable = new OlapTable<PageView>("PageView", {
81-
orderByFields: ["userId", "timestamp"],
82-
});
83-
84-
export const PageViewStream = new Stream<PageView>("PageView", {
85-
destination: PageViewTable,
86-
});
87-
88-
export const PageViewApi = new IngestApi<PageView>("PageView", {
89-
destination: PageViewStream,
80+
export const PageViewPipeline = new IngestPipeline<PageView>("PageView", {
81+
table: { orderByFields: ["userId", "timestamp"] },
82+
stream: true,
83+
ingestApi: true,
9084
});
9185
```
9286

@@ -98,6 +92,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
9892

9993
- **DO** use `orderByFields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
10094
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
101-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
95+
- **DO** use `IngestPipeline` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
10296
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
103-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
97+
- **DO** export new primitives from your app's entry file (`app/index.ts`). **DON'T** forget to export — MooseStack won't discover unexported primitives.

templates/ads-b/AGENTS.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Use `moose --help` to discover all commands. Most useful for getting context:
6060

6161
### Adding a data model
6262

63-
MooseStack's core pattern: define a TypeScript interface once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
63+
MooseStack's core pattern: define a TypeScript interface once, then configure an `IngestPipeline` to create your data pipeline.
6464

6565
```typescript
66-
import { OlapTable, Stream, IngestApi } from "@514labs/moose-lib";
66+
import { IngestPipeline } from "@514labs/moose-lib";
6767

6868
export interface PageView {
6969
viewId: string;
@@ -73,16 +73,10 @@ export interface PageView {
7373
durationMs: number;
7474
}
7575

76-
export const PageViewTable = new OlapTable<PageView>("PageView", {
77-
orderByFields: ["userId", "timestamp"],
78-
});
79-
80-
export const PageViewStream = new Stream<PageView>("PageView", {
81-
destination: PageViewTable,
82-
});
83-
84-
export const PageViewApi = new IngestApi<PageView>("PageView", {
85-
destination: PageViewStream,
76+
export const PageViewPipeline = new IngestPipeline<PageView>("PageView", {
77+
table: { orderByFields: ["userId", "timestamp"] },
78+
stream: true,
79+
ingestApi: true,
8680
});
8781
```
8882

@@ -94,6 +88,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
9488

9589
- **DO** use `orderByFields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
9690
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
97-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
91+
- **DO** use `IngestPipeline` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
9892
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
99-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
93+
- **DO** export new primitives from your app's entry file (`app/index.ts`). **DON'T** forget to export — MooseStack won't discover unexported primitives.

templates/brainwaves/AGENTS.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ Use `moose --help` to discover all commands. Most useful for getting context:
6363

6464
### Adding a data model
6565

66-
MooseStack's core pattern: define a TypeScript interface once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
66+
MooseStack's core pattern: define a TypeScript interface once, then configure an `IngestPipeline` to create your data pipeline.
6767

6868
```typescript
69-
import { OlapTable, Stream, IngestApi } from "@514labs/moose-lib";
69+
import { IngestPipeline } from "@514labs/moose-lib";
7070

7171
export interface PageView {
7272
viewId: string;
@@ -76,16 +76,10 @@ export interface PageView {
7676
durationMs: number;
7777
}
7878

79-
export const PageViewTable = new OlapTable<PageView>("PageView", {
80-
orderByFields: ["userId", "timestamp"],
81-
});
82-
83-
export const PageViewStream = new Stream<PageView>("PageView", {
84-
destination: PageViewTable,
85-
});
86-
87-
export const PageViewApi = new IngestApi<PageView>("PageView", {
88-
destination: PageViewStream,
79+
export const PageViewPipeline = new IngestPipeline<PageView>("PageView", {
80+
table: { orderByFields: ["userId", "timestamp"] },
81+
stream: true,
82+
ingestApi: true,
8983
});
9084
```
9185

@@ -97,6 +91,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
9791

9892
- **DO** use `orderByFields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
9993
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
100-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
94+
- **DO** use `IngestPipeline` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
10195
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
102-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
96+
- **DO** export new primitives from your app's entry file (`app/index.ts`). **DON'T** forget to export — MooseStack won't discover unexported primitives.

templates/github-dev-trends/AGENTS.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ Use `moose --help` to discover all commands. Most useful for getting context:
6666

6767
### Adding a data model
6868

69-
MooseStack's core pattern: define a TypeScript interface once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
69+
MooseStack's core pattern: define a TypeScript interface once, then configure an `IngestPipeline` to create your data pipeline.
7070

7171
```typescript
72-
import { OlapTable, Stream, IngestApi } from "@514labs/moose-lib";
72+
import { IngestPipeline } from "@514labs/moose-lib";
7373

7474
export interface PageView {
7575
viewId: string;
@@ -79,16 +79,10 @@ export interface PageView {
7979
durationMs: number;
8080
}
8181

82-
export const PageViewTable = new OlapTable<PageView>("PageView", {
83-
orderByFields: ["userId", "timestamp"],
84-
});
85-
86-
export const PageViewStream = new Stream<PageView>("PageView", {
87-
destination: PageViewTable,
88-
});
89-
90-
export const PageViewApi = new IngestApi<PageView>("PageView", {
91-
destination: PageViewStream,
82+
export const PageViewPipeline = new IngestPipeline<PageView>("PageView", {
83+
table: { orderByFields: ["userId", "timestamp"] },
84+
stream: true,
85+
ingestApi: true,
9286
});
9387
```
9488

@@ -100,6 +94,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
10094

10195
- **DO** use `orderByFields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
10296
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
103-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
97+
- **DO** use `IngestPipeline` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
10498
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
105-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
99+
- **DO** export new primitives from your app's entry file (`app/index.ts`). **DON'T** forget to export — MooseStack won't discover unexported primitives.

templates/live-heartrate-leaderboard/AGENTS.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,28 @@ Use `moose --help` to discover all commands. Most useful for getting context:
6767

6868
### Adding a data model
6969

70-
MooseStack's core pattern: define a Python dataclass once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
70+
MooseStack's core pattern: define a Pydantic model once, then configure an `IngestPipeline` to create your data pipeline.
7171

7272
```python
73-
from moose_lib import OlapTable, Stream, IngestApi
74-
from dataclasses import dataclass
73+
from moose_lib import IngestPipeline, IngestPipelineConfig
74+
from pydantic import BaseModel
7575
from datetime import datetime
7676

77-
@dataclass
78-
class PageView:
77+
class PageView(BaseModel):
7978
view_id: str
8079
timestamp: datetime
8180
url: str
8281
user_id: str
8382
duration_ms: int
8483

85-
PageViewTable = OlapTable[PageView]("PageView", order_by_fields=["user_id", "timestamp"])
86-
PageViewStream = Stream[PageView]("PageView", destination=PageViewTable)
87-
PageViewApi = IngestApi[PageView]("PageView", destination=PageViewStream)
84+
page_view_pipeline = IngestPipeline[PageView](
85+
"PageView",
86+
IngestPipelineConfig(
87+
table=True,
88+
stream=True,
89+
ingest_api=True,
90+
),
91+
)
8892
```
8993

9094
Use `order_by_fields` to control ClickHouse table ordering — put your most-filtered columns first. Use the ClickHouse Best Practices Skill to choose the right ordering.
@@ -95,6 +99,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
9599

96100
- **DO** use `order_by_fields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
97101
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
98-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
102+
- **DO** use `IngestPipeline` with `IngestPipelineConfig` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
99103
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
100-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
104+
- **DO** import new primitives in your app's `main.py`. **DON'T** leave modules unimported — MooseStack discovers primitives by loading `main.py`, so unimported modules won't be found.

templates/next-app-empty/AGENTS.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ Use `moose --help` to discover all commands. Most useful for getting context:
6363

6464
### Adding a data model
6565

66-
MooseStack's core pattern: define a TypeScript interface once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
66+
MooseStack's core pattern: define a TypeScript interface once, then configure an `IngestPipeline` to create your data pipeline.
6767

6868
```typescript
69-
import { OlapTable, Stream, IngestApi } from "@514labs/moose-lib";
69+
import { IngestPipeline } from "@514labs/moose-lib";
7070

7171
export interface PageView {
7272
viewId: string;
@@ -76,16 +76,10 @@ export interface PageView {
7676
durationMs: number;
7777
}
7878

79-
export const PageViewTable = new OlapTable<PageView>("PageView", {
80-
orderByFields: ["userId", "timestamp"],
81-
});
82-
83-
export const PageViewStream = new Stream<PageView>("PageView", {
84-
destination: PageViewTable,
85-
});
86-
87-
export const PageViewApi = new IngestApi<PageView>("PageView", {
88-
destination: PageViewStream,
79+
export const PageViewPipeline = new IngestPipeline<PageView>("PageView", {
80+
table: { orderByFields: ["userId", "timestamp"] },
81+
stream: true,
82+
ingestApi: true,
8983
});
9084
```
9185

@@ -97,6 +91,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
9791

9892
- **DO** use `orderByFields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
9993
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
100-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
94+
- **DO** use `IngestPipeline` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
10195
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
102-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
96+
- **DO** export new primitives from your app's entry file (`app/index.ts`). **DON'T** forget to export — MooseStack won't discover unexported primitives.

templates/python-empty/AGENTS.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,28 @@ Use `moose --help` to discover all commands. Most useful for getting context:
5757

5858
### Adding a data model
5959

60-
MooseStack's core pattern: define a Python dataclass once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
60+
MooseStack's core pattern: define a Pydantic model once, then configure an `IngestPipeline` to create your data pipeline.
6161

6262
```python
63-
from moose_lib import OlapTable, Stream, IngestApi
64-
from dataclasses import dataclass
63+
from moose_lib import IngestPipeline, IngestPipelineConfig
64+
from pydantic import BaseModel
6565
from datetime import datetime
6666

67-
@dataclass
68-
class PageView:
67+
class PageView(BaseModel):
6968
view_id: str
7069
timestamp: datetime
7170
url: str
7271
user_id: str
7372
duration_ms: int
7473

75-
PageViewTable = OlapTable[PageView]("PageView", order_by_fields=["user_id", "timestamp"])
76-
PageViewStream = Stream[PageView]("PageView", destination=PageViewTable)
77-
PageViewApi = IngestApi[PageView]("PageView", destination=PageViewStream)
74+
page_view_pipeline = IngestPipeline[PageView](
75+
"PageView",
76+
IngestPipelineConfig(
77+
table=True,
78+
stream=True,
79+
ingest_api=True,
80+
),
81+
)
7882
```
7983

8084
Use `order_by_fields` to control ClickHouse table ordering — put your most-filtered columns first. Use the ClickHouse Best Practices Skill to choose the right ordering.
@@ -85,6 +89,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
8589

8690
- **DO** use `order_by_fields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
8791
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
88-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
92+
- **DO** use `IngestPipeline` with `IngestPipelineConfig` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
8993
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
90-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
94+
- **DO** import new primitives in your app's `main.py`. **DON'T** leave modules unimported — MooseStack discovers primitives by loading `main.py`, so unimported modules won't be found.

templates/python-experimental/AGENTS.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Ports used: 4000, 5001, 7233, 8080, 9000, 18123. See `moose.config.toml` to chan
1212

1313
| File | Purpose |
1414
| --- | --- |
15-
| `app/ingest/models.py` | Data models (dataclasses + pipeline declarations) |
15+
| `app/ingest/models.py` | Data models (Pydantic models + pipeline declarations) |
1616
| `moose.config.toml` | Port and service configuration |
1717

1818
## Dev Environment
@@ -58,24 +58,28 @@ Use `moose --help` to discover all commands. Most useful for getting context:
5858

5959
### Adding a data model
6060

61-
MooseStack's core pattern: define a Python dataclass once, then wire up individual primitives (`OlapTable`, `Stream`, `IngestApi`) to create your data pipeline.
61+
MooseStack's core pattern: define a Pydantic model once, then configure an `IngestPipeline` to create your data pipeline.
6262

6363
```python
64-
from moose_lib import OlapTable, Stream, IngestApi
65-
from dataclasses import dataclass
64+
from moose_lib import IngestPipeline, IngestPipelineConfig
65+
from pydantic import BaseModel
6666
from datetime import datetime
6767

68-
@dataclass
69-
class PageView:
68+
class PageView(BaseModel):
7069
view_id: str
7170
timestamp: datetime
7271
url: str
7372
user_id: str
7473
duration_ms: int
7574

76-
PageViewTable = OlapTable[PageView]("PageView", order_by_fields=["user_id", "timestamp"])
77-
PageViewStream = Stream[PageView]("PageView", destination=PageViewTable)
78-
PageViewApi = IngestApi[PageView]("PageView", destination=PageViewStream)
75+
page_view_pipeline = IngestPipeline[PageView](
76+
"PageView",
77+
IngestPipelineConfig(
78+
table=True,
79+
stream=True,
80+
ingest_api=True,
81+
),
82+
)
7983
```
8084

8185
Use `order_by_fields` to control ClickHouse table ordering — put your most-filtered columns first. Use the ClickHouse Best Practices Skill to choose the right ordering.
@@ -86,6 +90,6 @@ For advanced table configuration (engines, indexes, projections), see `moose doc
8690

8791
- **DO** use `order_by_fields` to define ClickHouse table ordering. **DON'T** rely on default ordering — always specify based on query patterns.
8892
- **DO** use `currentDatabase()` in SQL queries. **DON'T** hardcode the database name.
89-
- **DO** use `OlapTable` + `Stream` + `IngestApi` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
93+
- **DO** use `IngestPipeline` with `IngestPipelineConfig` for new data models. **DON'T** write raw CREATE TABLE DDL — MooseStack generates tables from your models.
9094
- **DO** use the ClickHouse Best Practices Skill for schema decisions. **DON'T** guess at ClickHouse data types or engine choices.
91-
- **DO** export new primitives from your app's entry file. **DON'T** forget to export — MooseStack won't discover unexported primitives.
95+
- **DO** import new primitives in your app's `main.py`. **DON'T** leave modules unimported — MooseStack discovers primitives by loading `main.py`, so unimported modules won't be found.

0 commit comments

Comments
 (0)