You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- AGENTS.md: replace the retired packages/* monorepo description with the real
single-app flat src/{type}/ layout; add *.flow.ts to the file-suffix protocol;
fix stale example paths and the dependencies note
- docs/MAINTENANCE.md: platform-upgrade + seed-staleness + version-alignment playbook
- docs/requirements/: file-based, AI-native requirements log mapping a raw
customer requirement to a standard-product disposition (A/B/C/D), with the
overlay-vs-core seam; includes TEMPLATE.md and an illustrative REQ-0001
- wire the new docs into docs/README.md nav and .github/tasks/new-feature.md
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
├── content/docs/ # Product documentation site content
45
+
└── docs/ # Internal maintainer documentation
38
46
```
39
47
48
+
> The retired multi-package (`packages/*`) direction is archived under
49
+
> `docs/archive/`. Do NOT create `packages/<x>/src/` paths — everything lives in the
50
+
> flat `src/{type}/` tree above.
51
+
40
52
## 💻 Tech Stack & Protocol
41
53
42
54
1.**Metadata-First (`*object.ts`)**:
@@ -60,12 +72,12 @@ hotcrm/
60
72
When asked to implement a feature, you MUST follow this **Thinking Process**:
61
73
62
74
### Phase 1: Architecture & Planning
63
-
1.**Analyze**: Identify the Business Package (e.g., `packages/hr`) and Dependencies.
75
+
1.**Analyze**: Identify the domain area (e.g., sales, service, marketing) and the metadata it touches.
64
76
2.**Schema Design**: List all necessary Objects, Fields, and Relationships.
65
77
3.**File Inventory**: List exact file paths to be created.
66
-
*`src/candidate.object.ts` (Data)
67
-
*`src/candidate.workflow.ts` (Automation)
68
-
*`src/candidate.page.ts` (UI)
78
+
*`src/objects/candidate.object.ts` (Data)
79
+
*`src/flows/candidate.flow.ts` (Automation)
80
+
*`src/pages/candidate.page.ts` (UI)
69
81
70
82
### Phase 2: Implementation (Iterative)
71
83
1.**Metadata First**: Create `*.object.ts` files first. They are the source of truth.
@@ -81,12 +93,13 @@ After generating code, ask yourself:
81
93
82
94
## 📝 Coding Standards (The "File Suffix Protocol")
83
95
84
-
We enforce strict file naming to separate concerns. Files should be located in `packages/{package_name}/src/`.
96
+
We enforce strict file naming to separate concerns. Files live under `src/{type}/`, grouped by metadata type (e.g. `src/objects/`, `src/flows/`, `src/views/`).
85
97
86
98
### Core File Types
87
99
-`*.object.ts`: Data Model (Schema) — validated with `ObjectSchema.parse()`
88
100
-`*.hook.ts`: Server-side Business Logic (Triggers)
89
101
-`*.action.ts`: API Endpoints & AI Tools
102
+
-`*.flow.ts`: Automation Flows — typed as `Automation.Flow` from `@objectstack/spec/automation`
90
103
-`*.page.ts`: UI Page Layouts — validated with `PageSchema` from `@objectstack/spec/ui`
91
104
-`*.view.ts`: List View Configurations — validated with `ViewSchema` from `@objectstack/spec/ui`
92
105
@@ -130,19 +143,19 @@ Use the most specific `Field` type available from `@objectstack/spec/data`:
3.**Expose Action**: Create `src/actions/{action}.action.ts` if external API/AI needed.
149
+
4.**Config UI**: Create `src/views/{entity}.view.ts` and `src/pages/{entity}.page.ts`.
137
150
138
151
## ⚠️ Constraint Checklist
139
152
140
153
-**Object Naming**: All HotCRM business objects MUST be prefixed with `crm_` (e.g., `crm_account`, `crm_opportunity`, `crm_case`, `crm_lead`, `crm_campaign`, `crm_contact`, `crm_contract`, `crm_product`, `crm_quote`, `crm_quote_line_item`, `crm_opportunity_line_item`, `crm_task`, `crm_campaign_member`, `crm_knowledge_article`, `crm_forecast`). All references — `reference_to`, `lookup`, `masterDetail`, cube `sql`, view `data.object`, hook `object`, navigation `objectName`, action `objectName`, dashboard `object` — MUST use the prefixed form. Platform objects keep their existing `sys_*` prefix.
141
154
-**i18n**: Every new object must have entries in all 4 locale files (`src/translations/{en,zh-CN,es-ES,ja-JP}.ts`) — label, pluralLabel, all field labels + option labels, view labels, navigation labels. No new feature ships without all 4 locales.
142
-
-**Docs**: Every new object/feature requires user-facing documentation under `content/docs/{sales|service|marketing|...}/` written for business users + admins (not developers).
155
+
-**Docs**: Every new object/feature requires user-facing documentation under `content/docs/` (e.g. `getting-started/`, `guides/`, `marketing/`, `analytics/`, `administration/`) written for business users + admins (not developers).
143
156
-**Documentation**: All documentation MUST be in English.
144
157
-**No Engine Code**: Do not try to modify the core runtime code. Focus on the *usage* of the runtime.
145
-
-**Dependencies**: HotCRM packages should depend on`@objectstack/runtime` (as peerDependency) and other sibling packages if structure allows.
158
+
-**Dependencies**: HotCRM depends on the published`@objectstack/*` packages (runtime, spec, drivers, services) declared in `package.json`. Keep `specVersion` in `objectstack.manifest.json` aligned with the installed `@objectstack/spec`.
146
159
-**Tone**: Act as a Senior 10x Engineer. Be concise, professional, and technically accurate.
147
160
148
161
> **Naming note (ADR-0048):** the `crm_` prefix above is a deliberate HotCRM
@@ -162,7 +175,7 @@ The following are **NOT** in HotCRM's scope — they are platform-level features
**Focus Area**: HotCRM focuses exclusively on **business domain packages** (CRM, Finance, HR, Marketing, Products, Support) and their **business logic, data models, and AI capabilities**.
178
+
**Focus Area**: HotCRM focuses exclusively on **business domains** (CRM, Finance, HR, Marketing, Products, Support) and their **business logic, data models, and AI capabilities** — authored as metadata in `src/`.
0 commit comments