Repository navigation
[WIP] Optimize GitHub AI development workflow - #52
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Created workflow.prompt.md with 3-phase development process - Created iteration.prompt.md with 5-week MVP strategy - Created versioning.prompt.md with semantic versioning guide - Created best-practices.prompt.md with security, performance, UX guides - Created troubleshooting.prompt.md with common issues and solutions - Created templates.prompt.md with CRM, ERP, PM templates - Added DEVELOPMENT_WORKFLOW.md as central development guide - Created CHANGELOG.md template for version tracking - Updated copilot-instructions.md with workflow references - Updated README.md with comprehensive documentation links Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive development workflow documentation for HotCRM to optimize the GitHub AI development workflow. The documentation is built around ObjectStack v0.6.1 best practices and provides extensive guidance for AI agents and developers.
Changes:
- Created 6 new AI development prompt guides (~4,326 lines total) covering workflow, iteration strategy, versioning, best practices, troubleshooting, and application templates
- Added central DEVELOPMENT_WORKFLOW.md guide (457 lines) with cross-references to all detailed guides
- Added CHANGELOG.md template for version tracking
- Updated README.md with comprehensive documentation references
- Enhanced .github/copilot-instructions.md with workflow guide references
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Added documentation section with links to all guides; updated prerequisites; added extra development commands; contains markdown syntax error |
| DEVELOPMENT_WORKFLOW.md | New central development guide consolidating all workflows, best practices, and processes; contains broken reference |
| CHANGELOG.md | New changelog template following Keep a Changelog format with usage instructions |
| .github/copilot-instructions.md | Updated with references to new workflow and process guides |
| .github/prompts/workflow.prompt.md | New comprehensive 3-phase development workflow guide (Data 60%, Logic 20%, UI 20%) |
| .github/prompts/iteration.prompt.md | New 5-week MVP development strategy with iteration-by-iteration guidance |
| .github/prompts/versioning.prompt.md | New semantic versioning and release process guide with automation examples |
| .github/prompts/best-practices.prompt.md | New comprehensive best practices for data modeling, security, performance, and UX |
| .github/prompts/troubleshooting.prompt.md | New troubleshooting guide with common issues and solutions |
| .github/prompts/templates.prompt.md | New application templates for CRM, ERP, and Project Management systems |
| - **[Quick Start](./QUICKSTART_DEVELOPMENT.md)** - Legacy quick start guide | ||
| - **[Protocol Compliance](./PROTOCOL_COMPLIANCE.md)** - @objectstack/spec v0.6.1 compliance details | ||
| - **[Contributing](./CONTRIBUTING.md)** - Contribution guidelines | ||
| ``` |
There was a problem hiding this comment.
There's an extra closing code fence (```) on line 219 that breaks the markdown structure. This line should be removed as it terminates the Development Documentation section prematurely and creates invalid markdown.
| ``` |
|
|
||
| ### Contributing | ||
| - [Contributing Guide](./CONTRIBUTING.md) | ||
| - [Code of Conduct](./CODE_OF_CONDUCT.md) |
There was a problem hiding this comment.
The DEVELOPMENT_WORKFLOW.md references a CODE_OF_CONDUCT.md file that does not exist in the repository. Either create this file or remove the reference from line 442. Standard practice is to include a Code of Conduct for open source projects, so adding one would be beneficial.
| - [Code of Conduct](./CODE_OF_CONDUCT.md) | |
| - [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v1 |
There was a problem hiding this comment.
The sample GitHub Actions workflow uses the third-party action softprops/action-gh-release@v1 pinned only to a mutable major version tag, which creates a supply chain risk if this config is used for real releases. If the action or its tag is compromised, attackers could run arbitrary code in your release job (with access to repository contents and GitHub tokens) and tamper with release artifacts or metadata. To reduce this risk, pin third-party actions like softprops/action-gh-release to an immutable commit SHA or vetted version and regularly review/rotate them as needed.
Optimize GitHub AI Development Workflow ✅
Successfully implemented comprehensive development workflow documentation for HotCRM based on ObjectStack best practices.
✅ Completed Tasks
📊 Documentation Summary
Files Created: 8 new files
Files Updated: 2 files
Content Coverage:
🎯 Key Features
📚 Documentation Structure
✨ Benefits for AI Agents
🔗 Integration
All documentation is:
📈 Quality Metrics
This PR provides a complete, production-ready development workflow system that will significantly improve AI agent effectiveness and developer productivity in HotCRM.
Original prompt
基于以下步骤优化GitHub ai 开发流程。
Define Application Config
Create objectstack.config.ts:
import { defineStack } from '@objectstack/spec';
import { App } from '@objectstack/spec/ui';
export default defineStack({
manifest: {
id: 'com.mycompany.app',
version: '1.0.0',
type: 'app',
name: 'My Application',
description: 'Enterprise application built with ObjectStack'
},
objects: [], // Add objects here
apps: [
App.create({
name: 'my_app',
label: 'My Application',
icon: 'building',
navigation: []
})
]
});
Development Workflow
Complete Development Process
The development workflow follows three main phases:
Phase 1: Data Layer Development (60% effort)
Define business objects, fields, relationships and validation rules.
Example Object Definition:
import { defineObject } from '@objectstack/spec/data';
import type { ObjectDefinition } from '@objectstack/spec/data';
export const Customer: ObjectDefinition = defineObject({
name: 'customer',
label: 'Customer',
labelPlural: 'Customers',
fields: {
name: {
type: 'text',
label: 'Company Name',
required: true,
maxLength: 255
},
industry: {
type: 'select',
label: 'Industry',
options: [
{ value: 'tech', label: 'Technology' },
{ value: 'finance', label: 'Finance' },
{ value: 'retail', label: 'Retail' }
]
},
revenue: {
type: 'currency',
label: 'Annual Revenue',
min: 0
}
},
enable: {
trackHistory: true,
apiEnabled: true,
searchEnabled: true
}
});
Phase 2: Business Logic Layer (20% effort)
Add validation rules, workflow automation, and permission control.
Validation Rules:
validations: [
{
type: 'script',
name: 'revenue_positive',
errorMessage: 'Revenue must be greater than 0',
formula: 'revenue > 0'
},
{
type: 'uniqueness',
fields: ['email'],
errorMessage: 'Email must be unique'
}
]
Workflows:
workflows: [
{
type: 'field_update',
name: 'set_status_on_approval',
trigger: {
on: 'update',
when: 'approval_status == "approved"'
},
actions: [
{
type: 'update_field',
field: 'status',
value: 'active'
}
]
}
]
Phase 3: UI Layer Development (20% effort)
Create views, actions, dashboards and reports.
List Views:
views: [
{
type: 'list',
name: 'all_customers',
viewType: 'grid',
label: 'All Customers',
columns: ['name', 'industry', 'revenue', 'status'],
defaultSort: { field: 'name', direction: 'asc' }
},
{
type: 'list',
name: 'customer_kanban',
viewType: 'kanban',
label: 'Customer Pipeline',
groupBy: 'status',
cardFields: ['name', 'industry', 'revenue']
}
]
Protocol Mapping Guide
File Suffix System
AI agents must strictly follow file suffix conventions:
File Suffix Business Meaning Zod Schema Use Case
*.object.ts Business Object ObjectSchema Define data table structure (e.g., Product, Customer)
*.field.ts Reusable Field FieldSchema Define common field configurations
*.view.ts View Configuration ViewSchema List views, form views
*.action.ts Action Button ActionSchema Custom action logic
*.dashboard.ts Dashboard DashboardSchema Data visualization panels
*.report.ts Report ReportSchema Data analysis reports
*.flow.ts Visual Flow FlowSchema Approval flows, business processes
*.workflow.ts Workflow Rules WorkflowSchema Automation rules
*.validation.ts Validation Rules ValidationSchema Data validation logic
*.permission.ts Permission Config PermissionSchema Access control
*.agent.ts AI Agent AgentSchema AI functionality integration
Naming Conventions
// ✅ CORRECT
export const ProjectTask: ObjectDefinition = defineObject({
name: 'project_task', // snake_case (machine name)
label: 'Project Task', // Human readable
fields: {
taskName: { // camelCase (config key)
type: 'text',
label: 'Task Name',
maxLength: 255 // camelCase (config key)
}
}
});
// ❌ WRONG
export const projectTask = { // Missing type annotation
name: 'ProjectTask', // Wrong: should be snake_case
fields: {
task_name: { // Wrong: should be camelCase
max_length: 255 // Wrong: should be camelCase
}
}
};
Iterative Development Strategy
MVP Development Path
Iteration 1: Core Objects (Week 1)
Goal: Establish basic data model
// Identify core objects
// CRM Example: Account, Contact, Opportunity
// ERP Example: Product, Order, Inventory
// Create minimal field set
fields: {
name: { type: 'text', required: true },
status: { type: 'select', options: ['active', 'inactive'] }
}
// Basic views
views: [
{ type: 'list', name: 'all', viewType: 'grid' }
]
Validation Criteria:
All objects support CRUD operations
List views display correctly
Field types render properly
Iteration 2: Relationships & Validati...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.