Add project bible rules and update README
- rules/patterns/go-project-bible/contract.md: required files, ADL format, runtime-flows rules, what not to duplicate, how to keep current - README.md: rewritten to reflect actual repo purpose and structure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
65
README.md
65
README.md
@@ -1,41 +1,44 @@
|
||||
# UI Design Code
|
||||
# Bible
|
||||
|
||||
Submodule-first design-code kit for Go web applications and AI coding agents.
|
||||
Shared engineering rules library for Go web projects.
|
||||
|
||||
This repository is meant to be added to host projects as a git submodule and used to
|
||||
copy/sync canonical documentation, AI instruction templates, scaffolds, and UI pattern
|
||||
building blocks.
|
||||
Add as a git submodule to any project — agents (Claude, Codex) will read the rules automatically.
|
||||
|
||||
## Intended Usage
|
||||
|
||||
1. Add as submodule (recommended path: `tools/ui-design-code`)
|
||||
2. Use `tools/designsync` to list/plan/apply bundles into the host repo
|
||||
3. Review changes and commit in the host repo
|
||||
|
||||
## Public Surface (stable)
|
||||
|
||||
- `kit/`
|
||||
- `exports/`
|
||||
- `tools/designsync/`
|
||||
- `README.md`
|
||||
- `VERSIONING.md`
|
||||
- `CHANGELOG.md`
|
||||
|
||||
`demo/` is a runnable reference app and may change faster.
|
||||
|
||||
## Quick Start (this repo)
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
go test ./...
|
||||
go build ./tools/designsync
|
||||
# Add to a project
|
||||
git submodule add https://git.mchus.pro/mchus/bible.git bible
|
||||
|
||||
cd demo
|
||||
go test ./...
|
||||
go run ./cmd/demo-server
|
||||
# Update to latest rules
|
||||
git submodule update --remote bible
|
||||
```
|
||||
|
||||
## Documentation
|
||||
## Structure
|
||||
|
||||
- Architecture source of truth: `bible/README.md`
|
||||
- AI instructions: `CLAUDE.md`, `AGENTS.md`
|
||||
```
|
||||
rules/patterns/ — shared engineering rule contracts
|
||||
go-logging/ — slog, server-side only
|
||||
go-database/ — cursor safety, soft delete, GORM, N+1
|
||||
go-api/ — REST conventions, error format, status codes
|
||||
go-background-tasks/ — Task Manager pattern, polling
|
||||
go-code-style/ — layering, error wrapping, startup sequence
|
||||
go-project-bible/ — how to write and maintain a project bible
|
||||
import-export/ — CSV Excel-compatible format, streaming export
|
||||
table-management/ — toolbar, filtering, pagination
|
||||
modal-workflows/ — state machine, htmx pattern, confirmation
|
||||
forms-validation/ — validation, multi-step flows
|
||||
controls-selection/ — buttons, checkboxes, segmented filters
|
||||
rules/ai/claude/
|
||||
CLAUDE.template.md — base CLAUDE.md template for new projects
|
||||
```
|
||||
|
||||
## Project Setup
|
||||
|
||||
Each project needs:
|
||||
- `bible/` — this submodule
|
||||
- `bible-local/` — project-specific architecture (data model, API, ADL)
|
||||
- `CLAUDE.md` + `AGENTS.md` — point agents to both
|
||||
|
||||
See `rules/ai/claude/CLAUDE.template.md` for a ready-made template.
|
||||
See `rules/patterns/go-project-bible/contract.md` for what goes in `bible-local/`.
|
||||
|
||||
Reference in New Issue
Block a user