tamirs-superpowers / rules
Cursor rule2 starsChanged 3 months agoMITView on GitHub
Script standards — CLI contract, macOS/Linux portability, non-blocking stdin, dependency tiers. Canonical: rules/dev/user-facing-script-standards.md
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/commit-conventions.mdcCursor rule
- .cursor/rules/cross-platform-handoff.mdcCursor rule
- .cursor/rules/dev-files-workspace.mdcCursor rule
- .cursor/rules/documentation-standards.mdcCursor rule
- .cursor/rules/gh-cli-preference.mdcCursor rule
- .cursor/rules/github-repository-policy.mdcCursor rule
- .cursor/rules/git-worktree-agent-workflow.mdcCursor rule
- .cursor/rules/hooks-guide.mdcCursor rule
- .cursor/rules/plugin-structure.mdcCursor rule
- .cursor/rules/plugin-version-bump.mdcCursor rule
- .cursor/rules/skill-frontmatter.mdcCursor rule
- .cursor/rules/skill-quality-standards.mdcCursor rule
- .cursor/rules/skills-guide.mdcCursor rule
- run-tamirs-superpowersSkill
- field-notebook-uiSkill
- diagnose-refusalSkill
- targeted-debugSkill
- decisionSkill
- deliver-devSkill
- diagnose-objectiveSkill
- orchestrate-devSkill
- plan-devSkill
- pr-devSkill
- start-devSkill
- switch-devSkill
- worker-devSkill
- changelog-reviewSkill
- dark-terminal-docSkill
- docs-reviewSkill
- platform-syncSkill
- mcp-builderSkill
- mcp-paginationSkill
- cleanupSkill
- github-policySkill
- multi-agent-repoSkill
- repo-scaffoldSkill
- repo-standardsSkill
- capture-configSkill
- find-skillSkill
- notify-setupSkill
- retroSkill
- session-reportSkill
- skill-creatorSkill
- usage-captureSkill
The file
Files
---
description: "Script standards — CLI contract, macOS/Linux portability, non-blocking stdin, dependency tiers. Canonical: rules/dev/user-facing-script-standards.md"
alwaysApply: false
globs: ["scripts/**/*", "skills/**/scripts/**/*", "hooks/**/*"]
---
<!-- GENERATED FILE — DO NOT EDIT.
Source: rules/dev/user-facing-script-standards.md (frontmatter + summary: platforms/cursor/rules.map.json)
Generator: scripts/build-cursor-rules.sh
Regenerate: make cursor-rules -->
# User-facing script standards
Canonical rule: `rules/dev/user-facing-script-standards.md` — read it before writing a script; the summary below is orientation only.
- `#!/usr/bin/env bash`, `set -euo pipefail`, shellcheck-clean at `-S warning`. Never place a user-facing `.sh` at the repo root — use `scripts/` plus a `Makefile` target.
- User-facing scripts support `--help`/`-h` and `--verbose`/`-v`, carry a top-of-file usage block, and fail fast on unknown flags.
- **macOS and Linux are both first-class.** Assume bash 3.2 (no `declare -A`, no `mapfile`) and avoid GNU-only spellings: `sed -i` without a suffix, `sed '/pat/i'`, `readlink -f`, `date -d`, `grep -P`, `stat -c`.
- **Windows PowerShell and `cmd.exe` are explicitly unsupported** — Windows users run under WSL2 or Git Bash. Do not add PowerShell variants.
- **Never block.** Scripts must complete with no TTY, no prompts, and no stdin. A script reading stdin must guard with `[[ ! -t 0 ]]` and bound the read; empty stdin degrades to a default and exits 0.
- Classify every external tool: required runtime (fail fast), optional feature (degrade explicitly), or contributor/validation (make targets and CI only).
- Anything an agent parses needs a stable machine-readable mode — JSON on stdout alone, diagnostics on stderr, documented exit codes.
- **Never use `echo` in a hook script** — stray stdout corrupts hook response parsing. Use `printf` or the `hooks/lib/` helpers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

