feat: implement agent-os standards system and feature planning tools
- Split CODING_GUIDELINES.md into 19 indexed standards files under .claude/standards/ - 9 from CODING_GUIDELINES (conventions, powershell, security, api, git, gururmm) - 10 from session log tribal knowledge (syncro, ssh, gitea, python, client, gururmm) - Add .claude/standards/index.yml for cheap relevance-based lookup - Add /inject-standards command: load targeted standards per task instead of full guidelines - Add /shape-spec command: pre-implementation spec for GuruRMM features (plan.md, shape.md, references.md, standards.md) with mandatory out-of-scope gate - Add docs/tech-stack.md and docs/mission.md for ClaudeTools API - Add projects/msp-tools/guru-rmm/docs/tech-stack.md and mission.md for GuruRMM - Update CLAUDE.md commands table with /inject-standards and /shape-spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
38
.claude/standards/conventions/naming.md
Normal file
38
.claude/standards/conventions/naming.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: naming
|
||||
description: Naming conventions for Python, PowerShell, Bash, database tables and columns
|
||||
applies-to: all
|
||||
---
|
||||
|
||||
# Naming Conventions
|
||||
|
||||
## Python
|
||||
|
||||
- Functions: `snake_case`
|
||||
- Classes: `PascalCase`
|
||||
- Constants: `UPPER_SNAKE_CASE`
|
||||
- Follow PEP 8 for everything else
|
||||
|
||||
## PowerShell
|
||||
|
||||
- Variables: `$PascalCase` — e.g., `$TaskName`, `$ServiceStatus`
|
||||
- Functions/cmdlets: use approved verbs — `Get-`, `Set-`, `New-`, `Remove-`, `Invoke-`
|
||||
- Do not invent new verb forms; stick to the PowerShell approved verb list
|
||||
|
||||
## Bash
|
||||
|
||||
- Functions: `lowercase_underscore` — e.g., `get_token`, `check_status`
|
||||
- All variables: quote them — `"$var"`, not `$var`
|
||||
- Script names: `lowercase-with-hyphens.sh`
|
||||
|
||||
## Database
|
||||
|
||||
**Tables:**
|
||||
- Lowercase plural nouns: `users`, `user_sessions`, `agent_updates`
|
||||
- Junction/relation tables: `{table_a}_{table_b}` — e.g., `policy_assignments`
|
||||
- Foreign keys: `{referenced_table_singular}_id` — e.g., `agent_id`, `client_id`, `site_id`
|
||||
|
||||
**Columns:**
|
||||
- Timestamps: `created_at`, `updated_at` (not `created`, `modified`, `timestamp`)
|
||||
- Booleans: `is_` prefix for state — `is_active`, `is_hidden`; `has_` prefix for possession — `has_alert`
|
||||
- Status enums: use a `TEXT` column with a CHECK constraint listing valid values, not an integer code
|
||||
37
.claude/standards/conventions/no-emojis.md
Normal file
37
.claude/standards/conventions/no-emojis.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: no-emojis
|
||||
description: Never use emojis in code, scripts, config, or output; use ASCII markers instead
|
||||
applies-to: all
|
||||
---
|
||||
|
||||
# No Emojis — Ever
|
||||
|
||||
Never use emojis in code, scripts, config files, log messages, or output strings.
|
||||
|
||||
## Rationale
|
||||
|
||||
Causes PowerShell parsing errors, encoding issues, and terminal rendering problems. PowerShell profile scripts that interact with emoji characters can trigger codepage changes (`chcp 65001`) which alter the Claude Code CLI font and break rendering. Emoji bytes can also corrupt log files that are read by tools expecting ASCII or Latin-1.
|
||||
|
||||
## Use instead
|
||||
|
||||
```
|
||||
[OK] [SUCCESS] [INFO] [WARNING] [ERROR] [CRITICAL]
|
||||
```
|
||||
|
||||
These are the mandatory ASCII status markers for all scripts, tools, session logs, commit messages, and any output visible in a terminal or log file.
|
||||
|
||||
## Exception
|
||||
|
||||
User-facing web UI with proper UTF-8 handling. If a React component or HTML page is intentionally rendering emoji for end users, that is acceptable. The prohibition is on everything else: server logs, CLI output, scripts, config files, PowerShell, Bash, Python print statements, and any text that may flow through a terminal.
|
||||
|
||||
## Scope
|
||||
|
||||
This applies to:
|
||||
- All scripts (PowerShell, Bash, Python)
|
||||
- Config files (YAML, TOML, JSON comments)
|
||||
- Log messages and print statements
|
||||
- Git commit messages
|
||||
- Markdown documentation in `.claude/`
|
||||
- Syncro ticket comments
|
||||
- Session logs
|
||||
- Any output written to a terminal or log file
|
||||
49
.claude/standards/conventions/output-markers.md
Normal file
49
.claude/standards/conventions/output-markers.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
name: output-markers
|
||||
description: ASCII status markers [OK] [ERROR] [WARNING] [SUCCESS] [INFO] [CRITICAL] for all scripts and tools
|
||||
applies-to: all
|
||||
---
|
||||
|
||||
# Output Markers
|
||||
|
||||
All scripts and tools use ASCII status markers instead of emoji, colored text, or ambiguous symbols.
|
||||
|
||||
## Standard set
|
||||
|
||||
```
|
||||
[INFO] — informational, no action required
|
||||
[SUCCESS] — operation completed successfully
|
||||
[WARNING] — something is off but not fatal; attention recommended
|
||||
[ERROR] — operation failed; action required
|
||||
[CRITICAL] — severe failure; immediate attention required
|
||||
[OK] — shorter form of [SUCCESS], used in status tables and inline checks
|
||||
[GAP] — used in parity matrices; feature not implemented on this platform
|
||||
[WARN] — shorter form of [WARNING], used in parity matrices and inline checks
|
||||
```
|
||||
|
||||
## Usage examples
|
||||
|
||||
```bash
|
||||
echo "[INFO] Starting process"
|
||||
echo "[SUCCESS] Task completed"
|
||||
echo "[WARNING] Configuration file missing, using defaults"
|
||||
echo "[ERROR] Failed to connect to 172.16.3.30:3001"
|
||||
echo "[CRITICAL] Database unavailable — all writes are failing"
|
||||
```
|
||||
|
||||
## In tables and parity matrices
|
||||
|
||||
| Feature | Windows | Linux | macOS |
|
||||
|---------|---------|-------|-------|
|
||||
| CPU metrics | [OK] | [OK] | [OK] |
|
||||
| Temperature | [OK] primary | [WARN] partial | [WARN] partial |
|
||||
| Idle time | [OK] | [GAP] | [GAP] |
|
||||
|
||||
## Applies to
|
||||
|
||||
- Bash scripts
|
||||
- Python scripts and log messages
|
||||
- PowerShell scripts
|
||||
- Session log entries
|
||||
- Commit messages (use plain text, not markers, but no emoji)
|
||||
- Any output that may appear in a terminal or log file
|
||||
Reference in New Issue
Block a user