@seanyao/roll 0.5.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.
- package/README.md +201 -0
- package/bin/roll +1375 -0
- package/conventions/config.yaml +15 -0
- package/conventions/global/.cursor-rules +31 -0
- package/conventions/global/AGENTS.md +100 -0
- package/conventions/global/CLAUDE.md +32 -0
- package/conventions/global/GEMINI.md +28 -0
- package/conventions/templates/backend-service/.cursor-rules +17 -0
- package/conventions/templates/backend-service/AGENTS.md +88 -0
- package/conventions/templates/backend-service/CLAUDE.md +18 -0
- package/conventions/templates/backend-service/GEMINI.md +16 -0
- package/conventions/templates/cli/.cursor-rules +17 -0
- package/conventions/templates/cli/AGENTS.md +66 -0
- package/conventions/templates/cli/CLAUDE.md +18 -0
- package/conventions/templates/cli/GEMINI.md +16 -0
- package/conventions/templates/frontend-only/.cursor-rules +16 -0
- package/conventions/templates/frontend-only/AGENTS.md +71 -0
- package/conventions/templates/frontend-only/CLAUDE.md +16 -0
- package/conventions/templates/frontend-only/GEMINI.md +14 -0
- package/conventions/templates/fullstack/.cursor-rules +17 -0
- package/conventions/templates/fullstack/AGENTS.md +87 -0
- package/conventions/templates/fullstack/CLAUDE.md +17 -0
- package/conventions/templates/fullstack/GEMINI.md +15 -0
- package/package.json +33 -0
- package/skills/roll-.changelog/SKILL.md +79 -0
- package/skills/roll-.clarify/SKILL.md +59 -0
- package/skills/roll-.echo/SKILL.md +113 -0
- package/skills/roll-.qa/SKILL.md +204 -0
- package/skills/roll-.review/SKILL.md +105 -0
- package/skills/roll-build/SKILL.md +559 -0
- package/skills/roll-debug/SKILL.md +428 -0
- package/skills/roll-design/ENGINEERING_CHECKLIST.md +256 -0
- package/skills/roll-design/SKILL.md +276 -0
- package/skills/roll-fix/SKILL.md +442 -0
- package/skills/roll-jot/SKILL.md +50 -0
- package/skills/roll-research/SKILL.md +307 -0
- package/skills/roll-research/references/schema.json +162 -0
- package/skills/roll-research/scripts/md_to_pdf.py +289 -0
- package/skills/roll-sentinel/SKILL.md +355 -0
- package/skills/roll-spar/SKILL.md +287 -0
- package/template/.env.example +47 -0
- package/template/.github/workflows/ci.yml +32 -0
- package/template/.github/workflows/sentinel.yml +26 -0
- package/template/AGENTS.md +80 -0
- package/template/BACKLOG.md +42 -0
- package/template/package.json +43 -0
- package/tools/roll-fetch/SKILL.md +182 -0
- package/tools/roll-fetch/package.json +15 -0
- package/tools/roll-fetch/smart-web-fetch.js +558 -0
- package/tools/roll-probe/SKILL.md +84 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Roll Configuration
|
|
2
|
+
# Edit this file, then run `roll sync` to apply.
|
|
3
|
+
|
|
4
|
+
# Sync targets: where global conventions are distributed to.
|
|
5
|
+
# These are the default paths for each AI tool's global config.
|
|
6
|
+
# Override if your tool uses a non-standard location.
|
|
7
|
+
sync_claude: ~/.claude/CLAUDE.md
|
|
8
|
+
sync_kimi: ~/.kimi/AGENTS.md
|
|
9
|
+
sync_codex: ~/.codex/AGENTS.md
|
|
10
|
+
sync_gemini: ~/.gemini/GEMINI.md
|
|
11
|
+
|
|
12
|
+
# User preferences
|
|
13
|
+
default_language: zh
|
|
14
|
+
default_project_type: fullstack
|
|
15
|
+
editor: ${EDITOR:-vim}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Global Rules — Cursor
|
|
2
|
+
|
|
3
|
+
# Extends AGENTS.md in ~/.roll/conventions/global/ — read that first.
|
|
4
|
+
# This file adds Cursor-specific rules only.
|
|
5
|
+
|
|
6
|
+
## Identity
|
|
7
|
+
|
|
8
|
+
- Git: Sean Yao <sean.dlut@gmail.com>
|
|
9
|
+
- Default branch: main
|
|
10
|
+
|
|
11
|
+
## Commit Message Format
|
|
12
|
+
|
|
13
|
+
- Format: [sean's claw] <type>: <description>
|
|
14
|
+
- TCR micro-commits: tcr: <description> (no prefix)
|
|
15
|
+
- Types: Story N, Fix, Refactor, Docs, Chore
|
|
16
|
+
|
|
17
|
+
## Cursor-Specific
|
|
18
|
+
|
|
19
|
+
- When using Composer, break large changes into reviewable chunks.
|
|
20
|
+
- Prefer inline edits over full file rewrites.
|
|
21
|
+
- Use @-references to relevant files when context is needed.
|
|
22
|
+
- Tab completion suggestions should follow the code style in AGENTS.md.
|
|
23
|
+
- When a project has Roll workflow, follow the AGENTS.md conventions.
|
|
24
|
+
|
|
25
|
+
## Frontend Default Stack
|
|
26
|
+
|
|
27
|
+
- React + shadcn/ui + Tailwind CSS is the default.
|
|
28
|
+
- Use shadcn/ui components first. Custom only when shadcn doesn't cover it.
|
|
29
|
+
- Tailwind utility classes only. No inline styles, no CSS modules.
|
|
30
|
+
|
|
31
|
+
## All shared conventions are defined in AGENTS.md.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Global Agent Conventions — Sean Yao
|
|
2
|
+
|
|
3
|
+
> Master conventions file. All AI coding agents follow these principles.
|
|
4
|
+
> Tool-specific files (CLAUDE.md, GEMINI.md, .cursor-rules) extend this document.
|
|
5
|
+
|
|
6
|
+
## Communication
|
|
7
|
+
|
|
8
|
+
- Respond in the language I write in. Chinese message → Chinese response. English → English.
|
|
9
|
+
- Code, commit messages, variable names, comments: always English.
|
|
10
|
+
- Error messages in API responses: English.
|
|
11
|
+
- UI-facing text: Chinese (internal tool for Chinese-speaking team).
|
|
12
|
+
- Be concise. Don't summarize what you just did — I can read the diff.
|
|
13
|
+
- Don't ask for confirmation on routine actions. Just do it and show the result.
|
|
14
|
+
- If something is ambiguous, make a reasonable judgment call. Only ask when the choice has real consequences.
|
|
15
|
+
- Use plain language. No academic jargon or pretentious framing.
|
|
16
|
+
- **Roll workflow milestones may be narrated.** It's fine to report high-level progress such as running baseline, sketching a design, completing an Action, passing a Verification Gate, or finishing TCR (Green/Commit or Red/Revert).
|
|
17
|
+
- **Implementation details are invisible.** Do not include code diffs, file paths, line numbers, function names, variable names, test scripts, model parameters, or raw git output in conversational responses.
|
|
18
|
+
- **Strategic reasoning is okay; tactical code-walking is not.** You may explain *why* a design choice was made at the product/business level. Do not narrate step-by-step code modifications or internal debugging monologues.
|
|
19
|
+
- **Report in user-centric outcomes.** After making changes, summarize what improved for the user or product in 1–2 sentences.
|
|
20
|
+
- **No code dumps unless explicitly asked.** Never paste code snippets, stack traces, or technical speculations into the chat.
|
|
21
|
+
- **Business context over technical mechanics.** When explaining a bug or fix, lead with the user-visible effect. Root causes, if mentioned at all, belong in a single trailing sentence.
|
|
22
|
+
|
|
23
|
+
## Code Style
|
|
24
|
+
|
|
25
|
+
- TypeScript strict mode. No `any` unless absolutely unavoidable.
|
|
26
|
+
- Functional components with hooks. No class components.
|
|
27
|
+
- Prefer `const` over `let`. Never `var`.
|
|
28
|
+
- Early returns over nested conditionals.
|
|
29
|
+
- Name things clearly — no abbreviations except well-known ones (e.g., `id`, `url`, `api`).
|
|
30
|
+
- Keep functions short and single-purpose. If it needs a comment to explain, it's too complex.
|
|
31
|
+
- Don't add comments unless the logic is genuinely non-obvious.
|
|
32
|
+
- Don't add docstrings, JSDoc, or type annotations to code you didn't change.
|
|
33
|
+
|
|
34
|
+
## Git
|
|
35
|
+
|
|
36
|
+
- Conventional commit format: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`, `test:`
|
|
37
|
+
- Write in English, concise, imperative mood.
|
|
38
|
+
- Never force push to main.
|
|
39
|
+
- Never skip hooks (`--no-verify`).
|
|
40
|
+
- Never commit `.env`, credentials, or secrets.
|
|
41
|
+
|
|
42
|
+
## Behavior
|
|
43
|
+
|
|
44
|
+
- Do not refactor files unrelated to the current task.
|
|
45
|
+
- Do not add features, refactoring, or "improvements" not requested.
|
|
46
|
+
- Always ask before making structural changes (directory reorganization, architecture changes).
|
|
47
|
+
- Don't wrap simple things in abstractions. Three similar lines > a premature helper.
|
|
48
|
+
- Don't add error handling for impossible scenarios. Trust the framework.
|
|
49
|
+
- Delete unused things completely — no `// removed` comments, no backward-compat shims.
|
|
50
|
+
- Don't create README.md or documentation files unless asked.
|
|
51
|
+
|
|
52
|
+
## Testing
|
|
53
|
+
|
|
54
|
+
- All business logic must have unit tests (coverage >80%).
|
|
55
|
+
- All API endpoints must have integration tests — no DB mocks.
|
|
56
|
+
- Critical user flows must have E2E tests (Playwright).
|
|
57
|
+
- New architecture introductions (State/Cache/EventBus) must have data flow integration tests.
|
|
58
|
+
- Run existing tests before pushing to verify no regressions.
|
|
59
|
+
|
|
60
|
+
## Engineering Common Sense
|
|
61
|
+
|
|
62
|
+
Non-negotiable requirements for all code changes. Violating these is a bug:
|
|
63
|
+
|
|
64
|
+
- **Idempotency**: Same operation N times = same result. Test by running 3 times.
|
|
65
|
+
- **Cross-module contract**: Shared IDs, formats, algorithms must be identical across modules.
|
|
66
|
+
- **Data flow integrity**: Producer → Storage → Consumer chain must be complete and tested.
|
|
67
|
+
- **Atomicity**: Operations complete fully or not at all. Partial failure → rollback.
|
|
68
|
+
- **Input validation**: All external input (API, user, file) must be validated.
|
|
69
|
+
- **Graceful degradation**: Dependency fails → limited functionality, not crash.
|
|
70
|
+
- **Observability**: User must see progress, state, and errors.
|
|
71
|
+
- **Concurrency safety**: Shared resources under multi-thread/multi-process access must be safe.
|
|
72
|
+
|
|
73
|
+
## Roll Workflow (When Project Has It)
|
|
74
|
+
|
|
75
|
+
When a project has Roll workflow configured:
|
|
76
|
+
|
|
77
|
+
### Workspace Structure
|
|
78
|
+
|
|
79
|
+
- `BACKLOG.md` = index table, one-line summary per story only.
|
|
80
|
+
- `docs/features/<feature>.md` = US details (AC, Files, Dependencies).
|
|
81
|
+
- `docs/features/<feature>-plan.md` = architecture design doc (optional).
|
|
82
|
+
- Never write project docs to `~/.kimi/` or any global config directory.
|
|
83
|
+
|
|
84
|
+
### Development Discipline
|
|
85
|
+
|
|
86
|
+
- **TCR mandatory**: All code changes follow Test → Green = Commit / Red = Revert. No WIP commits.
|
|
87
|
+
- **Action granularity**: Each Action independently deployable, completable in 2–5 min. No placeholders (no TBD/TODO/pending).
|
|
88
|
+
- **Verification Gate**: Before marking done, provide fresh evidence (test output, screenshot, curl). "I confirmed it works" is not evidence.
|
|
89
|
+
- **Complete delivery**: push to GitHub + CI passes + deployed online. Local-only done is not done.
|
|
90
|
+
|
|
91
|
+
### Skill Selection
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Uncertain approach? → $roll-design
|
|
95
|
+
Want to ship something? → $roll-build (handles US-XXX, FIX-XXX, or vague ideas)
|
|
96
|
+
Single bug fix? → $roll-fix
|
|
97
|
+
High-risk logic? → $roll-spar
|
|
98
|
+
Page/production issue? → $roll-debug
|
|
99
|
+
Initialize new project? → roll init (CLI command, not a skill)
|
|
100
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Global Preferences — Claude Code
|
|
2
|
+
|
|
3
|
+
> Extends [AGENTS.md](./AGENTS.md) — read that first for shared conventions.
|
|
4
|
+
> This file adds Claude Code-specific configuration only.
|
|
5
|
+
|
|
6
|
+
## Identity
|
|
7
|
+
|
|
8
|
+
- Git: `Sean Yao <sean.dlut@gmail.com>`
|
|
9
|
+
- Default branch: `main`
|
|
10
|
+
|
|
11
|
+
## Commit Message Format
|
|
12
|
+
|
|
13
|
+
- Format: `<type>: <description>` (遵循 Git Hook 自动生成的前缀)
|
|
14
|
+
- TCR micro-commits: `tcr: <description>` (No prefix)
|
|
15
|
+
- Types: Story N, Fix, Refactor, Docs, Chore
|
|
16
|
+
- Example: `Story 7: Review assignment by org structure`
|
|
17
|
+
|
|
18
|
+
## Claude Code-Specific
|
|
19
|
+
|
|
20
|
+
- When a project has Roll skills, use them (`$roll-design`, `$roll-story`, etc.).
|
|
21
|
+
- Use plan mode for complex multi-step tasks before executing.
|
|
22
|
+
- Prefer Edit tool over Bash for file modifications.
|
|
23
|
+
- Use Agent tool with worktree isolation for parallel independent subtasks.
|
|
24
|
+
- When I say "帮我看下" or "处理下", go ahead and do it, not just analyze it.
|
|
25
|
+
|
|
26
|
+
## Frontend Default Stack
|
|
27
|
+
|
|
28
|
+
- React + shadcn/ui + Tailwind CSS is the default.
|
|
29
|
+
- Use shadcn/ui components first. Custom components only when shadcn doesn't cover it.
|
|
30
|
+
- `components/ui/` is shadcn-generated — never edit manually.
|
|
31
|
+
- Tailwind utility classes only. No inline styles, no CSS modules.
|
|
32
|
+
- Icons: Lucide React.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Global Preferences — Gemini CLI
|
|
2
|
+
|
|
3
|
+
> Extends AGENTS.md in this directory — read that first for shared conventions.
|
|
4
|
+
> This file adds Gemini CLI-specific configuration only.
|
|
5
|
+
|
|
6
|
+
## Identity
|
|
7
|
+
|
|
8
|
+
- Git: `Sean Yao <sean.dlut@gmail.com>`
|
|
9
|
+
- Default branch: `main`
|
|
10
|
+
|
|
11
|
+
## Commit Message Format
|
|
12
|
+
|
|
13
|
+
- Format: `<type>: <description>` (遵循 Git Hook 自动生成的前缀)
|
|
14
|
+
- TCR micro-commits: `tcr: <description>` (No prefix)
|
|
15
|
+
- Types: Story N, Fix, Refactor, Docs, Chore
|
|
16
|
+
|
|
17
|
+
## Gemini-Specific
|
|
18
|
+
|
|
19
|
+
- When running shell commands, prefer the most specific tool available.
|
|
20
|
+
- For file operations, verify the file exists before modifying.
|
|
21
|
+
- When a project has Roll workflow, follow the AGENTS.md conventions and use Roll skills.
|
|
22
|
+
- Prefer targeted edits over full file rewrites.
|
|
23
|
+
|
|
24
|
+
## Frontend Default Stack
|
|
25
|
+
|
|
26
|
+
- React + shadcn/ui + Tailwind CSS is the default.
|
|
27
|
+
- Use shadcn/ui components first. Custom only when shadcn doesn't cover it.
|
|
28
|
+
- Tailwind utility classes only. No inline styles, no CSS modules.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Project Rules — Backend Service (Cursor)
|
|
2
|
+
|
|
3
|
+
# Extends global .cursor-rules + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript
|
|
8
|
+
- Database: Prisma or Drizzle ORM
|
|
9
|
+
- Testing: Vitest + Supertest
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- No frontend code in this project. API-only service.
|
|
14
|
+
- Routes are thin — delegate to services for business logic.
|
|
15
|
+
- Validate all inputs at route level (zod/joi).
|
|
16
|
+
- Environment config via .env. Never hardcode secrets.
|
|
17
|
+
- Follow AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Project Conventions — Backend Service
|
|
2
|
+
|
|
3
|
+
> Project-type-specific conventions — reference material for skills.
|
|
4
|
+
> **Note: Reference Template** — used by skills to infer project conventions. Not selected by users.
|
|
5
|
+
|
|
6
|
+
## API Design
|
|
7
|
+
|
|
8
|
+
- RESTful API with consistent URL structure: `/api/{resource}/{id}`.
|
|
9
|
+
- For internal microservices, gRPC is acceptable.
|
|
10
|
+
- Structured error responses: `{ error: string, code: string, details?: object }`.
|
|
11
|
+
- Health check endpoint: `GET /api/health` returning `{ status: "ok", version: string }`.
|
|
12
|
+
- API versioning via URL prefix (`/api/v1/`) when breaking changes are needed.
|
|
13
|
+
|
|
14
|
+
## Configuration
|
|
15
|
+
|
|
16
|
+
- Environment config via `.env`. Never hardcode secrets.
|
|
17
|
+
- Use `.env.example` as the template with all required variables documented.
|
|
18
|
+
- Validate all env vars at startup — fail fast if missing.
|
|
19
|
+
- Separate configs for development, staging, production.
|
|
20
|
+
|
|
21
|
+
## Logging
|
|
22
|
+
|
|
23
|
+
- Structured JSON logging (e.g., pino, winston with JSON transport).
|
|
24
|
+
- Log levels: `error`, `warn`, `info`, `debug`. Default to `info` in production.
|
|
25
|
+
- Include correlation IDs for request tracing.
|
|
26
|
+
- Never log secrets, tokens, or PII.
|
|
27
|
+
|
|
28
|
+
## Error Handling
|
|
29
|
+
|
|
30
|
+
- Domain errors: typed error classes with error codes.
|
|
31
|
+
- HTTP errors: map domain errors to appropriate status codes.
|
|
32
|
+
- Unhandled errors: catch-all middleware, log full stack, return 500 with safe message.
|
|
33
|
+
- Validation errors: 400 with detailed field-level error messages.
|
|
34
|
+
|
|
35
|
+
## Project Structure
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
src/
|
|
39
|
+
├── routes/ # HTTP route handlers (thin — delegate to services)
|
|
40
|
+
├── services/ # business logic (pure functions where possible)
|
|
41
|
+
├── models/ # data models, ORM entities, schemas
|
|
42
|
+
├── middleware/ # auth, logging, error handling, validation
|
|
43
|
+
├── utils/ # shared utilities
|
|
44
|
+
├── types/ # TypeScript type definitions
|
|
45
|
+
├── config/ # environment config, constants
|
|
46
|
+
└── index.ts # entry point, server bootstrap
|
|
47
|
+
|
|
48
|
+
tests/
|
|
49
|
+
├── unit/ # service/model unit tests
|
|
50
|
+
├── integration/ # API endpoint tests (supertest)
|
|
51
|
+
└── regression/ # Sentinel regression
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Database
|
|
55
|
+
|
|
56
|
+
- Migrations managed via a migration tool (Prisma, Drizzle, Knex).
|
|
57
|
+
- Never modify production data manually — always through migrations.
|
|
58
|
+
- Index frequently queried columns. Monitor slow queries.
|
|
59
|
+
- Use transactions for multi-table operations.
|
|
60
|
+
|
|
61
|
+
## Security
|
|
62
|
+
|
|
63
|
+
- Input validation on all endpoints (zod, joi, or similar).
|
|
64
|
+
- Rate limiting on public endpoints.
|
|
65
|
+
- CORS configured explicitly — no wildcard in production.
|
|
66
|
+
- Authentication middleware applied at route level, not globally.
|
|
67
|
+
- Secrets rotated periodically. Never in git history.
|
|
68
|
+
|
|
69
|
+
## Architecture Constraints
|
|
70
|
+
|
|
71
|
+
- **Domain Driven**: organize code by business domain, not technical layer. `src/services/` contains domain logic, not generic utilities.
|
|
72
|
+
- **Clean Architecture**: routes (thin) → services (business logic) → models (data) ← infrastructure (DB/external APIs). Routes delegate; they don't contain business logic.
|
|
73
|
+
- **Data Schema First**: define types/schemas before writing business logic.
|
|
74
|
+
- **API Contract**: typed request/response schemas. API changes must bump version or be backward-compatible.
|
|
75
|
+
|
|
76
|
+
## Development Discipline
|
|
77
|
+
|
|
78
|
+
- **TCR mandatory**: All code changes follow Test → Green = Commit / Red = Revert. No WIP commits.
|
|
79
|
+
- **Action granularity**: Each Action independently deployable, completable in 2–5 min. No placeholders (no TBD/TODO/pending).
|
|
80
|
+
- **Verification Gate**: Before marking done, provide fresh evidence (test output, curl response). "I confirmed it works" is not evidence.
|
|
81
|
+
- **Complete delivery**: push to GitHub + CI passes + deployed online. Local-only done is not done.
|
|
82
|
+
|
|
83
|
+
## Workspace Structure
|
|
84
|
+
|
|
85
|
+
- `BACKLOG.md` = index table, one-line summary per story only.
|
|
86
|
+
- `docs/features/<feature>.md` = US details (AC, Files, Dependencies).
|
|
87
|
+
- `docs/features/<feature>-plan.md` = architecture design doc (optional).
|
|
88
|
+
- Never write project docs to `~/.kimi/` or any global config directory.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Project Preferences — Backend Service (Claude Code)
|
|
2
|
+
|
|
3
|
+
> Extends global CLAUDE.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript / Express or Hono or Fastify
|
|
8
|
+
- Database: Prisma or Drizzle ORM
|
|
9
|
+
- Testing: Vitest (unit) + Supertest (integration)
|
|
10
|
+
- Deploy: Railway / Fly.io / Docker
|
|
11
|
+
|
|
12
|
+
## Claude Code Notes
|
|
13
|
+
|
|
14
|
+
- No frontend in this project. API-only service.
|
|
15
|
+
- Use `$roll-design` to plan API contracts and data models before implementation.
|
|
16
|
+
- Write integration tests that hit real endpoints (supertest), not mocked handlers.
|
|
17
|
+
- Verify health check endpoint responds before reporting deploy as done.
|
|
18
|
+
- Run `npm run build && npm run test` before pushing.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Project Preferences — Backend Service (Gemini CLI)
|
|
2
|
+
|
|
3
|
+
> Extends global GEMINI.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript / Express or Hono or Fastify
|
|
8
|
+
- Database: Prisma or Drizzle ORM
|
|
9
|
+
- Testing: Vitest + Supertest
|
|
10
|
+
|
|
11
|
+
## Gemini Notes
|
|
12
|
+
|
|
13
|
+
- No frontend in this project. API-only service.
|
|
14
|
+
- Write integration tests that hit real endpoints, not mocked handlers.
|
|
15
|
+
- Run `npm run build && npm run test` before pushing.
|
|
16
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Project Rules — CLI Tool (Cursor)
|
|
2
|
+
|
|
3
|
+
# Extends global .cursor-rules + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript
|
|
8
|
+
- CLI framework: commander or citty
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
- No server, no frontend. CLI tool only.
|
|
13
|
+
- One file per command in src/commands/.
|
|
14
|
+
- Exit codes: 0 = success, 1 = user error, 2 = system error.
|
|
15
|
+
- Errors to stderr, results to stdout.
|
|
16
|
+
- Support --help and --version on every command.
|
|
17
|
+
- Follow AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Project Conventions — CLI Tool
|
|
2
|
+
|
|
3
|
+
> Project-type-specific conventions — reference material for skills.
|
|
4
|
+
> **Note: Reference Template** — used by skills to infer project conventions. Not selected by users.
|
|
5
|
+
|
|
6
|
+
## Design Principles
|
|
7
|
+
|
|
8
|
+
- Lightweight. No server, no frontend, no heavy frameworks.
|
|
9
|
+
- Clear command structure: `tool <command> [options] [args]`.
|
|
10
|
+
- Helpful error messages with actionable suggestions.
|
|
11
|
+
- Consistent exit codes: 0 = success, 1 = user error, 2 = system error.
|
|
12
|
+
- Support `--help` and `--version` on every command.
|
|
13
|
+
- Respect `NO_COLOR` env var for output formatting.
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
- Single entry point dispatching to command handlers.
|
|
18
|
+
- Each command in its own file — easy to find, easy to test.
|
|
19
|
+
- Config loading: CLI flags > environment variables > config file > defaults.
|
|
20
|
+
- Use a CLI framework (commander, yargs, or citty) for argument parsing.
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
- Default to human-readable output. Support `--json` for machine-readable.
|
|
25
|
+
- Progress indicators for long operations (ora, cli-progress).
|
|
26
|
+
- Errors to stderr, results to stdout.
|
|
27
|
+
- Quiet mode (`--quiet` or `-q`) suppresses non-essential output.
|
|
28
|
+
|
|
29
|
+
## Project Structure
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
src/
|
|
33
|
+
├── index.ts # entry point, CLI bootstrap
|
|
34
|
+
├── commands/ # one file per command
|
|
35
|
+
│ ├── init.ts
|
|
36
|
+
│ ├── build.ts
|
|
37
|
+
│ └── ...
|
|
38
|
+
├── utils/ # shared utilities
|
|
39
|
+
├── types/ # type definitions
|
|
40
|
+
└── config.ts # config loading logic
|
|
41
|
+
|
|
42
|
+
tests/
|
|
43
|
+
├── unit/ # command logic tests
|
|
44
|
+
└── integration/ # full CLI invocation tests (execa)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Distribution
|
|
48
|
+
|
|
49
|
+
- Compile to single executable or publish to npm.
|
|
50
|
+
- Include `bin` field in `package.json`.
|
|
51
|
+
- Test installation flow: `npm install -g` should work cleanly.
|
|
52
|
+
- Include a man page or `--help` output that covers all commands.
|
|
53
|
+
|
|
54
|
+
## Development Discipline
|
|
55
|
+
|
|
56
|
+
- **TCR mandatory**: All code changes follow Test → Green = Commit / Red = Revert. No WIP commits.
|
|
57
|
+
- **Action granularity**: Each Action independently deployable, completable in 2–5 min. No placeholders (no TBD/TODO/pending).
|
|
58
|
+
- **Verification Gate**: Before marking done, run the actual command and paste the output. "I confirmed it works" is not evidence.
|
|
59
|
+
- **Complete delivery**: push to GitHub + CI passes + published/deployed. Local-only done is not done.
|
|
60
|
+
|
|
61
|
+
## Workspace Structure
|
|
62
|
+
|
|
63
|
+
- `BACKLOG.md` = index table, one-line summary per story only.
|
|
64
|
+
- `docs/features/<feature>.md` = US details (AC, Files, Dependencies).
|
|
65
|
+
- `docs/features/<feature>-plan.md` = architecture design doc (optional).
|
|
66
|
+
- Never write project docs to `~/.kimi/` or any global config directory.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Project Preferences — CLI Tool (Claude Code)
|
|
2
|
+
|
|
3
|
+
> Extends global CLAUDE.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript
|
|
8
|
+
- CLI framework: commander or citty
|
|
9
|
+
- Testing: Vitest + execa (CLI integration tests)
|
|
10
|
+
- Distribution: npm package with bin entry
|
|
11
|
+
|
|
12
|
+
## Claude Code Notes
|
|
13
|
+
|
|
14
|
+
- No server, no frontend. CLI tool only.
|
|
15
|
+
- Test commands by running them in Bash, not just unit tests.
|
|
16
|
+
- Use `$roll-design` to plan command structure and options before implementation.
|
|
17
|
+
- Verify `--help` output is clear and complete for each command.
|
|
18
|
+
- Run `npm run build && node dist/index.js --help` before pushing.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Project Preferences — CLI Tool (Gemini CLI)
|
|
2
|
+
|
|
3
|
+
> Extends global GEMINI.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript
|
|
8
|
+
- CLI framework: commander or citty
|
|
9
|
+
- Testing: Vitest
|
|
10
|
+
|
|
11
|
+
## Gemini Notes
|
|
12
|
+
|
|
13
|
+
- No server, no frontend. CLI tool only.
|
|
14
|
+
- Test commands by running them, not just unit tests.
|
|
15
|
+
- Run `npm run build && node dist/index.js --help` before pushing.
|
|
16
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Project Rules — Frontend Only (Cursor)
|
|
2
|
+
|
|
3
|
+
# Extends global .cursor-rules + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- React + shadcn/ui + Tailwind CSS + Vite
|
|
8
|
+
- Testing: Vitest + Playwright
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
- No backend code in this project. API consumption only.
|
|
13
|
+
- src/components/ui/ is shadcn-generated. Never edit manually.
|
|
14
|
+
- Organize code by domain: src/domains/{domain}/
|
|
15
|
+
- All business logic in hooks or services, not in components.
|
|
16
|
+
- Follow AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Project Conventions — Frontend Only
|
|
2
|
+
|
|
3
|
+
> Project-type-specific conventions — reference material for skills.
|
|
4
|
+
> **Note: Reference Template** — used by skills to infer project conventions. Not selected by users.
|
|
5
|
+
|
|
6
|
+
## Frontend
|
|
7
|
+
|
|
8
|
+
- Stack: React 18+ / TypeScript / Vite / Tailwind CSS / shadcn/ui / Lucide React
|
|
9
|
+
- Use shadcn/ui components first. Custom components only when shadcn doesn't cover it.
|
|
10
|
+
- `src/components/ui/` is shadcn-generated — never edit manually.
|
|
11
|
+
- `src/components/[feature]/` for custom feature components.
|
|
12
|
+
- Tailwind utility classes only. No inline styles, no CSS modules.
|
|
13
|
+
- Organize by domain: `src/domains/{domain}/components/`, `hooks/`, `services/`, `types.ts`
|
|
14
|
+
- Shared utilities in `src/shared/` (api/, types/, utils/, hooks/).
|
|
15
|
+
|
|
16
|
+
## Architecture
|
|
17
|
+
|
|
18
|
+
- **Domain Driven Design**: organize code by business domain, not technical layer.
|
|
19
|
+
- **Clean Architecture**: UI → Application (hooks) → Domain (services) → Infrastructure (API client).
|
|
20
|
+
- **Decoupling**: UI renders only, logic lives in hooks. API calls wrapped in services.
|
|
21
|
+
- **Data Schema First**: define types/schemas before writing business logic.
|
|
22
|
+
- No backend code in this project. API consumption only.
|
|
23
|
+
|
|
24
|
+
## State Management
|
|
25
|
+
|
|
26
|
+
- Prefer React built-in state (useState, useReducer, useContext) for simple cases.
|
|
27
|
+
- Use a state library (Zustand, Jotai) only when shared state gets complex.
|
|
28
|
+
- Server state via TanStack Query (React Query) for API data fetching and caching.
|
|
29
|
+
|
|
30
|
+
## Project Structure
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
src/
|
|
34
|
+
├── components/ui/ # shadcn/ui (generated, don't edit)
|
|
35
|
+
├── domains/ # DDD by business domain
|
|
36
|
+
│ └── {domain}/
|
|
37
|
+
│ ├── components/ # domain-specific UI
|
|
38
|
+
│ ├── hooks/ # domain logic + state
|
|
39
|
+
│ ├── services/ # API client calls
|
|
40
|
+
│ └── types.ts # domain types
|
|
41
|
+
├── shared/
|
|
42
|
+
│ ├── api/ # HTTP client, interceptors
|
|
43
|
+
│ ├── types/ # shared type definitions
|
|
44
|
+
│ └── utils/ # utility functions
|
|
45
|
+
├── App.tsx
|
|
46
|
+
└── main.tsx
|
|
47
|
+
|
|
48
|
+
tests/
|
|
49
|
+
├── unit/ # Vitest + Testing Library
|
|
50
|
+
└── e2e/ # Playwright
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Development Discipline
|
|
54
|
+
|
|
55
|
+
- **TCR mandatory**: All code changes follow Test → Green = Commit / Red = Revert. No WIP commits.
|
|
56
|
+
- **Action granularity**: Each Action independently deployable, completable in 2–5 min. No placeholders (no TBD/TODO/pending).
|
|
57
|
+
- **Verification Gate**: Before marking done, provide fresh evidence (test output, screenshot). "I confirmed it works" is not evidence.
|
|
58
|
+
- **Complete delivery**: push to GitHub + CI passes + deployed online. Local-only done is not done.
|
|
59
|
+
|
|
60
|
+
## Testing Requirements
|
|
61
|
+
|
|
62
|
+
- All hooks and domain logic must have unit tests (Vitest + Testing Library, coverage >80%).
|
|
63
|
+
- Critical user flows must have E2E tests (Playwright).
|
|
64
|
+
- Run existing tests before pushing to verify no regressions.
|
|
65
|
+
|
|
66
|
+
## Workspace Structure
|
|
67
|
+
|
|
68
|
+
- `BACKLOG.md` = index table, one-line summary per story only.
|
|
69
|
+
- `docs/features/<feature>.md` = US details (AC, Files, Dependencies).
|
|
70
|
+
- `docs/features/<feature>-plan.md` = architecture design doc (optional).
|
|
71
|
+
- Never write project docs to `~/.kimi/` or any global config directory.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Project Preferences — Frontend Only (Claude Code)
|
|
2
|
+
|
|
3
|
+
> Extends global CLAUDE.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- React + shadcn/ui + Tailwind CSS + Vite
|
|
8
|
+
- Testing: Vitest (unit) + Playwright (E2E)
|
|
9
|
+
- Deploy: Vercel
|
|
10
|
+
|
|
11
|
+
## Claude Code Notes
|
|
12
|
+
|
|
13
|
+
- No backend in this project. All data via external API consumption.
|
|
14
|
+
- Use `$roll-design` to plan component architecture and state management.
|
|
15
|
+
- Start dev server and verify UI changes in browser before reporting done.
|
|
16
|
+
- Run `npm run build` to verify production bundle compiles before pushing.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Project Preferences — Frontend Only (Gemini CLI)
|
|
2
|
+
|
|
3
|
+
> Extends global GEMINI.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- React + shadcn/ui + Tailwind CSS + Vite
|
|
8
|
+
- Testing: Vitest + Playwright
|
|
9
|
+
|
|
10
|
+
## Gemini Notes
|
|
11
|
+
|
|
12
|
+
- No backend in this project. All data via external API consumption.
|
|
13
|
+
- Run `npm run build` to verify production bundle compiles before pushing.
|
|
14
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Project Rules — Fullstack Web (Cursor)
|
|
2
|
+
|
|
3
|
+
# Extends global .cursor-rules + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Frontend: React + shadcn/ui + Tailwind CSS + Vite
|
|
8
|
+
- Backend: Node.js API
|
|
9
|
+
- Testing: Vitest + Playwright
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- src/components/ui/ is shadcn-generated. Never edit manually.
|
|
14
|
+
- Organize code by domain: src/domains/{domain}/
|
|
15
|
+
- API contracts live in api/types.ts and src/shared/types/ — keep in sync.
|
|
16
|
+
- All business logic in hooks or services, not in components.
|
|
17
|
+
- Follow AGENTS.md for architecture constraints and Roll workflow.
|