Skip to content

docs: add AGENTS, CONTRIBUTING, CHANGELOG, and skill playbooks#5

Merged
otabek05 merged 2 commits into
mainfrom
docs/agents-skills-changelog
May 11, 2026
Merged

docs: add AGENTS, CONTRIBUTING, CHANGELOG, and skill playbooks#5
otabek05 merged 2 commits into
mainfrom
docs/agents-skills-changelog

Conversation

@Sardor-M
Copy link
Copy Markdown

@Sardor-M Sardor-M commented May 8, 2026

Summary

Adds the canonical contributor + agent documentation and six task-specific skill playbooks. Aligns the dashboard's version to the broker's so the project ships in lockstep.

Pairs with #4 (workflow refinements). Docs/config only — no source code is modified.

What's new

Root docs

  • AGENTS.md — rules-of-engagement for any AI agent operating in this repo (Claude Code, Cursor, Codex, etc.). Covers:

    • Conversational style (no emojis in commits/PRs/code, no fluff)
    • Code quality split: Rust (/* */ block comments only, no unwrap() on Option::None, no blocking syscalls in async, bounded channels, oneshot reply requirement, no DashMap iter across .await, ReDB commit) and TypeScript (type over interface, JSDoc-only, single quotes, theme tokens, Zustand reset(), the en/ko/uz i18n triplet rule)
    • Commands map: which cargo/yarn commands to run after which kind of change, plus an explicit "do not run" list (make dev, cargo run, yarn dev)
    • Skills index pointing to .claude/skills/<name>/
    • PR workflow that mentions the auto-review and @claude mention flow
    • Comment hygiene (always --body-file, never multi-line --body)
    • Critical parallel-agent git safety rules (no git add -A, no --no-verify, no destructive ops)
  • CONTRIBUTING.md — human-facing contribution guide. Local setup, default endpoints, issue/PR quality bar, the verification suite to run before submitting, branch/commit conventions extracted from existing history (feat:/fix:/chore:/refactor:), security disclosure policy.

  • CHANGELOG.md — Keep a Changelog format. Documents the lockstep versioning policy: broker and dashboard share a single version, Cargo.toml is authoritative if drift is found, releases are tagged v<version>. Seeded [Unreleased] with the recent visible work for review.

  • .gitignore — whitelists the three new docs (the existing /*.md rule was correctly excluding stray markdown but blocked these as a side effect).

Skill playbooks (.claude/skills/)

Each skill is a self-contained skill.md with frontmatter (name, description with TRIGGER conditions). All reference .claude/skills.md as the canonical convention doc — they don't duplicate it.

Skill Purpose
code-review/ + references/gotchas.md Review changed code against CoreMQ conventions. Gotchas cover the recurring pitfalls: unwrap() on Option::None (packet_id panic class), dropped oneshot replies, missing Zustand reset(), hardcoded colors, missing i18n keys in one of en/ko/uz
verify/ Full pre-commit suite: cargo check/clippy/fmt/test + eslint/prettier/yarn build
debug-coremq/ Symptom→investigation table for broker, REST, MQTT WebSocket, and dashboard issues
coremq-guide/ Directory map, Makefile commands, default ports — orientation for new tasks
new-backend-feature/ The 7-step AdminCommand → Engine → Service → Controller → Route wiring
web-page/ Page → view → table/drawer + Zustand store + service scaffold for new dashboard sections

Lockstep version alignment

client/package.json: 3.0.00.1.0 to match server/coremq-server/Cargo.toml.

The 3.0.0 was template-inherited (likely from a Minimals/Sneat MUI starter) and did not reflect project history. Aligning to 0.1.0 is the more honest direction. If you'd rather bump Cargo.toml to 3.0.0 instead, just say so before merging — single-line flip.

Test plan

  • cat AGENTS.md CONTRIBUTING.md CHANGELOG.md — read for tone, accuracy, and broken claims (paths, port numbers, conventions).
  • ls .claude/skills/ — confirm six skill folders all present.
  • git diff main -- .gitignore — verify only the markdown whitelist changed.
  • cd client && jq -r .version package.json should print 0.1.0.
  • No source files (server/**/*.rs, client/src/**) are touched — confirm via git diff --stat main.

Notes

  • Cross-references to .claude/skills.md assume the existing project guide stays where it is — no plan to rename it.
  • If any skill description doesn't match how you actually want it triggered (e.g. web-page should also cover route registration in routes/), happy to adjust before or after merge.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive project guides, contributor guidance, agent rules, verification and troubleshooting playbooks, frontend/back-end conventions, gotchas checklist, and updated changelog to record unreleased items.
  • Chores

    • Bumped package metadata version and refined repository ignore rules.

Adds the canonical contributor + agent docs and a set of task-specific
skill playbooks adapted from a production setup. Lockstep versioning
is documented and the dashboard is aligned to the broker's version.

Root docs
  - AGENTS.md: rules-of-engagement for any AI agent (Claude Code,
    Cursor, Codex, etc.) — conversational style, code quality (Rust
    + TS split), commands map, skills index, PR workflow, comment
    hygiene, branch/commit conventions, and the parallel-agent git
    safety rules.
  - CONTRIBUTING.md: human-facing contribution guide — local setup,
    issue/PR quality bar, the verification suite to run before
    submitting, commit message format, and security disclosure.
  - CHANGELOG.md: Keep a Changelog format. Documents lockstep
    versioning policy (broker and dashboard share one version,
    Cargo.toml is authoritative).
  - .gitignore: whitelist the three new docs from the existing
    /*.md ignore rule.

Skill playbooks (.claude/skills/)
  - code-review + references/gotchas.md: catch project pitfalls
    linters miss (unwrap on Option::None for packet_id, dropped
    oneshot replies, missing Zustand reset(), hardcoded colors,
    missing i18n keys in en/ko/uz).
  - verify: full pre-commit suite — cargo check/clippy/fmt/test +
    eslint/prettier/yarn build.
  - debug-coremq: symptom→investigation table for broker, REST,
    MQTT WebSocket, and dashboard issues.
  - coremq-guide: directory map, Makefile commands, default ports.
  - new-backend-feature: the 7-step AdminCommand → Engine → Service
    → Controller → Route wiring.
  - web-page: page → view → table/drawer + Zustand store + service
    scaffold for new dashboard sections.

Lockstep version alignment
  - client/package.json: 3.0.0 → 0.1.0 to match
    server/coremq-server/Cargo.toml. The 3.0.0 number was
    template-inherited and did not reflect project history. Flip
    Cargo.toml to 3.0.0 instead if that ordering is preferred —
    this commit is the safer cleanup direction.

These changes are docs/config only. No source code is modified.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

Adds comprehensive documentation and skill/playbook files: repository conventions, contributor guide, changelog/release rules, verification and debugging procedures, frontend/backend scaffolding guides, code-review gotchas, and minor metadata/gitignore updates.

Changes

Repository Documentation & Developer Experience

Layer / File(s) Summary
Project Conventions & Rules
AGENTS.md, CONTRIBUTING.md
Repository-wide rules for AI agents, contributor workflow, code quality, git safety, and commit conventions.
Project Overview & Setup Reference
.claude/skills/coremq-guide/skill.md, CHANGELOG.md
Project layout, command reference, default ports/credentials, broker↔dashboard communication notes, and release/versioning guidance.
Development Skills & Operational Guides
.claude/skills/code-review/references/gotchas.md, .claude/skills/code-review/skill.md, .claude/skills/verify/skill.md, .claude/skills/debug-coremq/skill.md, .claude/skills/web-page/skill.md, .claude/skills/new-backend-feature/skill.md
Skill/playbook documents for code review (gotchas + reporting format), verification steps, debugging symptom-to-investigation mappings, frontend page scaffolding, and backend admin feature scaffolding.
Build Configuration & Manifest
.gitignore, client/package.json
Ignore rules updated for root Markdown files and local PR notes; client/package.json version changed from 3.0.0 to 0.1.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A warren of rules, a meadow of skills,
Agents and devs tend well-ordered hills.
Guides for the broker and dashboard in tune,
Pages and services, from morning to noon.
Happy hops — docs sprout under the moon. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: adding documentation files (AGENTS.md, CONTRIBUTING.md, CHANGELOG.md) and skill playbooks to the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/agents-skills-changelog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

133-143: ⚡ Quick win

Add language identifier to fenced code block.

The fenced code block should specify plaintext or text as the language identifier for proper markdown rendering.

Proposed fix
-```
+```text
 fix(server): assign packet_id for QoS 1/2 publishes
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 133 - 143, Add a language identifier (e.g.,
"text" or "plaintext") to the fenced code block containing the commit message
(the block starting with ``` and the line "fix(server): assign packet_id for QoS
1/2 publishes") so the markdown renders correctly; update the opening fence to
```text (or ```plaintext) and leave the content unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/code-review/references/gotchas.md:
- Line 40: Replace the typo '118n' with the correct abbreviation 'i18n' in the
gotchas line; update the sentence so it reads that adding keys requires updates
to ALL THREE: `i18n/en.json`, `i18n/ko.json`, `i18n/uz.json` (ensure the heading
remains "**i18n is mandatory** — Any user-facing string must be t('key')").

In @.claude/skills/coremq-guide/skill.md:
- Line 34: Replace the mistyped directory name "118n/" with the correct "i18n/"
in the documentation line showing the i18n folder (the line containing "└──
118n/           — en.json, ko.json, uz.json"); update that string to "└── i18n/ 
— en.json, ko.json, uz.json" so the path is correct in the skill.md content.

In @.claude/skills/debug-coremq/skill.md:
- Line 24: Replace the misspelled abbreviation "118n" with the correct "i18n" in
the markdown table row that reads "`i18n key shows as raw `feature.title`  | Key
missing from one of `118n/en.json`, `118n/ko.json`, `118n/uz.json`" (update the
`118n/en.json`, `118n/ko.json`, `118n/uz.json` tokens to `i18n/en.json`,
`i18n/ko.json`, `i18n/uz.json`); ensure you change every occurrence of the token
`118n` in this file (look for the literal `118n/...` entries and the line
mentioning `feature.title`) so the documentation consistently uses `i18n`.

In @.claude/skills/web-page/skill.md:
- Around line 22-33: The fenced directory-structure block in
.claude/skills/web-page/skill.md is missing a language identifier; update the
opening fence to include one (e.g., ```text or ```bash) so the block containing
the client/src/ tree and filenames like pages/feature.tsx, sections/feature/
(feature_view.tsx, feature_table.tsx, feature_drawer.tsx),
stores/feature_store.ts, services/feature.ts, types/feature.ts, and routes/
renders and lints correctly.
- Line 45: Fix the typo in the documentation line that references the
localization folder: change the string "client/src/118n/en.json" to
"client/src/i18n/en.json" (and similarly update any other occurrences of "118n"
in that sentence to "i18n") so the instruction reads that all user-facing
strings must be added as keys in client/src/i18n/en.json AND ko.json AND
uz.json; update the text in .claude/skills/web-page/skill.md where the phrase
"9. **i18n** — Add ALL user-facing strings as keys in `client/src/118n/en.json`"
appears.

In `@AGENTS.md`:
- Line 44: Replace the incorrect abbreviation "118n" with "i18n" in the
documentation string that reads "client/src/118n/{en,ko,uz}.json" so it becomes
"client/src/i18n/{en,ko,uz}.json"; update any other occurrences of the token
"118n" in AGENTS.md to "i18n" to ensure the example path and wording are
correct.

In `@CONTRIBUTING.md`:
- Line 81: Update the typo in the CONTRIBUTING.md sentence that references the
localization directory: change the path fragment
"client/src/118n/{en,ko,uz}.json" to "client/src/i18n/{en,ko,uz}.json" so the
example alongside the user-facing string convention t('key') points to the
correct i18n folder.

---

Nitpick comments:
In `@CONTRIBUTING.md`:
- Around line 133-143: Add a language identifier (e.g., "text" or "plaintext")
to the fenced code block containing the commit message (the block starting with
``` and the line "fix(server): assign packet_id for QoS 1/2 publishes") so the
markdown renders correctly; update the opening fence to ```text (or
```plaintext) and leave the content unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9b2163e-6515-400d-8716-8727b8bfba57

📥 Commits

Reviewing files that changed from the base of the PR and between e468206 and d492caa.

📒 Files selected for processing (12)
  • .claude/skills/code-review/references/gotchas.md
  • .claude/skills/code-review/skill.md
  • .claude/skills/coremq-guide/skill.md
  • .claude/skills/debug-coremq/skill.md
  • .claude/skills/new-backend-feature/skill.md
  • .claude/skills/verify/skill.md
  • .claude/skills/web-page/skill.md
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • client/package.json

Comment thread .claude/skills/code-review/references/gotchas.md
Comment thread .claude/skills/coremq-guide/skill.md
Comment thread .claude/skills/debug-coremq/skill.md
Comment on lines +22 to +33
```
client/src/
├── pages/feature.tsx — thin wrapper
├── sections/feature/
│ ├── feature_view.tsx — orchestrator
│ ├── feature_table.tsx — table component (optional)
│ └── feature_drawer.tsx — drawer/dialog (optional)
├── stores/feature_store.ts — Zustand store
├── services/feature.ts — axios calls
├── types/feature.ts — TS types
└── routes/ — register the route
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifier to fenced code block.

The directory structure code block should specify a language identifier for proper rendering and linting.

Proposed fix
-```
+```text
 client/src/
 ├── pages/feature.tsx                       — thin wrapper
 ├── sections/feature/
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 22-22: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/web-page/skill.md around lines 22 - 33, The fenced
directory-structure block in .claude/skills/web-page/skill.md is missing a
language identifier; update the opening fence to include one (e.g., ```text or
```bash) so the block containing the client/src/ tree and filenames like
pages/feature.tsx, sections/feature/ (feature_view.tsx, feature_table.tsx,
feature_drawer.tsx), stores/feature_store.ts, services/feature.ts,
types/feature.ts, and routes/ renders and lints correctly.

Comment thread .claude/skills/web-page/skill.md
Comment thread AGENTS.md
- Pages are thin wrappers (import view + render). Logic lives in `sections/<feature>/<feature>_view.tsx`.
- Zustand stores: split `State` (data) and `Actions` (functions), shared `initialState` constant, mandatory `reset: () => set(initialState)` for logout cleanup. Subscribe via selectors, not full destructure.
- Never call `localStorage` for auth — the axios interceptor owns token refresh.
- Every user-facing string is `t('key')`, and every key must exist in **all three** of `client/src/118n/{en,ko,uz}.json`. Missing one is a bug, not a nit.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix typo: 118ni18n.

The correct abbreviation for internationalization is i18n, not 118n.

Proposed fix
-- Every user-facing string is `t('key')`, and every key must exist in **all three** of `client/src/118n/{en,ko,uz}.json`. Missing one is a bug, not a nit.
+- Every user-facing string is `t('key')`, and every key must exist in **all three** of `client/src/i18n/{en,ko,uz}.json`. Missing one is a bug, not a nit.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Every user-facing string is `t('key')`, and every key must exist in **all three** of `client/src/118n/{en,ko,uz}.json`. Missing one is a bug, not a nit.
- Every user-facing string is `t('key')`, and every key must exist in **all three** of `client/src/i18n/{en,ko,uz}.json`. Missing one is a bug, not a nit.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 44, Replace the incorrect abbreviation "118n" with "i18n"
in the documentation string that reads "client/src/118n/{en,ko,uz}.json" so it
becomes "client/src/i18n/{en,ko,uz}.json"; update any other occurrences of the
token "118n" in AGENTS.md to "i18n" to ensure the example path and wording are
correct.

Comment thread CONTRIBUTING.md Outdated
@Sardor-M Sardor-M self-assigned this May 8, 2026
@Sardor-M Sardor-M requested a review from otabek05 May 8, 2026 07:25
@Sardor-M Sardor-M added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels May 8, 2026
Co-authored-by: Sardor Madaminov <Sardor-M@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CONTRIBUTING.md`:
- Line 133: The fenced code block opening in CONTRIBUTING.md is missing a
language tag and triggers markdownlint MD040; update the opening fence to
include a language (e.g., change the opening "```" to "```text") for the block
that contains the commit message "fix(server): assign packet_id for QoS 1/2
publishes" so the block is explicitly labeled and the linter warning is
resolved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1edbacdc-49f1-4762-971d-a307b1ddf37d

📥 Commits

Reviewing files that changed from the base of the PR and between d492caa and e5adde6.

📒 Files selected for processing (1)
  • CONTRIBUTING.md

Comment thread CONTRIBUTING.md
Copy link
Copy Markdown

@otabek05 otabek05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@otabek05 otabek05 merged commit 45555ae into main May 11, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants