Skip to content

Commit cf45e51

Browse files
Copilothotlong
andcommitted
docs: update ROADMAP, CONTRIBUTING, and DEVELOPMENT_WORKFLOW
- ROADMAP.md: fix last-updated date, add Phase 15 section, add version entry - CONTRIBUTING.md: add typecheck/ROADMAP to pre-submission checklist - DEVELOPMENT_WORKFLOW.md: update hook examples to use HookContext Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 21d9975 commit cf45e51

3 files changed

Lines changed: 45 additions & 9 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ Only the compiled `dist/` folder is included in published packages (controlled b
143143
## 🔄 Pull Request Process
144144

145145
1. **Before Creating a PR**
146-
- Ensure all tests pass
147-
- Run linting and fix any issues
146+
- Ensure all tests pass (`pnpm test`)
147+
- Run type checking (`pnpm typecheck`)
148+
- Run linting and fix any issues (`pnpm lint`)
148149
- Update documentation if needed
149150
- Add tests for new features
151+
- Update ROADMAP.md if the change completes a roadmap item
150152
- **Add a changeset** if your changes affect package behavior
151153

152154
2. **Creating a PR**

DEVELOPMENT_WORKFLOW.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,18 @@ export default ObjectSchema.create({
8686

8787
```typescript
8888
// packages/{pkg}/src/my_entity.hook.ts
89-
export function beforeInsert(context: any) {
90-
const { doc, broker } = context;
89+
import type { HookContext } from '@objectstack/spec/data';
90+
91+
export function beforeInsert(context: HookContext) {
92+
const doc = context.input.doc as Record<string, any>;
9193
// Validation and business logic
9294
if (!doc.name) {
9395
throw new Error('Name is required');
9496
}
9597
}
9698

97-
export function afterInsert(context: any) {
98-
const { doc, broker } = context;
99+
export function afterInsert(context: HookContext) {
100+
const doc = context.result as Record<string, any>;
99101
// Post-creation side effects (notifications, related records, etc.)
100102
}
101103
```
@@ -204,8 +206,10 @@ If the field needs validation or side effects, add logic to the hook file:
204206

205207
```typescript
206208
// packages/crm/src/account.hook.ts
207-
export function beforeInsert(context: any) {
208-
const { doc } = context;
209+
import type { HookContext } from '@objectstack/spec/data';
210+
211+
export function beforeInsert(context: HookContext) {
212+
const doc = context.input.doc as Record<string, any>;
209213
// Validate URL format if provided
210214
if (doc.website_url && !doc.website_url.startsWith('http')) {
211215
doc.website_url = 'https://' + doc.website_url;

ROADMAP.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# HotCRM Development Roadmap
22

33
> Comprehensive development plan for HotCRM — the world's first AI-Native CRM.
4-
> Protocol: @objectstack/spec v3.0.8 | Last Updated: February 21, 2027
4+
> Protocol: @objectstack/spec v3.0.8 | Last Updated: February 2026
55
66
## Strategic Direction
77

@@ -15,6 +15,7 @@
1515
2027 Q1-Q2 ████████████████████████████████ Phase 13: Module Optimization & Seed Data ✅ COMPLETE
1616
2027 Q2-Q3 ████████████████████████████████ Phase 14: v3.0.8 Feed & Interface Builder Adoption ✅ COMPLETE
1717
2027+ ████████████████████████████████ Phase 12E: Advanced AI & Enterprise Features ✅ COMPLETE
18+
2026 Q1 ████████████████████████████████ Phase 15: Repository Quality & DX Improvements 🔄 IN PROGRESS
1819
```
1920

2021
## Current State Summary
@@ -171,10 +172,39 @@ These items were deferred during Phase 13 and have been completed:
171172

172173
---
173174

175+
### Phase 15: Repository Quality & DX Improvements (2026 Q1)
176+
177+
> Goal: Improve code quality, CI/CD, documentation accuracy, and developer experience.
178+
179+
#### High Priority
180+
181+
- [x] **DEVELOPMENT_WORKFLOW.md test count** — Remove hardcoded test count; use dynamic description
182+
- [x] **Hook `any` type migration** — Replace `ctx: any` with `ctx: HookContext` in 18 helper functions across hook files
183+
- [x] **pnpm-workspace.yaml documentation** — Add comment explaining core/server exclusion reason
184+
- [x] **CI workflow typecheck** — Add `pnpm typecheck` step to CI workflow
185+
- [x] **Code quality workflow paths** — Fix `src/` references to `packages/` in code-quality workflow
186+
187+
#### Medium Priority
188+
189+
- [x] **ESLint version alignment** — Align `@typescript-eslint/parser` (^6 → ^7) with `@typescript-eslint/eslint-plugin` (^7)
190+
- [x] **CONTRIBUTING.md checklist** — Add pre-submission development checklist (typecheck, test, ROADMAP)
191+
- [x] **Documentation hook examples** — Update DEVELOPMENT_WORKFLOW.md code examples to use `HookContext` instead of `any`
192+
- [x] **ROADMAP.md date sync** — Update last-updated date and version timeline to match current state
193+
194+
#### Deferred / Future
195+
196+
- [ ] **Structured logging migration** — Replace `console.log` with pino logger across hook files
197+
- [ ] **Legacy API cleanup** — Remove `db.ts` references and migrate to broker/ObjectQL
198+
- [ ] **E2E test coverage** — Build API-layer end-to-end tests for Feed API / MCP API
199+
- [ ] **FormView `as any` cleanup** — Remove `as any` casts once `@objectstack/spec` aligns FormView column types
200+
201+
---
202+
174203
## Version Upgrade History
175204

176205
| Date | From | To | Breaking Changes | Tests |
177206
|------|------|----|-----------------|-------|
207+
| 2026-02-21 | v3.0.8 | v3.0.8 | None (Phase 15: Repository quality improvements — hook `any` type migration, CI typecheck, ESLint version alignment, documentation updates, code-quality workflow fixes) | 3799 ✅ |
178208
| 2027-02-21 | v3.0.8 | v3.0.8 | None (Phase 14 complete: Activity Feed/Chatter across 6 clouds, 4 Interface Builder blank pages, Dashboard headers & global filters on 6 clouds, ViewTabs on 18 views, Feed API 8 endpoints, Feed service contract, System metadata, Studio builder configs, Navigation areas, 327 new tests) | 3707 ✅ |
179209
| 2026-02-21 | v3.0.6 | v3.0.8 | None (New: Activity Feed/Chatter system, Interface Builder/Blank Pages, Dashboard headers & global filters, Feed API contracts, Studio builder configs, Oclif CLI plugin, Package conventions; Phase 14 roadmap added) | 3318 ✅ |
180210
| 2026-02-16 | v3.0.0 | v3.0.0 | None (Phase 13 roadmap: Module-by-module deep optimization, seed data foundation, vertical package UI enhancement, core cloud metadata equalization) | 3318 ✅ |

0 commit comments

Comments
 (0)