RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/nerds-odd-e/doughnut

Cursor rule

.cursor/rules/script.mdc

Shell script development and unit testing guidelines

Cursor rules

Quality

58/100

Scores the file, not the repository.

Length

313 words

9 headings · 3 code blocks

Repository

49

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
nerds-odd-e/doughnut/.cursor/rules/script.mdcRawGitHub
1---
2description: Shell script development and unit testing guidelines
3---
4 
5# Shell Script Development
6 
7## Script Location
8 
9- Place scripts in the `scripts/` directory
10- Use descriptive names with `.sh` extension
11- Make scripts executable: `chmod +x scripts/script_name.sh`
12 
13## Unit Testing
14 
15### Test Framework
16 
17- Use **Bach** testing framework for shell script unit tests
18- Bach is located at `scripts/test/vendor/bach.sh`
19- Bach requires Bash 4.3+ (available in nix environment)
20 
21### Test File Structure
22 
23- Test files should be in `scripts/test/` directory
24- Use `.test` extension (e.g., `scripts/test/run.sh.test`)
25- Test files must be executable
26 
27### Writing Tests
28 
291. Source Bach framework:
30```bash
31 source "$(dirname "$0")/vendor/bach.sh"
32```
33 
342. Create test functions with `test-` prefix:
35```bash
36 test-my-feature() {
37 # Test implementation
38 }
39```
40 
413. Create assertion functions with `-assert` suffix:
42```bash
43 test-my-feature-assert() {
44 @out "expected output"
45 }
46```
47 
484. Bach uses dry-run testing - it compares commands executed in test functions with expected commands in assert functions
49 
50### Running Tests
51 
52- Run all tests: `bash scripts/test/run_all_script_tests.sh`
53- Run individual test: `bash scripts/test/script_name.test`
54- In nix environment: `./scripts/run.sh bash scripts/test/run_all_script_tests.sh`
55 
56### Test Requirements
57 
58- All scripts in `scripts/` should have corresponding tests in `scripts/test/`
59- Tests are automatically discovered and run in CI
60- Tests must pass before merging
61 
62## CURSOR_DEV Mode Behavior
63 
64When scripts are run with `CURSOR_DEV=true nix develop -c <command>`, the nix shell hook (`scripts/nix_shell_hook.sh`) should:
65 
66- **Output only a one-liner**: `<<running within nix env>>` at the beginning
67- **Suppress all other output**: No log messages, environment info, or setup messages should appear
68- **Preserve command output**: The actual command's stdout/stderr should be displayed normally
69- **Show errors only**: If something goes wrong during setup, errors should still be visible
70 
71This ensures that when running commands via `CURSOR_DEV=true nix develop -c`, users see only:
721. The one-liner `<<running within nix env>>`
732. The command's actual output
74 
75All hook setup output is suppressed to keep the output clean and focused on the command being executed.
76 

Sections

  • Shell Script Development
  • Script Location
  • Unit Testing
  • Test Framework
  • Test File Structure
  • Writing Tests
  • Running Tests
  • Test Requirements
  • CURSOR_DEV Mode Behavior

What it covers

testarchitecture

Stack — with the evidence

typescript

(1.00)

cypress

(1.00)

biome

(1.00)

node

(0.70)

react

(0.70)

vue

(0.70)

hono

(0.70)

tailwind

(0.70)

vite

(0.70)

vitest

(0.70)

pytest

(0.70)

javascript

(0.60)

python

(0.60)

monorepo

(0.60)

pnpm

(0.60)

github-actions

(0.60)

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
nerds-odd-e
Language
—
License
—
Archived
no

All configs in this repo

Also in nerds-odd-e/doughnut

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
nerds-odd-e/doughnut.clinerules/daisyui.md · 49Cline rulestypescriptcypress+14setuplint-formatstyleui+157/1003 days ago
nerds-odd-e/doughnut.cursor/rules/architecture-decisions.mdc · 49Cursor rulestypescriptcypress+14no sections16/1003 days ago
nerds-odd-e/doughnut.cursor/rules/backend-code.mdc · 49Cursor rulestypescriptcypress+14styletypesdatabasedo-not61/1003 days ago
nerds-odd-e/doughnut.cursor/rules/backend-testing.mdc · 49Cursor rulestypescriptcypress+14buildteststyletesting-strategy+273/1003 days ago
nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49Cursor rulestypescriptcypress+14setupbuildteststyle+496/1003 days ago
nerds-odd-e/doughnut.cursor/rules/db-migration.mdc · 49Cursor rulestypescriptcypress+14stylearchdatabasedeployment64/1003 days ago
nerds-odd-e/doughnut.cursor/rules/e2e-authoring.mdc · 49Cursor rulestypescriptcypress+14setupteststylearch+380/1003 days ago
nerds-odd-e/doughnut.cursor/rules/e2e-ocr.mdc · 49Cursor rulestypescriptcypress+14setuptesting-strategydo-not46/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-api.mdc · 49Cursor rulestypescriptcypress+14styletesting-strategyapido-not57/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-component.mdc · 49Cursor rulestypescriptcypress+14testlint-formatstylearch+276/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-storybook.mdc · 49Cursor rulestypescriptcypress+14buildteststyletesting-strategy+169/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-testing.mdc · 49Cursor rulestypescriptcypress+14buildteststyletesting-strategy+289/1003 days ago
nerds-odd-e/doughnut.cursor/rules/general.mdc · 49Cursor rulestypescriptcypress+14styledo-not49/1003 days ago
nerds-odd-e/doughnut.cursor/rules/gsd-coexistence.mdc · 49Cursor rulestypescriptcypress+14style60/1003 days ago
nerds-odd-e/doughnut.cursor/rules/linting_formating.mdc · 49Cursor rulestypescriptmonorepo+14testlint-formatstylearch+688/1003 days ago
nerds-odd-e/doughnut.cursor/rules/mcp-server.mdc · 49Cursor rulestypescriptcypress+14buildtestlint-formatarch+285/1003 days ago
nerds-odd-e/doughnut.cursor/rules/planning.mdc · 49Cursor rulestypescriptcypress+14teststylearchdo-not+175/1003 days ago
nerds-odd-e/doughnutAGENTS.md · 49AGENTS.mdtypescriptcypress+14no sections47/1003 days ago
nerds-odd-e/doughnutCLAUDE.md · 49CLAUDE.mdtypescriptcypress+14agent-behaviour47/1003 days ago
Diff against .clinerules/daisyui.md Diff against .cursor/rules/architecture-decisions.mdc Diff against .cursor/rules/backend-code.mdc Diff against .cursor/rules/backend-testing.mdc Diff against .cursor/rules/cli.mdc Diff against .cursor/rules/db-migration.mdc Diff against .cursor/rules/e2e-authoring.mdc Diff against .cursor/rules/e2e-ocr.mdc Diff against .cursor/rules/frontend-api.mdc Diff against .cursor/rules/frontend-component.mdc Diff against .cursor/rules/frontend-storybook.mdc Diff against .cursor/rules/frontend-testing.mdc Diff against .cursor/rules/general.mdc Diff against .cursor/rules/gsd-coexistence.mdc Diff against .cursor/rules/linting_formating.mdc Diff against .cursor/rules/mcp-server.mdc Diff against .cursor/rules/planning.mdc Diff against AGENTS.md Diff against CLAUDE.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack