Totem — Development Rules
Defines team-wide conventions for a pnpm monorepo: branch strategy, commit rules, tooling, and a mandatory knowledge-search workflow before coding.
What this file does
Defines team-wide conventions for a pnpm monorepo: branch strategy, commit rules, tooling, and a mandatory knowledge-search workflow before coding.
When to use it
- Starting a new TypeScript monorepo with pnpm and strict linting
- Adopting a knowledge-first development workflow with search before code
- Setting up protected main branch and PR conventions for a team
- Enforcing a no-secrets-in-config policy across a project
Assumes this stack
Totem — Development Rules
Essentials
- pnpm only (never npm/yarn). Use
pnpm dlx(nevernpx). Windows 11 + Git Bash. TypeScript strict mode. mainis protected. Feature branches + PRs. Never amend commits on feature branches.- Use
Closes #NNNin PR descriptions. kebab-case.tsfiles,err(nevererror) in catch blocks, no empty catches.- Run
pnpm run formatbefore committing. - NEVER put secrets in config files.
.envonly.
Totem Workflow (BLOCKING)
- Before writing code: call
search_knowledgewith what you're changing - Before planning/architecture: query
totem-strategy:search_knowledgefor ADRs - After merging a PR: run
totem extract <pr> --yes, thentotem docsif releasing - NEVER use
git push --no-verify. Fix the violation or file a ticket.
Contributor Principles
<!-- totem-ignore-next-line -->- Update
AI_PROMPT_BLOCKininit.tswhen changing reflexes/hooks/prompts.
- GCA decline: add lesson with
review-guidancetag + update.gemini/styleguide.md§6. - No
totem-ignore,eslint-disable, or--no-verifywithout a ticket. - GCA replies: ONE
@gemini-code-assistcomment per PR.
Detailed Rules
- See
.gemini/styleguide.mdfor full code style, naming, and architecture rules. - Changesets: write
.changeset/files manually. Usepnpm run version(never barepnpm version). - Named constants for magic numbers. Zod at system boundaries only.
What's inside
5 sections: Essentials, Totem Workflow, Contributor Principles, Detailed Rules, and a styleguide reference
Change this for your project
- Replace
Totemreferences with your own project name - Replace
search_knowledgeandtotem-strategy:search_knowledgewith your own knowledge-base commands - Replace
totem extractandtotem docswith your own post-merge automation - Replace
.gemini/styleguide.mdpath with your own styleguide location
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Related Documents
MechCAD-MLLM
Proposes a MLLM + dual-decoder architecture for mechanical CAD generation, combining Drawing2CAD and CAD-GPT ideas.
Prompt Generator
Generates Stable Diffusion and Flux prompts via Qwen3-8B on Ollama, with a Gradio UI and CLI.
Agent Instructions
Defines a three-layer architecture (directive, orchestration, execution) for AI agents that self-anneal errors and update living SOPs.