baldart 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +599 -0
- package/README.md +566 -0
- package/VERSION +1 -0
- package/bin/baldart.js +143 -0
- package/framework/.claude/agents/REGISTRY.md +169 -0
- package/framework/.claude/agents/api-perf-cost-auditor.md +291 -0
- package/framework/.claude/agents/code-reviewer.md +350 -0
- package/framework/.claude/agents/codebase-architect.md +391 -0
- package/framework/.claude/agents/coder.md +291 -0
- package/framework/.claude/agents/deep-human-insight.md +198 -0
- package/framework/.claude/agents/doc-reviewer.md +440 -0
- package/framework/.claude/agents/email-deliverability-architect.md +193 -0
- package/framework/.claude/agents/hybrid-ml-architect.md +285 -0
- package/framework/.claude/agents/hyper-gamification-designer.md +149 -0
- package/framework/.claude/agents/legal-counsel-gdpr.md +179 -0
- package/framework/.claude/agents/marketing-conversion-strategist.md +162 -0
- package/framework/.claude/agents/motion-expert.md +108 -0
- package/framework/.claude/agents/onboarding-architect-lead.md +230 -0
- package/framework/.claude/agents/plan-auditor.md +546 -0
- package/framework/.claude/agents/prd-card-writer.md +372 -0
- package/framework/.claude/agents/prd.md +744 -0
- package/framework/.claude/agents/qa-sentinel.md +305 -0
- package/framework/.claude/agents/remotion-animator-orchestrator.md +218 -0
- package/framework/.claude/agents/security-reviewer.md +276 -0
- package/framework/.claude/agents/senior-researcher.md +175 -0
- package/framework/.claude/agents/seo-analytics-strategist.md +156 -0
- package/framework/.claude/agents/skill-improver.md +61 -0
- package/framework/.claude/agents/ui-expert.md +191 -0
- package/framework/.claude/agents/visual-designer.md +190 -0
- package/framework/.claude/agents/website-orchestrator.md +118 -0
- package/framework/.claude/agents/wiki-curator.md +145 -0
- package/framework/.claude/commands/baldart-push.md +15 -0
- package/framework/.claude/commands/check.md +237 -0
- package/framework/.claude/commands/codexreview.md +203 -0
- package/framework/.claude/commands/design-review.md +11 -0
- package/framework/.claude/commands/issue-review.md +34 -0
- package/framework/.claude/commands/new.md +331 -0
- package/framework/.claude/commands/qa.md +257 -0
- package/framework/.claude/hooks/framework-edit-gate.js +208 -0
- package/framework/.claude/hooks/lint-before-commit.sh.template +66 -0
- package/framework/.claude/settings.local.json.example +32 -0
- package/framework/.claude/skills/api-design-principles/SKILL.md +567 -0
- package/framework/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
- package/framework/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
- package/framework/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
- package/framework/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
- package/framework/.claude/skills/baldart-push/SKILL.md +222 -0
- package/framework/.claude/skills/bug/SKILL.md +200 -0
- package/framework/.claude/skills/bug/references/logging-patterns.md +174 -0
- package/framework/.claude/skills/capture/SKILL.md +125 -0
- package/framework/.claude/skills/capture/references/synthesis-template.md +42 -0
- package/framework/.claude/skills/context-primer/SKILL.md +189 -0
- package/framework/.claude/skills/copywriting/SKILL.md +273 -0
- package/framework/.claude/skills/copywriting/references/copy-frameworks.md +338 -0
- package/framework/.claude/skills/copywriting/references/natural-transitions.md +252 -0
- package/framework/.claude/skills/doc-writing-for-rag/SKILL.md +119 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/before-after-examples.md +291 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/compact-templates.md +183 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/frontmatter-minimal.md +112 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/line-count-targets.md +110 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/schemas-and-errors.md +129 -0
- package/framework/.claude/skills/find-skills/SKILL.md +133 -0
- package/framework/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/framework/.claude/skills/frontend-design/SKILL.md +84 -0
- package/framework/.claude/skills/gamification-design/SKILL.md +130 -0
- package/framework/.claude/skills/issue-review/SKILL.md +45 -0
- package/framework/.claude/skills/kie-ai/SKILL.md +262 -0
- package/framework/.claude/skills/kie-ai/references/models-catalog.md +272 -0
- package/framework/.claude/skills/kie-ai/scripts/kie_api.sh +209 -0
- package/framework/.claude/skills/kie-ai/scripts/remove_greenscreen.py +69 -0
- package/framework/.claude/skills/kie-ai/scripts/setup_api_key.sh +77 -0
- package/framework/.claude/skills/motion-design/LICENSE +21 -0
- package/framework/.claude/skills/motion-design/README.md +82 -0
- package/framework/.claude/skills/motion-design/SKILL.md +336 -0
- package/framework/.claude/skills/motion-design/director/choreography.md +93 -0
- package/framework/.claude/skills/motion-design/director/context-adaptation.md +83 -0
- package/framework/.claude/skills/motion-design/director/core-philosophy.md +53 -0
- package/framework/.claude/skills/motion-design/director/decision-framework.md +91 -0
- package/framework/.claude/skills/motion-design/director/disney-principles.md +102 -0
- package/framework/.claude/skills/motion-design/director/emotion-mapping.md +71 -0
- package/framework/.claude/skills/motion-design/director/motion-personality.md +89 -0
- package/framework/.claude/skills/motion-design/director/narrative-structure.md +62 -0
- package/framework/.claude/skills/motion-design/patterns/ambient-continuous.md +81 -0
- package/framework/.claude/skills/motion-design/patterns/entrance-exit.md +82 -0
- package/framework/.claude/skills/motion-design/patterns/multi-element.md +69 -0
- package/framework/.claude/skills/motion-design/patterns/state-feedback.md +96 -0
- package/framework/.claude/skills/motion-design/reference/property-selection.md +95 -0
- package/framework/.claude/skills/motion-design/reference/quality-checklist.md +67 -0
- package/framework/.claude/skills/motion-design/reference/timing-easing-tables.md +106 -0
- package/framework/.claude/skills/motion-design/reference/troubleshooting.md +73 -0
- package/framework/.claude/skills/new/SKILL.md +1687 -0
- package/framework/.claude/skills/playwright-skill/API_REFERENCE.md +652 -0
- package/framework/.claude/skills/playwright-skill/SKILL.md +157 -0
- package/framework/.claude/skills/playwright-skill/package.json +26 -0
- package/framework/.claude/skills/prd/SKILL.md +228 -0
- package/framework/.claude/skills/prd/assets/card-template.yml +232 -0
- package/framework/.claude/skills/prd/assets/epic-template.yml +190 -0
- package/framework/.claude/skills/prd/assets/prd-template.md +230 -0
- package/framework/.claude/skills/prd/assets/state-template.md +78 -0
- package/framework/.claude/skills/prd/references/api-perf-gate.md +152 -0
- package/framework/.claude/skills/prd/references/audit-phase.md +478 -0
- package/framework/.claude/skills/prd/references/backlog-phase.md +145 -0
- package/framework/.claude/skills/prd/references/discovery-phase.md +359 -0
- package/framework/.claude/skills/prd/references/impact-analysis.md +233 -0
- package/framework/.claude/skills/prd/references/prd-add-phase.md +214 -0
- package/framework/.claude/skills/prd/references/prd-writing-phase.md +145 -0
- package/framework/.claude/skills/prd/references/research-phase.md +216 -0
- package/framework/.claude/skills/prd/references/ui-design-phase.md +61 -0
- package/framework/.claude/skills/prd/references/validation-phase.md +72 -0
- package/framework/.claude/skills/prd-add/SKILL.md +222 -0
- package/framework/.claude/skills/prd-add/references/impact-analysis.md +233 -0
- package/framework/.claude/skills/remotion-best-practices/SKILL.md +48 -0
- package/framework/.claude/skills/remotion-best-practices/rules/3d.md +86 -0
- package/framework/.claude/skills/remotion-best-practices/rules/animations.md +29 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets.md +78 -0
- package/framework/.claude/skills/remotion-best-practices/rules/audio.md +169 -0
- package/framework/.claude/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/framework/.claude/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/framework/.claude/skills/remotion-best-practices/rules/charts.md +58 -0
- package/framework/.claude/skills/remotion-best-practices/rules/compositions.md +141 -0
- package/framework/.claude/skills/remotion-best-practices/rules/display-captions.md +184 -0
- package/framework/.claude/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/framework/.claude/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/framework/.claude/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/framework/.claude/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/framework/.claude/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/framework/.claude/skills/remotion-best-practices/rules/gifs.md +141 -0
- package/framework/.claude/skills/remotion-best-practices/rules/images.md +130 -0
- package/framework/.claude/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
- package/framework/.claude/skills/remotion-best-practices/rules/light-leaks.md +73 -0
- package/framework/.claude/skills/remotion-best-practices/rules/lottie.md +67 -0
- package/framework/.claude/skills/remotion-best-practices/rules/maps.md +401 -0
- package/framework/.claude/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
- package/framework/.claude/skills/remotion-best-practices/rules/measuring-text.md +143 -0
- package/framework/.claude/skills/remotion-best-practices/rules/parameters.md +98 -0
- package/framework/.claude/skills/remotion-best-practices/rules/sequencing.md +118 -0
- package/framework/.claude/skills/remotion-best-practices/rules/subtitles.md +36 -0
- package/framework/.claude/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/framework/.claude/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/framework/.claude/skills/remotion-best-practices/rules/timing.md +179 -0
- package/framework/.claude/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
- package/framework/.claude/skills/remotion-best-practices/rules/transitions.md +197 -0
- package/framework/.claude/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
- package/framework/.claude/skills/remotion-best-practices/rules/trimming.md +52 -0
- package/framework/.claude/skills/remotion-best-practices/rules/videos.md +171 -0
- package/framework/.claude/skills/seo-audit/SKILL.md +394 -0
- package/framework/.claude/skills/seo-audit/references/aeo-geo-patterns.md +279 -0
- package/framework/.claude/skills/seo-audit/references/ai-writing-detection.md +190 -0
- package/framework/.claude/skills/simplify/SKILL.md +137 -0
- package/framework/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/framework/.claude/skills/skill-creator/SKILL.md +356 -0
- package/framework/.claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/framework/.claude/skills/skill-creator/references/workflows.md +28 -0
- package/framework/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/framework/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/framework/.claude/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/framework/.claude/skills/ui-design/SKILL.md +199 -0
- package/framework/.claude/skills/ui-design/references/component-discovery.md +54 -0
- package/framework/.claude/skills/ui-design/references/evaluation.md +171 -0
- package/framework/.claude/skills/ui-design/references/generation.md +109 -0
- package/framework/.claude/skills/ui-design/references/inventory.md +59 -0
- package/framework/.claude/skills/webapp-testing/LICENSE.txt +202 -0
- package/framework/.claude/skills/webapp-testing/SKILL.md +123 -0
- package/framework/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
- package/framework/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/framework/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/framework/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
- package/framework/.claude/skills/worktree-manager/SKILL.md +680 -0
- package/framework/AGENTS.md +240 -0
- package/framework/agents/api-contracts.md +137 -0
- package/framework/agents/architecture.md +145 -0
- package/framework/agents/coding-standards.md +148 -0
- package/framework/agents/data-model.md +110 -0
- package/framework/agents/deployment-protocol.md +232 -0
- package/framework/agents/design-review.md +172 -0
- package/framework/agents/env-reference.md +171 -0
- package/framework/agents/github-issue-subagent.md +252 -0
- package/framework/agents/index.md +261 -0
- package/framework/agents/llm-wiki-methodology.md +216 -0
- package/framework/agents/maintenance-protocol.md +305 -0
- package/framework/agents/observability.md +162 -0
- package/framework/agents/performance.md +155 -0
- package/framework/agents/project-context.md +145 -0
- package/framework/agents/runbook.md +208 -0
- package/framework/agents/security.md +168 -0
- package/framework/agents/skills-mapping.md +286 -0
- package/framework/agents/testing.md +111 -0
- package/framework/agents/workflows.md +215 -0
- package/framework/docs/PROJECT-CONFIGURATION.md +336 -0
- package/framework/docs/references/brand-guidelines.md +170 -0
- package/framework/docs/references/ui-guidelines.template.md +182 -0
- package/framework/routines/code-review.routine.yml +46 -0
- package/framework/routines/doc-review.routine.yml +45 -0
- package/framework/routines/ds-drift.routine.yml +52 -0
- package/framework/routines/full-sweep.routine.yml +51 -0
- package/framework/routines/index.yml +70 -0
- package/framework/routines/skill-improve.routine.yml +50 -0
- package/framework/routines/wiki-review.routine.yml +45 -0
- package/framework/templates/baldart.config.template.yml +113 -0
- package/framework/templates/breaking-change-checklist.md +484 -0
- package/framework/templates/feature-card.template.yml +125 -0
- package/framework/templates/overlays/README.md +44 -0
- package/framework/templates/overlays/copywriting.fidelity-example.md +62 -0
- package/framework/templates/overlays/ui-design.fidelity-example.md +75 -0
- package/framework/templates/skill-project-context.snippet.md +19 -0
- package/framework/templates/spec.template.md +208 -0
- package/package.json +51 -0
- package/src/commands/add.js +229 -0
- package/src/commands/configure.js +385 -0
- package/src/commands/doctor.js +486 -0
- package/src/commands/migrate.js +185 -0
- package/src/commands/push.js +0 -0
- package/src/commands/routines.js +269 -0
- package/src/commands/status.js +130 -0
- package/src/commands/update.js +419 -0
- package/src/commands/version.js +88 -0
- package/src/utils/contamination.js +400 -0
- package/src/utils/git.js +181 -0
- package/src/utils/hooks.js +152 -0
- package/src/utils/routine-adapters/claude-code-cloud.js +78 -0
- package/src/utils/routine-adapters/cron.js +138 -0
- package/src/utils/routine-adapters/github-actions.js +141 -0
- package/src/utils/routine-adapters/index.js +21 -0
- package/src/utils/routines.js +166 -0
- package/src/utils/state.js +143 -0
- package/src/utils/symlinks.js +425 -0
- package/src/utils/ui.js +133 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Agent Protocol (AGENTS.md)
|
|
2
|
+
|
|
3
|
+
Mandatory coordination rules for all agents (Codex/Claude/humans).
|
|
4
|
+
Applies before, during, and after any work in this repo.
|
|
5
|
+
If context is limited, follow MUST rules and Routing first.
|
|
6
|
+
|
|
7
|
+
## Project Context (v3.0.0+)
|
|
8
|
+
|
|
9
|
+
This file is generic. Paths referenced as `${paths.X}` resolve from `baldart.config.yml` in the repo root. MUST rules that target workflow infrastructure (backlog cards, ADRs, project-status doc, PRD sessions, LLM wiki overlay) apply **only when the matching `features.*` flag is `true`** in `baldart.config.yml`:
|
|
10
|
+
|
|
11
|
+
| MUST topic | Active when |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Backlog cards (`${paths.backlog_dir}/`), card status, file ownership | `features.has_backlog: true` |
|
|
14
|
+
| ADRs (`${paths.adrs_dir}/`), architectural decision records | `features.has_adrs: true` |
|
|
15
|
+
| `project-status.md` Active Code Context updates | the file exists at `${paths.references_dir}/project-status.md` |
|
|
16
|
+
| PRD workflow, PRD sessions | `features.has_prd_workflow: true` |
|
|
17
|
+
| LLM wiki overlay sync | `features.has_wiki_overlay: true` |
|
|
18
|
+
| Design-system blocking reads | `features.has_design_system: true` |
|
|
19
|
+
|
|
20
|
+
When a MUST rule's feature is `false` or its target file does not exist, the rule is **silent** — do not invent a workflow that isn't there. Project-specific terminology (audience segments, domain entities, brand voice) comes from `identity.audience_segments`, `agents/coding-standards.md`, and skill overlays under `.baldart/overlays/`. See `agents/project-context.md` for the full protocol.
|
|
21
|
+
|
|
22
|
+
## Pre-Commit Checks
|
|
23
|
+
|
|
24
|
+
Before committing, run only fast checks (lint + type check). Full build is required only before opening a PR. Fix all errors before staging files.
|
|
25
|
+
|
|
26
|
+
## File Navigation
|
|
27
|
+
|
|
28
|
+
When searching for files, use Glob/Grep to find actual file paths before reading. Never guess file paths based on naming conventions.
|
|
29
|
+
|
|
30
|
+
## Git Workflow
|
|
31
|
+
|
|
32
|
+
### Branching Strategy (Simplified Git Flow)
|
|
33
|
+
|
|
34
|
+
This repo uses a simplified Git Flow.
|
|
35
|
+
|
|
36
|
+
| Branch | Base | Merges To | Purpose |
|
|
37
|
+
|--------|------|-----------|---------|
|
|
38
|
+
| `main` | — | — | Production. No direct pushes. |
|
|
39
|
+
| `develop` | `main` | `main` (release PR) | Integration branch for features. |
|
|
40
|
+
| `feat/*` | `develop` | `develop` (PR) | Feature work per backlog card. |
|
|
41
|
+
| `hotfix/*` | `main` | `main` + `develop` | Critical production fixes only. |
|
|
42
|
+
|
|
43
|
+
### Branch Rules
|
|
44
|
+
|
|
45
|
+
- **Feature work**: Branch from `develop` → `feat/FEAT-XXXX-slug` → PR to `develop`.
|
|
46
|
+
- **Cloud agents**: Branch from `develop` → `codex/FEAT-XXXX-slug` or `claude/FEAT-XXXX-slug` → PR to `develop`.
|
|
47
|
+
- **Hotfixes**: Branch from `main` → `hotfix/BUG-XXXX-slug` → PR to `main`, then merge/cherry-pick to `develop`.
|
|
48
|
+
- **Releases**: PR from `develop` → `main` when a set of features is ready for production.
|
|
49
|
+
- **Direct push to `main` is blocked** by a pre-push hook. Use `--no-verify` only for documented emergencies.
|
|
50
|
+
|
|
51
|
+
### Commit Hygiene
|
|
52
|
+
|
|
53
|
+
Before committing, ensure only files related to the current task are staged. Run `git status` and `git diff --staged` to verify. Never bundle unrelated changes into a commit.
|
|
54
|
+
|
|
55
|
+
## Investigation Guidelines
|
|
56
|
+
|
|
57
|
+
When investigating whether a feature has been implemented, always check git history (`git log --oneline --all --grep`) and actual source code before claiming it exists or doesn't exist.
|
|
58
|
+
|
|
59
|
+
## Implementation Completeness
|
|
60
|
+
|
|
61
|
+
When implementing a backlog card or feature plan, verify ALL items from the plan are wired up and functional before marking complete. Cross-check each acceptance criterion against the actual code.
|
|
62
|
+
|
|
63
|
+
## Testing Conventions
|
|
64
|
+
|
|
65
|
+
When tests exist, always run the full test suite after implementation to check for regressions. If a test fails, fix the code — not the test — unless the test itself is wrong. When writing new features with tests, write failing tests first, then implement the minimum code to pass them.
|
|
66
|
+
|
|
67
|
+
## 2) Priority order & conflict policy
|
|
68
|
+
|
|
69
|
+
Priority order for conflicts:
|
|
70
|
+
- Agent rules: `AGENTS.md`.
|
|
71
|
+
- Routing: `agents/index.md`.
|
|
72
|
+
- Domain references: `${paths.references_dir}/*` (data-model, api/, ui-pages, product-scope, project-status).
|
|
73
|
+
- Decisions: `${paths.adrs_dir}/ADR-YYYYMMDD-*.md`.
|
|
74
|
+
- Legacy: `archive/project_full_legacy.md`.
|
|
75
|
+
|
|
76
|
+
Conflict steps (must follow in order):
|
|
77
|
+
1. Stop and read both sources.
|
|
78
|
+
2. Decide which is newer and update the other.
|
|
79
|
+
3. Record the decision in an ADR and the backlog card.
|
|
80
|
+
|
|
81
|
+
## 3) Repo map (compact)
|
|
82
|
+
|
|
83
|
+
- `AGENTS.md` (agent rules) + `agents/index.md` (routing).
|
|
84
|
+
- `${paths.backlog_dir}/*.yml` (required work cards).
|
|
85
|
+
- `/${paths.references_dir}/*` (API, data model, UI routes, status).
|
|
86
|
+
- `/${paths.adrs_dir}/` (ADRs).
|
|
87
|
+
- `/templates/` (card/spec templates).
|
|
88
|
+
- `/src/` or project-specific source directory (application code).
|
|
89
|
+
|
|
90
|
+
## 4) Non-negotiables (MUST)
|
|
91
|
+
|
|
92
|
+
### 4.a — Universal MUST (apply to every project)
|
|
93
|
+
|
|
94
|
+
- MUST treat `AGENTS.md` as authoritative for agent rules.
|
|
95
|
+
- MUST invoke `codebase-architect` agent (via Task tool) whenever you need to understand codebase structure, existing patterns, or code architecture before planning or implementing changes; do not proceed with planning or implementation without first understanding the existing system through codebase-architect.
|
|
96
|
+
- MUST NOT work on files/components already claimed by another agent; multiple agents allowed if working on independent areas.
|
|
97
|
+
- MUST perform a mandatory clarity analysis before fixing any issue labeled `bug`; confirm that the issue description, proposed correct behavior, and edge cases are unambiguous, document any resolved doubts, and only start fix work once every zone of uncertainty is covered.
|
|
98
|
+
- MUST mark missing info as UNKNOWN and ask the user; if blocked, set `BLOCKED` with a blocker.
|
|
99
|
+
- MUST mark assumptions as ASSUMED with rationale; add an ADR if permanent (and `features.has_adrs: true`).
|
|
100
|
+
- MUST NOT make forbidden assumptions: external provider swap, auth provider swap, DB structure change without data model update, external dependency without documentation, API contract change without API reference update.
|
|
101
|
+
- MUST keep docs and code in sync; code change without doc update is invalid; doc update without code is incomplete.
|
|
102
|
+
- MUST use commit format `[FEAT-XXX] Brief description` or adapt to your project's convention; keep commits small/traceable.
|
|
103
|
+
- MUST NOT commit without updated docs or with failing lint/type checks. Full build is required only before opening a PR, not before every commit.
|
|
104
|
+
- MUST pre-sync: `git fetch origin`, clean status, confirm branch; use `git pull --ff-only` unless approved.
|
|
105
|
+
- MUST get owner approval before force push/reset/branch deletion; create a safety tag `backup/<YYYYMMDD>-<reason>`.
|
|
106
|
+
- MUST NEVER push directly to `main`; all changes reach `main` via PR (release from `develop` or hotfix merge). Pre-push hook enforces this.
|
|
107
|
+
- MUST push working branch and keep `main` merge owner-controlled; prune remote branches only when instructed.
|
|
108
|
+
- MUST run testing gates before DONE: run tests (if exist), run build, and CI checks on PR; manual validation is REQUIRED for local mode and OPTIONAL for cloud mode.
|
|
109
|
+
- MUST pass pre-commit hooks (linting, type checking, markdown lint, build); bypass (`--no-verify`) only for documented emergencies.
|
|
110
|
+
- MUST use API versioning for breaking changes: create new version, deprecate old with appropriate headers, minimum sunset period; see project-specific API migration docs.
|
|
111
|
+
- MUST use exact terminology from `agents/coding-standards.md` if it exists in your project, plus any terminology declared in `.baldart/overlays/<skill>.md`.
|
|
112
|
+
|
|
113
|
+
### 4.b — Workflow MUST (only when the matching `features.*` flag is `true`)
|
|
114
|
+
|
|
115
|
+
- **When `features.has_backlog: true`:**
|
|
116
|
+
- MUST pick one backlog card (TODO/READY), set `IN_PROGRESS`, and assign yourself before work.
|
|
117
|
+
- MUST ask the user which git strategy to use when creating a backlog card and record it in `git_strategy`; if the user requires cloud-agent execution, use a non-main feature branch.
|
|
118
|
+
- MUST keep backlog tasks/notes/status current and log decisions.
|
|
119
|
+
- MUST follow the `git_strategy` specified in the backlog card; if not specified, ask the user before starting work; delete merged branches when instructed.
|
|
120
|
+
- MUST use branch-per-card (`feat/<CARD-ID>-<slug>`, `codex/<CARD-ID>-<slug>`, or `claude/<CARD-ID>-<slug>`), branching from `develop` for features and from `main` for hotfixes only.
|
|
121
|
+
- MUST document every implementation or variation (backlog card/spec/docs update referencing the issue/feature) before merging.
|
|
122
|
+
|
|
123
|
+
- **When the file `${paths.references_dir}/project-status.md` exists:**
|
|
124
|
+
- MUST update its Active Code Context before work; multiple agents allowed if working on independent areas.
|
|
125
|
+
- MUST follow handoff protocol in Active Code Context; receiver acknowledges and sets `IN_PROGRESS`.
|
|
126
|
+
- MUST keep it under 200 lines; archive detailed work logs to `${paths.references_dir}/work-history.md`.
|
|
127
|
+
- MUST limit Active Code Context to 1 current + 3 recent entries max; use one-line summaries (no file lists).
|
|
128
|
+
- MUST archive work entries older than 7 days to `work-history.md`.
|
|
129
|
+
|
|
130
|
+
- **When `features.has_adrs: true`:**
|
|
131
|
+
- MUST create complete ADRs (Context, Decision, Rationale, Alternatives, Consequences; no TODO placeholders) for architectural decisions: provider changes, auth changes, DB schema changes, API contract changes, external dependencies, deployment targets, performance/scalability decisions, data model changes affecting multiple features.
|
|
132
|
+
|
|
133
|
+
- **When the project ships a GitHub issue review convention** (declared in `.baldart/overlays/`):
|
|
134
|
+
- MUST comment on every GitHub issue when resolving it and apply the project's review label (e.g. `vibe review`) per the overlay's labelling rule.
|
|
135
|
+
- MUST create QA issues per test case (labels `qa` + area); when fixed add a fix summary, apply the review label, leave open; open QA issues are the source of truth.
|
|
136
|
+
- MUST NOT add detailed file lists or multi-line work descriptions to project-status.md; use work-history.md instead.
|
|
137
|
+
|
|
138
|
+
## 5) Guidelines (SHOULD)
|
|
139
|
+
|
|
140
|
+
- SHOULD use Routing to load only relevant modules.
|
|
141
|
+
- SHOULD update `${paths.references_dir}/project-status.md` when risks/status change.
|
|
142
|
+
- SHOULD review for duplication or drift when updating docs.
|
|
143
|
+
- SHOULD set `execution_mode: cloud` in backlog cards handled by cloud agents and claim file ownership using `claimed_paths`.
|
|
144
|
+
|
|
145
|
+
## 5.1) Execution Modes
|
|
146
|
+
|
|
147
|
+
- `local`: work on feature branches from `develop`; direct commits to `develop` allowed for trivial changes with owner approval; manual validation remains mandatory before DONE.
|
|
148
|
+
- `cloud`: always use feature branch from `develop`, open PR to `develop`, and rely on CI-first validation; local dev server checks are advisory unless explicitly requested.
|
|
149
|
+
- `hotfix`: branch from `main` for critical production fixes; merge to both `main` (deploy) and `develop` (sync); requires owner approval.
|
|
150
|
+
|
|
151
|
+
## 6) Optional conventions (OPTIONAL)
|
|
152
|
+
|
|
153
|
+
- OPTIONAL: None defined. Add project-specific conventions as needed.
|
|
154
|
+
|
|
155
|
+
## 6.1) Deprecated Patterns (DO NOT USE)
|
|
156
|
+
|
|
157
|
+
- Add project-specific deprecated patterns here as they emerge.
|
|
158
|
+
- Example: Legacy authentication patterns, outdated API endpoints, deprecated libraries, etc.
|
|
159
|
+
|
|
160
|
+
## 7) Routing (If you touch X, read Y)
|
|
161
|
+
|
|
162
|
+
- **Documentation routing**: See `agents/index.md` for which docs to read/update when touching code.
|
|
163
|
+
- **Agent invocation routing**: See `.claude/agents/REGISTRY.md` for which agent to invoke via Task tool (single source of truth for all agent capabilities, categories, and decision tree). When adding or updating agents, update REGISTRY.md.
|
|
164
|
+
|
|
165
|
+
## 8) Workflow gates (tests/build/deploy)
|
|
166
|
+
|
|
167
|
+
### Pre-commit checks (MUST — fast, ~30s)
|
|
168
|
+
|
|
169
|
+
Before attempting any `git commit`, MUST run these checks on affected files and fix all errors:
|
|
170
|
+
|
|
171
|
+
1. Lint check on changed source files — fix all lint errors.
|
|
172
|
+
2. Type check (if applicable) — fix all type errors.
|
|
173
|
+
3. Markdown lint on changed `.md` files (if .md files changed) — fix all errors.
|
|
174
|
+
|
|
175
|
+
Only after all checks pass, proceed with `git add` and `git commit`.
|
|
176
|
+
Do NOT run a full build before every commit — it kills agent velocity.
|
|
177
|
+
Do NOT rely on pre-commit hooks to catch these — run them explicitly first to avoid failed commit retry cycles.
|
|
178
|
+
|
|
179
|
+
Note: Use linting tools that scope to staged files only when possible; type checking may need to run on the whole project depending on your language/toolchain.
|
|
180
|
+
|
|
181
|
+
### Pre-PR build check (MUST — before opening any PR)
|
|
182
|
+
|
|
183
|
+
Before opening a pull request, MUST run:
|
|
184
|
+
|
|
185
|
+
1. Full build — must pass with no errors.
|
|
186
|
+
2. Full test suite — if tests exist, must pass.
|
|
187
|
+
|
|
188
|
+
This is the only time a full build is required. Do not repeat this for every intermediate commit.
|
|
189
|
+
|
|
190
|
+
### Manual testing protocol (MVP)
|
|
191
|
+
|
|
192
|
+
1. Run test suite when tests exist.
|
|
193
|
+
2. Run build command (must pass).
|
|
194
|
+
3. Run project and manually test changed flows.
|
|
195
|
+
4. Record results in backlog card notes.
|
|
196
|
+
|
|
197
|
+
QA issue methodology (manual):
|
|
198
|
+
- One GitHub issue per test case (atomic scope).
|
|
199
|
+
- Labels: `qa` + one macro area (customize area labels for your project).
|
|
200
|
+
- When fixed: add fix summary comment, apply `vibe review`, leave open.
|
|
201
|
+
- If test passes: leave issue open with a short note.
|
|
202
|
+
- If test fails: keep open with details and evidence.
|
|
203
|
+
- Open QA issues are the source of truth for unresolved bugs.
|
|
204
|
+
|
|
205
|
+
## 9) Token budget / truncation policy
|
|
206
|
+
|
|
207
|
+
### File size thresholds
|
|
208
|
+
|
|
209
|
+
| Doc Type | Max Lines | Action When Exceeded |
|
|
210
|
+
|----------|-----------|---------------------|
|
|
211
|
+
| Index files (index.md) | 200 | Split by domain |
|
|
212
|
+
| Agent modules (agents/*.md) | 300 | Split into sub-modules |
|
|
213
|
+
| Reference docs (${paths.references_dir}/*) | 400 | Split by topic |
|
|
214
|
+
| API docs (${paths.references_dir}/api/*) | 800 | Split by endpoint group |
|
|
215
|
+
| Specs/PRDs (${paths.references_dir}/specs/*, ${paths.prd_dir}/*) | 800 | Split into requirements + implementation |
|
|
216
|
+
| project-status.md | 200 | Archive to work-history.md |
|
|
217
|
+
|
|
218
|
+
### When context is truncated
|
|
219
|
+
|
|
220
|
+
1. Re-read only the specific section needed (use offset/limit).
|
|
221
|
+
2. Use index files (`api/index.md`, `ui/index.md`, `agents/index.md`) to navigate — never load all docs at once.
|
|
222
|
+
3. Link over duplicate — one source of truth per fact.
|
|
223
|
+
4. Prefer tables over prose for structured data.
|
|
224
|
+
5. If a file exceeds its threshold by 50%+, create a backlog card to split it.
|
|
225
|
+
|
|
226
|
+
### Loading priority
|
|
227
|
+
|
|
228
|
+
When context budget is limited, load in this order:
|
|
229
|
+
1. `AGENTS.md` (rules — always first)
|
|
230
|
+
2. `agents/index.md` (routing)
|
|
231
|
+
3. Relevant domain module only (not all modules)
|
|
232
|
+
4. `${paths.references_dir}/project-status.md` (if status context needed)
|
|
233
|
+
|
|
234
|
+
## 10) Change protocol (updating this file)
|
|
235
|
+
|
|
236
|
+
1. Open/update a backlog card for doc changes.
|
|
237
|
+
2. Update the relevant module(s) first.
|
|
238
|
+
3. Update `${paths.references_dir}/project-status.md` if status or risks change.
|
|
239
|
+
4. Add an ADR for architectural decisions.
|
|
240
|
+
5. Review for duplication or drift.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# API Contracts
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define API endpoint documentation standards and contract rules.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
**In**: API documentation format, versioning, breaking changes, error responses.
|
|
10
|
+
**Out**: Specific endpoint implementations (see ${paths.references_dir}/api/).
|
|
11
|
+
|
|
12
|
+
## Do
|
|
13
|
+
|
|
14
|
+
- Document all API endpoints in ${paths.references_dir}/api/
|
|
15
|
+
- Follow consistent request/response format
|
|
16
|
+
- Version APIs appropriately
|
|
17
|
+
- Document error responses
|
|
18
|
+
|
|
19
|
+
## Do Not
|
|
20
|
+
|
|
21
|
+
- Make breaking changes without versioning
|
|
22
|
+
- Skip documenting endpoints
|
|
23
|
+
- Change contracts without updating docs
|
|
24
|
+
|
|
25
|
+
## API Documentation Format
|
|
26
|
+
|
|
27
|
+
Each endpoint should document:
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
### [METHOD] /api/[version]/[resource]
|
|
31
|
+
|
|
32
|
+
**Purpose**: [What this endpoint does]
|
|
33
|
+
|
|
34
|
+
**Auth**: [Required authentication - e.g., Bearer token, API key, none]
|
|
35
|
+
|
|
36
|
+
**Request**:
|
|
37
|
+
- **Headers**: [Required headers]
|
|
38
|
+
- **Path Params**: [URL parameters]
|
|
39
|
+
- **Query Params**: [Query string parameters]
|
|
40
|
+
- **Body**: [Request body schema]
|
|
41
|
+
|
|
42
|
+
**Response**:
|
|
43
|
+
- **Success (200)**: [Success response schema]
|
|
44
|
+
- **Error (4xx/5xx)**: [Error response schema]
|
|
45
|
+
|
|
46
|
+
**Example Request**:
|
|
47
|
+
\`\`\`json
|
|
48
|
+
{
|
|
49
|
+
"field": "value"
|
|
50
|
+
}
|
|
51
|
+
\`\`\`
|
|
52
|
+
|
|
53
|
+
**Example Response**:
|
|
54
|
+
\`\`\`json
|
|
55
|
+
{
|
|
56
|
+
"data": "value",
|
|
57
|
+
"message": "Success"
|
|
58
|
+
}
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
**Business Rules**:
|
|
62
|
+
- [Rule 1]
|
|
63
|
+
- [Rule 2]
|
|
64
|
+
|
|
65
|
+
**Error Codes**:
|
|
66
|
+
- `ERROR_CODE_1`: Description
|
|
67
|
+
- `ERROR_CODE_2`: Description
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Versioning Strategy
|
|
71
|
+
|
|
72
|
+
- Use semantic versioning for API versions (v1, v2, etc.)
|
|
73
|
+
- Maintain backwards compatibility within major versions
|
|
74
|
+
- Deprecate old versions with appropriate sunset periods
|
|
75
|
+
- Document version differences
|
|
76
|
+
|
|
77
|
+
## Breaking vs Non-Breaking Changes
|
|
78
|
+
|
|
79
|
+
**Non-Breaking** (can be added without version bump):
|
|
80
|
+
|
|
81
|
+
- Adding new optional fields to requests
|
|
82
|
+
- Adding new fields to responses
|
|
83
|
+
- Adding new endpoints
|
|
84
|
+
- Adding new optional query parameters
|
|
85
|
+
|
|
86
|
+
**Breaking** (require version bump):
|
|
87
|
+
|
|
88
|
+
- Removing fields from responses
|
|
89
|
+
- Changing field types
|
|
90
|
+
- Making optional fields required
|
|
91
|
+
- Removing endpoints
|
|
92
|
+
- Changing authentication requirements
|
|
93
|
+
- Changing error response format
|
|
94
|
+
|
|
95
|
+
## Error Response Format
|
|
96
|
+
|
|
97
|
+
Define a consistent error response format:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"error": {
|
|
102
|
+
"code": "ERROR_CODE",
|
|
103
|
+
"message": "Human readable message",
|
|
104
|
+
"details": {}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## API Conventions
|
|
110
|
+
|
|
111
|
+
- [HTTP method conventions]
|
|
112
|
+
- [Resource naming conventions]
|
|
113
|
+
- [Query parameter conventions]
|
|
114
|
+
- [Pagination conventions]
|
|
115
|
+
- [Filtering conventions]
|
|
116
|
+
- [Sorting conventions]
|
|
117
|
+
|
|
118
|
+
## Authentication
|
|
119
|
+
|
|
120
|
+
- [Authentication method - Bearer, API Key, etc.]
|
|
121
|
+
- [Token format]
|
|
122
|
+
- [Token expiration]
|
|
123
|
+
- [Refresh token flow if applicable]
|
|
124
|
+
|
|
125
|
+
## Rate Limiting
|
|
126
|
+
|
|
127
|
+
- [Rate limit rules if applicable]
|
|
128
|
+
- [Rate limit headers]
|
|
129
|
+
- [Handling rate limit errors]
|
|
130
|
+
|
|
131
|
+
## Deprecation Policy
|
|
132
|
+
|
|
133
|
+
1. Announce deprecation with timeline
|
|
134
|
+
2. Add deprecation headers to responses
|
|
135
|
+
3. Update documentation with migration guide
|
|
136
|
+
4. Maintain deprecated version for sunset period
|
|
137
|
+
5. Remove after sunset period expires
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Summarize system architecture, tech stack, and core flows.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
**In**: Tech stack, architecture patterns, authentication flows, key principles.
|
|
10
|
+
**Out**: API details (see ${paths.references_dir}/api/index.md), data model (see ${paths.references_dir}/data-model.md).
|
|
11
|
+
|
|
12
|
+
## Do
|
|
13
|
+
|
|
14
|
+
- Align changes with the documented patterns and principles.
|
|
15
|
+
- Update this file when architecture or tech stack changes.
|
|
16
|
+
|
|
17
|
+
## Do Not
|
|
18
|
+
|
|
19
|
+
- Change providers or architecture without an ADR.
|
|
20
|
+
|
|
21
|
+
## Content
|
|
22
|
+
|
|
23
|
+
# Tech Stack
|
|
24
|
+
|
|
25
|
+
## Frontend
|
|
26
|
+
|
|
27
|
+
- **Framework**: [Your framework here - e.g., React, Next.js, Vue, Angular]
|
|
28
|
+
- **Language**: [Your language here - e.g., TypeScript, JavaScript]
|
|
29
|
+
- **Styling**: [Your styling approach - e.g., Tailwind CSS, CSS Modules, styled-components]
|
|
30
|
+
- **UI Approach**: [Your UI approach - e.g., mobile-first, responsive, component library]
|
|
31
|
+
- **State**: [Your state management - e.g., Redux, Zustand, Context API, none]
|
|
32
|
+
- **Session**: [Your session storage approach - e.g., localStorage, sessionStorage, cookies]
|
|
33
|
+
|
|
34
|
+
## Backend
|
|
35
|
+
|
|
36
|
+
- **Runtime**: [Your runtime - e.g., Node.js, Python, Go, Rust]
|
|
37
|
+
- **Database**: [Your database - e.g., PostgreSQL, MongoDB, Firebase, Supabase]
|
|
38
|
+
- **Storage**: [Your storage solution - e.g., S3, local filesystem, none]
|
|
39
|
+
- **Authentication**: [Your auth approach - e.g., JWT, OAuth, Firebase Auth, Supabase Auth, custom]
|
|
40
|
+
|
|
41
|
+
## Build/Deploy
|
|
42
|
+
|
|
43
|
+
- **Build**: [Your build tool - e.g., Vite, Webpack, Next.js, esbuild]
|
|
44
|
+
- **Linting**: [Your linter - e.g., ESLint, Biome, RuboCop, pylint]
|
|
45
|
+
- **Package Manager**: [Your package manager - e.g., npm, pnpm, yarn, pip, cargo]
|
|
46
|
+
- **Testing**: [Your test framework - e.g., Jest, Vitest, pytest, cargo test]
|
|
47
|
+
|
|
48
|
+
## External Dependencies
|
|
49
|
+
|
|
50
|
+
- List key external dependencies here
|
|
51
|
+
- Include purpose for each dependency
|
|
52
|
+
- Update when adding or removing major dependencies
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
# Architecture
|
|
57
|
+
|
|
58
|
+
## Pattern
|
|
59
|
+
|
|
60
|
+
- **Frontend**: [Your frontend architecture pattern]
|
|
61
|
+
- **Backend**: [Your backend architecture pattern]
|
|
62
|
+
- **Auth**: [Your authentication flow]
|
|
63
|
+
- **Data flow**: [Your data flow pattern - e.g., Client → API → Database → Response]
|
|
64
|
+
|
|
65
|
+
## Key Principles
|
|
66
|
+
|
|
67
|
+
- List your project's key architectural principles here
|
|
68
|
+
- Include design patterns you follow
|
|
69
|
+
- Document constraints and trade-offs
|
|
70
|
+
- Examples:
|
|
71
|
+
- Mobile-first UI
|
|
72
|
+
- RESTful API design
|
|
73
|
+
- No real-time subscriptions
|
|
74
|
+
- Immutable data patterns
|
|
75
|
+
- Specific performance targets
|
|
76
|
+
|
|
77
|
+
## Authentication Flow
|
|
78
|
+
|
|
79
|
+
### User Type 1 (e.g., End Users)
|
|
80
|
+
|
|
81
|
+
1. [Step 1 of authentication]
|
|
82
|
+
2. [Step 2 of authentication]
|
|
83
|
+
3. [Step 3 of authentication]
|
|
84
|
+
4. [Session storage/management]
|
|
85
|
+
|
|
86
|
+
### User Type 2 (e.g., Admin Users)
|
|
87
|
+
|
|
88
|
+
1. [Step 1 of authentication]
|
|
89
|
+
2. [Step 2 of authentication]
|
|
90
|
+
3. [Step 3 of authentication]
|
|
91
|
+
4. [Session storage/management]
|
|
92
|
+
|
|
93
|
+
## Core Business Flows
|
|
94
|
+
|
|
95
|
+
### Flow 1: [Name of key flow]
|
|
96
|
+
|
|
97
|
+
1. [Step 1]
|
|
98
|
+
2. [Step 2]
|
|
99
|
+
3. [Step 3]
|
|
100
|
+
4. [Validation/error handling]
|
|
101
|
+
5. [Side effects/notifications]
|
|
102
|
+
6. [Return/response]
|
|
103
|
+
|
|
104
|
+
### Flow 2: [Name of another key flow]
|
|
105
|
+
|
|
106
|
+
1. [Step 1]
|
|
107
|
+
2. [Step 2]
|
|
108
|
+
3. [Step 3]
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Deployment Architecture
|
|
113
|
+
|
|
114
|
+
- **Environment**: [Development/Staging/Production setup]
|
|
115
|
+
- **Hosting**: [Your hosting solution - e.g., Vercel, AWS, GCP, self-hosted]
|
|
116
|
+
- **CI/CD**: [Your CI/CD pipeline - e.g., GitHub Actions, CircleCI, Jenkins]
|
|
117
|
+
- **Monitoring**: [Your monitoring solution - e.g., Sentry, Datadog, none]
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Security Considerations
|
|
122
|
+
|
|
123
|
+
- [List key security measures]
|
|
124
|
+
- [Authentication/authorization approach]
|
|
125
|
+
- [Data encryption]
|
|
126
|
+
- [API rate limiting]
|
|
127
|
+
- [Input validation]
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Performance Targets
|
|
132
|
+
|
|
133
|
+
- [Response time targets]
|
|
134
|
+
- [Throughput targets]
|
|
135
|
+
- [Scalability considerations]
|
|
136
|
+
- [Caching strategy]
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Known Limitations
|
|
141
|
+
|
|
142
|
+
- [Document known architectural limitations]
|
|
143
|
+
- [Technical debt]
|
|
144
|
+
- [MVP vs Production trade-offs]
|
|
145
|
+
- [Areas requiring future improvement]
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Coding Standards
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Ensure consistent terminology and naming across code and docs.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
**In**: Terminology rules for UI, code, docs, and commit messages.
|
|
10
|
+
**Out**: Formatting or lint rules (handled by tooling).
|
|
11
|
+
|
|
12
|
+
## Do
|
|
13
|
+
|
|
14
|
+
- Use the exact terms below in code, docs, and issues.
|
|
15
|
+
|
|
16
|
+
## Do Not
|
|
17
|
+
|
|
18
|
+
- Substitute synonyms for defined terms.
|
|
19
|
+
|
|
20
|
+
## Terminology
|
|
21
|
+
|
|
22
|
+
Define project-specific terminology here to ensure consistency across codebase:
|
|
23
|
+
|
|
24
|
+
| Correct | Avoid |
|
|
25
|
+
|---|---|
|
|
26
|
+
| [Term 1] | [Synonym 1], [Synonym 2] |
|
|
27
|
+
| [Term 2] | [Synonym 1], [Synonym 2] |
|
|
28
|
+
| [Term 3] | [Synonym 1], [Synonym 2] |
|
|
29
|
+
|
|
30
|
+
### Examples of Terminology to Define
|
|
31
|
+
|
|
32
|
+
- **User Types**: End user, admin, moderator, customer, etc.
|
|
33
|
+
- **Core Entities**: Product, order, transaction, item, etc.
|
|
34
|
+
- **Actions**: Create, add, register, signup, etc.
|
|
35
|
+
- **UI Elements**: Modal, dialog, popup, drawer, etc.
|
|
36
|
+
- **Status Values**: Active, enabled, live, published, etc.
|
|
37
|
+
|
|
38
|
+
## Code Conventions
|
|
39
|
+
|
|
40
|
+
### Naming Conventions
|
|
41
|
+
|
|
42
|
+
- **Files**: [Your convention - e.g., kebab-case, camelCase, PascalCase]
|
|
43
|
+
- **Functions**: [Your convention - e.g., camelCase, snake_case]
|
|
44
|
+
- **Components**: [Your convention - e.g., PascalCase]
|
|
45
|
+
- **Constants**: [Your convention - e.g., SCREAMING_SNAKE_CASE]
|
|
46
|
+
- **Variables**: [Your convention - e.g., camelCase, snake_case]
|
|
47
|
+
|
|
48
|
+
### Project-Specific Patterns
|
|
49
|
+
|
|
50
|
+
Document any project-specific coding patterns here:
|
|
51
|
+
|
|
52
|
+
#### Example: File Organization
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
src/
|
|
56
|
+
features/
|
|
57
|
+
[feature-name]/
|
|
58
|
+
components/
|
|
59
|
+
hooks/
|
|
60
|
+
utils/
|
|
61
|
+
types.ts
|
|
62
|
+
index.ts
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Example: Import Order
|
|
66
|
+
|
|
67
|
+
1. External dependencies
|
|
68
|
+
2. Internal utilities
|
|
69
|
+
3. Components
|
|
70
|
+
4. Types
|
|
71
|
+
5. Styles
|
|
72
|
+
|
|
73
|
+
#### Example: Error Handling
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
// Preferred pattern
|
|
77
|
+
try {
|
|
78
|
+
// operation
|
|
79
|
+
} catch (error) {
|
|
80
|
+
// handle error
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Avoid pattern
|
|
84
|
+
if (error) {
|
|
85
|
+
// handle error
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Commit Message Format
|
|
90
|
+
|
|
91
|
+
- **Format**: `[TYPE-XXX] Brief description` or adapt to your project convention
|
|
92
|
+
- **Types**: feat, fix, docs, refactor, test, chore
|
|
93
|
+
- **Examples**:
|
|
94
|
+
- `[FEAT-123] Add user authentication`
|
|
95
|
+
- `[FIX-456] Resolve login redirect issue`
|
|
96
|
+
- `[DOCS-789] Update API documentation`
|
|
97
|
+
|
|
98
|
+
## Documentation Standards
|
|
99
|
+
|
|
100
|
+
### Code Comments
|
|
101
|
+
|
|
102
|
+
- Comment **why**, not **what**
|
|
103
|
+
- Use JSDoc/docstrings for public APIs
|
|
104
|
+
- Avoid obvious comments
|
|
105
|
+
- Update comments when code changes
|
|
106
|
+
|
|
107
|
+
### README Requirements
|
|
108
|
+
|
|
109
|
+
- Installation instructions
|
|
110
|
+
- Configuration steps
|
|
111
|
+
- Usage examples
|
|
112
|
+
- Contributing guidelines
|
|
113
|
+
- License information
|
|
114
|
+
|
|
115
|
+
## Type Safety (if applicable)
|
|
116
|
+
|
|
117
|
+
- [Your type safety requirements]
|
|
118
|
+
- [Strictness level]
|
|
119
|
+
- [Type annotation requirements]
|
|
120
|
+
- [Any/unknown usage policy]
|
|
121
|
+
|
|
122
|
+
## Testing Standards
|
|
123
|
+
|
|
124
|
+
- [Test coverage requirements]
|
|
125
|
+
- [Test naming conventions]
|
|
126
|
+
- [Test file organization]
|
|
127
|
+
- [Mocking guidelines]
|
|
128
|
+
|
|
129
|
+
## Accessibility Standards (if applicable)
|
|
130
|
+
|
|
131
|
+
- [ARIA label requirements]
|
|
132
|
+
- [Keyboard navigation requirements]
|
|
133
|
+
- [Screen reader compatibility]
|
|
134
|
+
- [Color contrast requirements]
|
|
135
|
+
|
|
136
|
+
## Performance Standards (if applicable)
|
|
137
|
+
|
|
138
|
+
- [Bundle size limits]
|
|
139
|
+
- [Image optimization requirements]
|
|
140
|
+
- [Lazy loading guidelines]
|
|
141
|
+
- [Caching strategies]
|
|
142
|
+
|
|
143
|
+
## Security Standards
|
|
144
|
+
|
|
145
|
+
- [Input validation requirements]
|
|
146
|
+
- [Authentication patterns]
|
|
147
|
+
- [Data sanitization rules]
|
|
148
|
+
- [Secrets management]
|