- Do not commit changes unless the user explicitly asks for a commit.
- This applies even at session completion.
When ending a work session, you MUST complete ALL steps below.
MANDATORY WORKFLOW:
- Run quality gates (if code changed) - Tests, linters, builds:
make lint make test - Hand off - Provide context for next session
Follow the established history patterns:
- Use
type: subjectin lowercase with a short, imperative subject line. - Keep subjects concise (ideally under ~72 characters).
- One logical change per commit.
- Prefer these types (use only when accurate):
feat: user-visible featurefix: bug fix or correctness issuelint: lint-only fixes and style-rule compliancerefactor: behavior-preserving code restructuringtest: tests or fixtures onlydocs: documentation onlybuild: build system or tooling changesci: CI pipeline changeschore: non-functional maintenance (e.g., syncs)skill: skill/workflow instructions and skill assetsstyle: formatting-only changes (non-lint)human: human-led or non-mechanical changes (use sparingly)
This project uses clarity to visualize design and guide structural refactoring.
- Discussing design - Use
clarityto visualize architecture and dependencies for specific files, directories, or commits when discussing design decisions with the developer. - Refactoring verification - After implementing design changes, run
clarityto verify the resulting structure aligns with the discussed design.
For developer review (visualize):
- Generate and render graphs for the developer to review
- For CLI agents, default to DOT output (
clarity showorclarity show -f dot) - For CLI agents, generate a URL with
clarity show -u, then open that URL in the system browser with the platform command:- macOS:
open "<url>" - Linux:
xdg-open "<url>" - Windows (cmd):
start "" "<url>" - Windows (PowerShell):
Start-Process "<url>"
- macOS:
- Use
clarity show -f mermaidif your environment supports Mermaid rendering (desktop apps, IDEs) - Use
clarity showorclarity show -f dotif your environment supports Graphviz rendering or has dot tools installed (supports SVG, PNG, etc.) - Do not assume
clarity show -uauto-opens a browser in CLI environments; always open the generated URL explicitly - Choose the visualization method that works best for your coding environment
For agent verification (feedback and analysis):
- Run
clarity showand read the dot/mermaid output directly - Parse the graph structure to verify dependencies and relationships
- No visualization needed - the text output contains all structural information
- Use this during refactoring iterations to confirm progress
clarity show -c HEAD # Visualize changes in last commit
clarity show -i <files/dirs> # Build graph from specific files or directories (comma-separated)
clarity show -w <file1,file2> # Find all paths between two or more files (comma-separated)
clarity show -f mermaid # Generate output in mermaid format (default 'dot' Graphviz format)
clarity show -u # Generate visualization URLFor full reference, use clarity show -h
- Language: Go, plus a web UI build with npm in
cmd/watch/web - The web UI is served by the Go web server
- Entry points:
- Go:
main.go - Frontend:
cmd/watch/web
- Go:
- Common commands (from
clarity/Makefile):make lintmake testmake test-webmake build-dev