|
| 1 | +# {{PROJECT_TITLE}} — Copilot Instructions |
| 2 | + |
| 3 | +> Auto-generated by `create-objectstack`. Customise freely. |
| 4 | +
|
| 5 | +## Project Context |
| 6 | + |
| 7 | +This is an **ObjectStack** application — a metadata-driven low-code project |
| 8 | +that defines business objects, views, automations, and AI agents in TypeScript. |
| 9 | + |
| 10 | +- **Entry point:** `objectstack.config.ts` (uses `defineStack()`) |
| 11 | +- **Spec package:** `@objectstack/spec` (Zod-first schemas and types) |
| 12 | + |
| 13 | +## Naming Conventions |
| 14 | + |
| 15 | +| Context | Convention | Example | |
| 16 | +|:--------|:-----------|:--------| |
| 17 | +| Config keys (TS props) | `camelCase` | `maxLength`, `defaultValue` | |
| 18 | +| Machine names (data values) | `snake_case` | `project_task`, `first_name` | |
| 19 | +| Metadata type names | singular | `'agent'`, `'view'`, `'flow'` | |
| 20 | +| File names | `{name}.{type}.ts` | `task.object.ts`, `main.app.ts` | |
| 21 | + |
| 22 | +## Key Rules |
| 23 | + |
| 24 | +1. **Zod First** — All schema definitions start with Zod. Types are derived via `z.infer<>`. |
| 25 | +2. `defineStack()` is the single configuration entry point in `objectstack.config.ts`. |
| 26 | +3. Use `Object.values()` barrel pattern for metadata arrays. |
| 27 | +4. Import from `@objectstack/spec` — never use relative paths into the spec package. |
| 28 | + |
| 29 | +## Project Structure |
| 30 | + |
| 31 | +``` |
| 32 | +{{PROJECT_NAME}}/ |
| 33 | +├── objectstack.config.ts # defineStack() — the single entry point |
| 34 | +├── src/ |
| 35 | +│ ├── objects/ # Business object definitions (snake_case names) |
| 36 | +│ ├── views/ # UI view definitions (list, form, kanban, calendar) |
| 37 | +│ ├── apps/ # App navigation & page structure |
| 38 | +│ ├── flows/ # Automation flows & workflows |
| 39 | +│ ├── actions/ # Custom actions (buttons, bulk ops) |
| 40 | +│ ├── dashboards/ # BI dashboards |
| 41 | +│ ├── reports/ # Analytics reports |
| 42 | +│ ├── agents/ # AI agent definitions |
| 43 | +│ ├── i18n/ # Translation bundles |
| 44 | +│ └── handlers/ # Runtime hook handlers |
| 45 | +``` |
| 46 | + |
| 47 | +## AI Skills |
| 48 | + |
| 49 | +This project uses ObjectStack skills from `objectstack-ai/framework`. |
| 50 | +Install or update skills with the standard [skills CLI](https://skills.sh/): |
| 51 | + |
| 52 | +```bash |
| 53 | +npx skills add objectstack-ai/framework |
| 54 | +``` |
| 55 | + |
| 56 | +Skills are triggered automatically based on task context: |
| 57 | + |
| 58 | +| Skill | Trigger Context | |
| 59 | +|:------|:----------------| |
| 60 | +| **objectstack-schema** | Define objects, fields, relationships, validations, indexes | |
| 61 | +| **objectstack-query** | Filters, sorting, pagination, aggregation, ObjectQL | |
| 62 | +| **objectstack-ui** | Views, dashboards, apps, reports, actions, navigation | |
| 63 | +| **objectstack-api** | REST endpoints, authentication, service contracts | |
| 64 | +| **objectstack-plugin** | Plugin lifecycle, DI, services, hooks, events | |
| 65 | +| **objectstack-automation** | Flows, workflows, triggers, approvals, state machines | |
| 66 | +| **objectstack-ai** | Agents, tools, skills, RAG pipelines, LLM config | |
| 67 | +| **objectstack-quickstart** | Project setup, defineStack(), driver selection | |
| 68 | +| **objectstack-i18n** | Translation bundles, locale config, coverage detection | |
| 69 | + |
| 70 | +## Learn More |
| 71 | + |
| 72 | +- [ObjectStack Documentation](https://objectstack.com/docs) |
| 73 | +- [GitHub: objectstack-ai/framework](https://github.com/objectstack-ai/framework) |
| 74 | +- [Skills CLI](https://skills.sh/) — Manage AI skills across agents |
0 commit comments