baldart 4.81.0 → 4.83.0

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +9 -5
  3. package/VERSION +1 -1
  4. package/framework/.claude/hooks/agent-discovery-gate.js +4 -2
  5. package/framework/.claude/skills/api-design-principles/CHANGELOG.md +7 -0
  6. package/framework/.claude/skills/api-design-principles/SKILL.md +1 -0
  7. package/framework/.claude/skills/baldart-push/CHANGELOG.md +7 -0
  8. package/framework/.claude/skills/baldart-push/SKILL.md +1 -0
  9. package/framework/.claude/skills/baldart-update/CHANGELOG.md +7 -0
  10. package/framework/.claude/skills/baldart-update/SKILL.md +1 -0
  11. package/framework/.claude/skills/bug/CHANGELOG.md +7 -0
  12. package/framework/.claude/skills/bug/SKILL.md +1 -0
  13. package/framework/.claude/skills/capture/CHANGELOG.md +7 -0
  14. package/framework/.claude/skills/capture/SKILL.md +1 -1
  15. package/framework/.claude/skills/context-primer/CHANGELOG.md +7 -0
  16. package/framework/.claude/skills/context-primer/SKILL.md +1 -0
  17. package/framework/.claude/skills/copywriting/CHANGELOG.md +7 -0
  18. package/framework/.claude/skills/design-sync/CHANGELOG.md +7 -0
  19. package/framework/.claude/skills/design-sync/SKILL.md +1 -0
  20. package/framework/.claude/skills/design-system-init/CHANGELOG.md +7 -0
  21. package/framework/.claude/skills/design-system-init/SKILL.md +1 -0
  22. package/framework/.claude/skills/doc-writing-for-rag/CHANGELOG.md +7 -0
  23. package/framework/.claude/skills/doc-writing-for-rag/SKILL.md +1 -0
  24. package/framework/.claude/skills/ds-edit/CHANGELOG.md +7 -0
  25. package/framework/.claude/skills/ds-edit/SKILL.md +1 -0
  26. package/framework/.claude/skills/ds-handoff/CHANGELOG.md +7 -0
  27. package/framework/.claude/skills/ds-handoff/SKILL.md +1 -0
  28. package/framework/.claude/skills/ds-new/CHANGELOG.md +7 -0
  29. package/framework/.claude/skills/ds-new/SKILL.md +1 -0
  30. package/framework/.claude/skills/ds-render/CHANGELOG.md +7 -0
  31. package/framework/.claude/skills/ds-render/SKILL.md +1 -0
  32. package/framework/.claude/skills/e2e-review/CHANGELOG.md +7 -0
  33. package/framework/.claude/skills/e2e-review/SKILL.md +1 -0
  34. package/framework/.claude/skills/find-skills/CHANGELOG.md +7 -0
  35. package/framework/.claude/skills/find-skills/SKILL.md +1 -0
  36. package/framework/.claude/skills/frontend-design/CHANGELOG.md +7 -0
  37. package/framework/.claude/skills/frontend-design/SKILL.md +1 -0
  38. package/framework/.claude/skills/gamification-design/CHANGELOG.md +7 -0
  39. package/framework/.claude/skills/graph-align/CHANGELOG.md +7 -0
  40. package/framework/.claude/skills/graph-align/SKILL.md +1 -0
  41. package/framework/.claude/skills/graphify-bootstrap/CHANGELOG.md +7 -0
  42. package/framework/.claude/skills/graphify-bootstrap/SKILL.md +1 -0
  43. package/framework/.claude/skills/i18n/CHANGELOG.md +7 -0
  44. package/framework/.claude/skills/i18n/SKILL.md +1 -0
  45. package/framework/.claude/skills/i18n-adopt/CHANGELOG.md +7 -0
  46. package/framework/.claude/skills/i18n-adopt/SKILL.md +1 -0
  47. package/framework/.claude/skills/issue-review/CHANGELOG.md +7 -0
  48. package/framework/.claude/skills/issue-review/SKILL.md +1 -0
  49. package/framework/.claude/skills/kie-ai/CHANGELOG.md +7 -0
  50. package/framework/.claude/skills/kie-ai/SKILL.md +1 -0
  51. package/framework/.claude/skills/lsp-bootstrap/CHANGELOG.md +7 -0
  52. package/framework/.claude/skills/lsp-bootstrap/SKILL.md +1 -0
  53. package/framework/.claude/skills/motion-design/CHANGELOG.md +7 -0
  54. package/framework/.claude/skills/motion-design/SKILL.md +1 -1
  55. package/framework/.claude/skills/new/CHANGELOG.md +7 -0
  56. package/framework/.claude/skills/new/SKILL.md +1 -0
  57. package/framework/.claude/skills/new/references/implement.md +52 -53
  58. package/framework/.claude/skills/new/references/review-cycle.md +16 -0
  59. package/framework/.claude/skills/new2/CHANGELOG.md +7 -0
  60. package/framework/.claude/skills/new2/SKILL.md +1 -0
  61. package/framework/.claude/skills/overlay/CHANGELOG.md +7 -0
  62. package/framework/.claude/skills/overlay/SKILL.md +1 -0
  63. package/framework/.claude/skills/playwright-skill/CHANGELOG.md +7 -0
  64. package/framework/.claude/skills/playwright-skill/SKILL.md +1 -0
  65. package/framework/.claude/skills/prd/CHANGELOG.md +7 -0
  66. package/framework/.claude/skills/prd/SKILL.md +1 -0
  67. package/framework/.claude/skills/prd-add/CHANGELOG.md +7 -0
  68. package/framework/.claude/skills/prd-add/SKILL.md +1 -0
  69. package/framework/.claude/skills/remotion-best-practices/CHANGELOG.md +7 -0
  70. package/framework/.claude/skills/remotion-best-practices/SKILL.md +1 -0
  71. package/framework/.claude/skills/seo-audit/CHANGELOG.md +7 -0
  72. package/framework/.claude/skills/simplify/CHANGELOG.md +7 -0
  73. package/framework/.claude/skills/simplify/SKILL.md +1 -0
  74. package/framework/.claude/skills/skill-creator/CHANGELOG.md +7 -0
  75. package/framework/.claude/skills/skill-creator/SKILL.md +16 -8
  76. package/framework/.claude/skills/skill-creator/references/skill-structure.md +81 -0
  77. package/framework/.claude/skills/skill-creator/scripts/init_skill.py +29 -104
  78. package/framework/.claude/skills/skill-creator/scripts/quick_validate.py +17 -1
  79. package/framework/.claude/skills/toolchain-bootstrap/CHANGELOG.md +7 -0
  80. package/framework/.claude/skills/toolchain-bootstrap/SKILL.md +1 -0
  81. package/framework/.claude/skills/ui-design/CHANGELOG.md +7 -0
  82. package/framework/.claude/skills/ui-design/SKILL.md +1 -0
  83. package/framework/.claude/skills/ui-implement/CHANGELOG.md +12 -0
  84. package/framework/.claude/skills/ui-implement/SKILL.md +235 -0
  85. package/framework/.claude/skills/ui-implement/references/integration.md +92 -0
  86. package/framework/.claude/skills/ui-implement/references/playbook.md +71 -0
  87. package/framework/.claude/skills/webapp-testing/CHANGELOG.md +7 -0
  88. package/framework/.claude/skills/webapp-testing/SKILL.md +1 -0
  89. package/framework/.claude/skills/worktree-manager/CHANGELOG.md +7 -0
  90. package/framework/.claude/skills/worktree-manager/SKILL.md +1 -0
  91. package/framework/agents/skills-mapping.md +29 -0
  92. package/framework/docs/ROOT-PRIMITIVES.md +98 -0
  93. package/framework/templates/primitives/AGENTS.CHANGELOG.md +18 -0
  94. package/framework/templates/primitives/AGENTS.md +111 -0
  95. package/framework/templates/primitives/CLAUDE.CHANGELOG.md +15 -0
  96. package/framework/templates/primitives/CLAUDE.md +41 -0
  97. package/package.json +1 -1
  98. package/src/commands/add.js +15 -0
  99. package/src/commands/doctor.js +65 -0
  100. package/src/commands/migrate.js +30 -0
  101. package/src/commands/update.js +31 -0
  102. package/src/utils/root-primitives.js +418 -0
  103. package/src/utils/symlinks.js +24 -10
  104. package/framework/AGENTS.md +0 -255
@@ -1,255 +0,0 @@
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
- | E2E review BLOCKING gate (Phase 2.6 of `/new` invokes `/e2e-review`) | `features.has_e2e_review: true` |
20
- | No hardcoded user-facing strings — every label via `t()` + key in `${paths.i18n_registry}` (`context`+`domain`) | `features.has_i18n: true` |
21
-
22
- 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.
23
-
24
- ## Pre-Commit Checks
25
-
26
- Before committing, run only fast checks (lint + type check). Full build is required only before opening a PR. Fix all errors before staging files.
27
-
28
- ## File Navigation
29
-
30
- When searching for files, use Glob/Grep to find actual file paths before reading. Never guess file paths based on naming conventions.
31
-
32
- ## Git Workflow
33
-
34
- ### Branching Strategy (Simplified Git Flow)
35
-
36
- This repo uses a simplified Git Flow.
37
-
38
- | Branch | Base | Merges To | Purpose |
39
- |--------|------|-----------|---------|
40
- | `main` | — | — | Production. No direct pushes. |
41
- | `develop` | `main` | `main` (release PR) | Integration branch for features. |
42
- | `feat/*` | `develop` | `develop` (PR) | Feature work per backlog card. |
43
- | `hotfix/*` | `main` | `main` + `develop` | Critical production fixes only. |
44
-
45
- ### Branch Rules
46
-
47
- - **Feature work**: Branch from `develop` → `feat/FEAT-XXXX-slug` → PR to `develop`.
48
- - **Cloud agents**: Branch from `develop` → `codex/FEAT-XXXX-slug` or `claude/FEAT-XXXX-slug` → PR to `develop`.
49
- - **Hotfixes**: Branch from `main` → `hotfix/BUG-XXXX-slug` → PR to `main`, then merge/cherry-pick to `develop`.
50
- - **Releases**: PR from `develop` → `main` when a set of features is ready for production.
51
- - **Direct push to `main` is blocked** by a pre-push hook. Use `--no-verify` only for documented emergencies.
52
-
53
- ### Commit Hygiene
54
-
55
- 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.
56
-
57
- ### Worktree isolation (MANDATORY for every subagent spawned into a worktree)
58
-
59
- A subagent working a card runs inside a git **worktree** — a separate checkout that shares the same repository as the main checkout. The orchestrator gives you the worktree's absolute path. Every path you **Edit / Write / create / delete MUST resolve UNDER that worktree root.** NEVER edit, write, or delete any path under the **main repo root** — it is checked out live by other terminals/sessions and is NOT your workspace; touching it corrupts their working tree.
60
-
61
- - The canonical copy of every source/doc/config file **exists in your worktree** — edit THAT copy, identified by its worktree-relative path, even if you happen to know the file's absolute path in the main repo.
62
- - `cd <worktree>` is **NOT sufficient**: an absolute path that points into the main repo (e.g. `/…/<project>/docs/…` instead of `/…/<project>/.worktrees/<branch>/docs/…`) bypasses the `cd` and writes the shared checkout. Always Edit/Write the worktree-rooted path.
63
- - If a file you need appears to live ONLY in the main repo and not in your worktree, **STOP and report it** — do not reach outside the worktree to "fix" it.
64
- - **Exception:** the merge/finalizer step (and only it) legitimately operates on main-repo git state. Card-implementation and review/doc writers never do.
65
-
66
- ## Investigation Guidelines
67
-
68
- 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.
69
-
70
- ## Implementation Completeness
71
-
72
- 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.
73
-
74
- ## Testing Conventions
75
-
76
- 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.
77
-
78
- ## 2) Priority order & conflict policy
79
-
80
- Priority order for conflicts:
81
- - Agent rules: `AGENTS.md`.
82
- - Routing: `agents/index.md`.
83
- - Domain references: `${paths.references_dir}/*` (data-model, api/, ui-pages, product-scope, project-status).
84
- - Decisions: `${paths.adrs_dir}/ADR-YYYYMMDD-*.md`.
85
- - Legacy: `archive/project_full_legacy.md`.
86
-
87
- Conflict steps (must follow in order):
88
- 1. Stop and read both sources.
89
- 2. Decide which is newer and update the other.
90
- 3. Record the decision in an ADR and the backlog card.
91
-
92
- ## 3) Repo map (compact)
93
-
94
- - `AGENTS.md` (agent rules) + `agents/index.md` (routing).
95
- - `${paths.backlog_dir}/*.yml` (required work cards).
96
- - `/${paths.references_dir}/*` (API, data model, UI routes, status).
97
- - `/${paths.adrs_dir}/` (ADRs).
98
- - `/templates/` (card/spec templates).
99
- - `/src/` or project-specific source directory (application code).
100
-
101
- ## 4) Non-negotiables (MUST)
102
-
103
- ### 4.a — Universal MUST (apply to every project)
104
-
105
- - MUST treat `AGENTS.md` as authoritative for agent rules.
106
- - MUST invoke the `codebase-architect` agent 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. **The agent exists on both tools** — Claude Code spawns it via the Task/Agent tool with `subagent_type: "codebase-architect"`; Codex spawns the `codebase-architect` custom agent **by name** (BALDART installs it at `.codex/agents/codebase-architect.toml`, transpiled from the same `.md` source). Only if your environment genuinely exposes NEITHER subagent mechanism (a stripped tool host) do you degrade — explicitly — to inline structural retrieval (code-graph → LSP → Grep → direct file reads per `agents/code-search-protocol.md`), and SAY SO; never silently skip the understanding step.
107
- - MUST NOT silently substitute a *different* agent when an agent invocation returns empty (`0 tool uses · Done`), times out, or fails with `permissionDecision: deny`. On **Claude Code** this pattern indicates a sub-agent failure (see anthropics/claude-code#56869) or a discovery miss / blocked agent (see #20931 and BALDART's own `agent-discovery-gate` PreToolUse hook): STOP, report to the user verbatim: "Agent `<name>` non discoverato o fallito in questa sessione — riavvia Claude Code e verifica con `npx baldart doctor`", and wait for direction. Never auto-route to `feature-dev:*`, `general-purpose`, or any other marketplace/built-in agent as a replacement. **This rule is the ONLY defense against bug #56869 (which BALDART cannot patch from outside Claude Code); deviating from it reintroduces the exact failure mode the rule exists to prevent.** On **Codex** the equivalent is spawning the custom agent by name; the same no-silent-substitution rule holds — but the remediation differs, so STOP and report the **Codex-specific** message verbatim: "Agent `<name>` non trovato tra i custom agent di Codex (`.codex/agents/<name>.toml`) — allinea la CLI (`npm i -g baldart@latest`), esegui `npx baldart update` (o `npx baldart doctor`), assicurati che il progetto sia *trusted* in Codex, poi riavvia la sessione Codex", and wait for direction. (The #56869 specifics are Claude-only; the no-silent-substitution principle is universal.)
108
- - MUST NOT work on files/components already claimed by another agent; multiple agents allowed if working on independent areas.
109
- - 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.
110
- - MUST mark missing info as UNKNOWN and ask the user; if blocked, set `BLOCKED` with a blocker.
111
- - MUST mark assumptions as ASSUMED with rationale; add an ADR if permanent (and `features.has_adrs: true`).
112
- - 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.
113
- - MUST keep docs and code in sync; code change without doc update is invalid; doc update without code is incomplete.
114
- - MUST use commit format `[FEAT-XXX] Brief description` or adapt to your project's convention; keep commits small/traceable.
115
- - 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.
116
- - MUST pre-sync: `git fetch origin`, clean status, confirm branch; use `git pull --ff-only` unless approved.
117
- - MUST get owner approval before force push/reset, and before deleting an **unmerged** branch; create a safety tag `backup/<YYYYMMDD>-<reason>`. Deleting a feature branch that is **already merged** into `develop` is routine cleanup (it carries no unmerged work) and does NOT require a separate approval — the merge skill deletes it automatically.
118
- - MUST NEVER push directly to `main`; all changes reach `main` via PR (release from `develop` or hotfix merge). Pre-push hook enforces this.
119
- - MUST push working branch and keep `main` merge owner-controlled; the merge skill prunes a feature branch's own remote ref on successful merge into `develop` (routine), but pruning OTHER remote branches happens only when instructed.
120
- - 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.
121
- - MUST pass pre-commit hooks (linting, type checking, markdown lint, build); bypass (`--no-verify`) only for documented emergencies.
122
- - MUST use API versioning for breaking changes: create new version, deprecate old with appropriate headers, minimum sunset period; see project-specific API migration docs.
123
- - MUST use exact terminology from `agents/coding-standards.md` if it exists in your project, plus any terminology declared in `.baldart/overlays/<skill>.md`.
124
-
125
- ### 4.b — Workflow MUST (only when the matching `features.*` flag is `true`)
126
-
127
- - **When `features.has_backlog: true`:**
128
- - MUST pick one backlog card (TODO/READY), set `IN_PROGRESS`, and assign yourself before work.
129
- - 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.
130
- - MUST keep backlog tasks/notes/status current and log decisions.
131
- - MUST follow the `git_strategy` specified in the backlog card; if not specified, ask the user before starting work; delete merged branches when instructed.
132
- - 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.
133
- - MUST document every implementation or variation (backlog card/spec/docs update referencing the issue/feature) before merging.
134
-
135
- - **When the file `${paths.references_dir}/project-status.md` exists:**
136
- - MUST update its Active Code Context before work; multiple agents allowed if working on independent areas.
137
- - MUST follow handoff protocol in Active Code Context; receiver acknowledges and sets `IN_PROGRESS`.
138
- - MUST keep it under 200 lines; archive detailed work logs to `${paths.references_dir}/work-history.md`.
139
- - MUST limit Active Code Context to 1 current + 3 recent entries max; use one-line summaries (no file lists).
140
- - MUST archive work entries older than 7 days to `work-history.md`.
141
-
142
- - **When `features.has_adrs: true`:**
143
- - 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.
144
-
145
- - **When `features.has_i18n: true`:**
146
- - MUST NOT write any user-facing string hardcoded in the code — ever. Every label goes through the stack's translation function (`t('namespace.domain.key')`), with the key recorded in `${paths.i18n_registry}` (`source`+`context`+`domain`) and in the source-language native locale file. No string concatenation → ICU for plurals/gender. Enforced by the anti-hardcoded lint gate; the residue is a HIGH review finding. See `agents/i18n-protocol.md`.
147
-
148
- - **When the project ships a GitHub issue review convention** (declared in `.baldart/overlays/`):
149
- - 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.
150
- - 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.
151
- - MUST NOT add detailed file lists or multi-line work descriptions to project-status.md; use work-history.md instead.
152
-
153
- ## 5) Guidelines (SHOULD)
154
-
155
- - SHOULD use Routing to load only relevant modules.
156
- - SHOULD update `${paths.references_dir}/project-status.md` when risks/status change.
157
- - SHOULD review for duplication or drift when updating docs.
158
- - SHOULD set `execution_mode: cloud` in backlog cards handled by cloud agents and claim file ownership using `claimed_paths`.
159
-
160
- ## 5.1) Execution Modes
161
-
162
- - `local`: work on feature branches from `develop`; direct commits to `develop` allowed for trivial changes with owner approval; manual validation remains mandatory before DONE.
163
- - `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.
164
- - `hotfix`: branch from `main` for critical production fixes; merge to both `main` (deploy) and `develop` (sync); requires owner approval.
165
-
166
- ## 6) Optional conventions (OPTIONAL)
167
-
168
- - OPTIONAL: None defined. Add project-specific conventions as needed.
169
-
170
- ## 6.1) Deprecated Patterns (DO NOT USE)
171
-
172
- - Add project-specific deprecated patterns here as they emerge.
173
- - Example: Legacy authentication patterns, outdated API endpoints, deprecated libraries, etc.
174
-
175
- ## 7) Routing (If you touch X, read Y)
176
-
177
- - **Documentation routing**: See `agents/index.md` for which docs to read/update when touching code.
178
- - **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.
179
-
180
- ## 8) Workflow gates (tests/build/deploy)
181
-
182
- ### Pre-commit checks (MUST — fast, ~30s)
183
-
184
- Before attempting any `git commit`, MUST run these checks on affected files and fix all errors:
185
-
186
- 1. Lint check on changed source files — fix all lint errors.
187
- 2. Type check (if applicable) — fix all type errors.
188
- 3. Markdown lint on changed `.md` files (if .md files changed) — fix all errors.
189
-
190
- Only after all checks pass, proceed with `git add` and `git commit`.
191
- Do NOT run a full build before every commit — it kills agent velocity.
192
- Do NOT rely on pre-commit hooks to catch these — run them explicitly first to avoid failed commit retry cycles.
193
-
194
- 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.
195
-
196
- ### Pre-PR build check (MUST — before opening any PR)
197
-
198
- Before opening a pull request, MUST run:
199
-
200
- 1. Full build — must pass with no errors.
201
- 2. Full test suite — if tests exist, must pass.
202
-
203
- This is the only time a full build is required. Do not repeat this for every intermediate commit.
204
-
205
- ### Manual testing protocol (MVP)
206
-
207
- 1. Run test suite when tests exist.
208
- 2. Run build command (must pass).
209
- 3. Run project and manually test changed flows.
210
- 4. Record results in backlog card notes.
211
-
212
- QA issue methodology (manual):
213
- - One GitHub issue per test case (atomic scope).
214
- - Labels: `qa` + one macro area (customize area labels for your project).
215
- - When fixed: add fix summary comment, apply `vibe review`, leave open.
216
- - If test passes: leave issue open with a short note.
217
- - If test fails: keep open with details and evidence.
218
- - Open QA issues are the source of truth for unresolved bugs.
219
-
220
- ## 9) Token budget / truncation policy
221
-
222
- ### File size thresholds
223
-
224
- | Doc Type | Max Lines | Action When Exceeded |
225
- |----------|-----------|---------------------|
226
- | Index files (index.md) | 200 | Split by domain |
227
- | Agent modules (agents/*.md) | 300 | Split into sub-modules |
228
- | Reference docs (${paths.references_dir}/*) | 400 | Split by topic |
229
- | API docs (${paths.references_dir}/api/*) | 800 | Split by endpoint group |
230
- | Specs/PRDs (${paths.references_dir}/specs/*, ${paths.prd_dir}/*) | 800 | Split into requirements + implementation |
231
- | project-status.md | 200 | Archive to work-history.md |
232
-
233
- ### When context is truncated
234
-
235
- 1. Re-read only the specific section needed (use offset/limit).
236
- 2. Use index files (`api/index.md`, `ui/index.md`, `agents/index.md`) to navigate — never load all docs at once.
237
- 3. Link over duplicate — one source of truth per fact.
238
- 4. Prefer tables over prose for structured data.
239
- 5. If a file exceeds its threshold by 50%+, create a backlog card to split it.
240
-
241
- ### Loading priority
242
-
243
- When context budget is limited, load in this order:
244
- 1. `AGENTS.md` (rules — always first)
245
- 2. `agents/index.md` (routing)
246
- 3. Relevant domain module only (not all modules)
247
- 4. `${paths.references_dir}/project-status.md` (if status context needed)
248
-
249
- ## 10) Change protocol (updating this file)
250
-
251
- 1. Open/update a backlog card for doc changes.
252
- 2. Update the relevant module(s) first.
253
- 3. Update `${paths.references_dir}/project-status.md` if status or risks change.
254
- 4. Add an ADR for architectural decisions.
255
- 5. Review for duplication or drift.