arcane-cli 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +253 -253
- package/dist/assets/.arcane/agents/agent-policies-template.md +414 -414
- package/dist/assets/.arcane/governance/agent-policies.md +414 -414
- package/dist/assets/.arcane/governance/agent-work-queue-model.md +61 -61
- package/dist/assets/.arcane/governance/cicd-standards.md +227 -227
- package/dist/assets/.arcane/governance/development-methodology.md +384 -384
- package/dist/assets/.arcane/governance/git-conventions.md +759 -759
- package/dist/assets/.arcane/governance/naming-conventions.md +142 -142
- package/dist/assets/.arcane/governance/new-business-setup.md +182 -182
- package/dist/assets/.arcane/governance/portable-bootstrap.md +101 -101
- package/dist/assets/.arcane/governance/product-excellence-standards.md +211 -211
- package/dist/assets/.arcane/governance/testing-standards.md +158 -158
- package/dist/assets/.arcane/governance/universal-agent-rules.md +108 -108
- package/dist/assets/.arcane/image-prompts/adelaide-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/alexander-image-prompt.md +138 -138
- package/dist/assets/.arcane/image-prompts/bess-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/circe-image-prompt.md +143 -143
- package/dist/assets/.arcane/image-prompts/custodio-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/iris-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/kellar-image-prompt.md +141 -141
- package/dist/assets/.arcane/image-prompts/lafayette-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/lince-image-prompt.md +142 -142
- package/dist/assets/.arcane/image-prompts/mercurio-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/merlin-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/prospero-image-prompt.md +141 -141
- package/dist/assets/.arcane.json +5 -0
- package/dist/assets/.claude/commands/spell-enchant.md +9 -9
- package/dist/assets/.github/agents/adelaide.agent.md +44 -44
- package/dist/assets/.github/agents/alexander.agent.md +43 -43
- package/dist/assets/.github/agents/bess.agent.md +42 -42
- package/dist/assets/.github/agents/circe.agent.md +43 -43
- package/dist/assets/.github/agents/custodio.agent.md +44 -44
- package/dist/assets/.github/agents/iris.agent.md +43 -43
- package/dist/assets/.github/agents/kellar.agent.md +43 -43
- package/dist/assets/.github/agents/lafayette.agent.md +42 -42
- package/dist/assets/.github/agents/lince.agent.md +43 -43
- package/dist/assets/.github/agents/mercurio.agent.md +43 -43
- package/dist/assets/.github/agents/merlin.agent.md +44 -44
- package/dist/assets/.github/agents/prospero.agent.md +43 -43
- package/dist/assets/.github/prompts/spell-close-session.prompt.md +17 -5
- package/dist/assets/.github/prompts/spell-commit-work.prompt.md +24 -6
- package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +12 -3
- package/dist/assets/.github/prompts/spell-enchant.prompt.md +385 -385
- package/dist/assets/.github/prompts/spell-feedback.prompt.md +113 -113
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +202 -201
- package/dist/assets/.github/prompts/spell-implement.prompt.md +101 -101
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +20 -5
- package/dist/assets/.github/prompts/spell-scope.prompt.md +263 -263
- package/dist/assets/agents/architecture-lead.yaml +61 -61
- package/dist/assets/agents/collaborator.yaml +59 -59
- package/dist/assets/agents/devops.yaml +60 -60
- package/dist/assets/agents/frontend-dev.yaml +60 -60
- package/dist/assets/agents/fullstack-dev.yaml +59 -59
- package/dist/assets/agents/marketing-strategist.yaml +60 -60
- package/dist/assets/agents/mobile-dev.yaml +59 -59
- package/dist/assets/agents/operations-comms.yaml +58 -58
- package/dist/assets/agents/orchestrator.yaml +60 -60
- package/dist/assets/agents/qa-lead.yaml +60 -60
- package/dist/assets/agents/research-analyst.yaml +59 -59
- package/dist/assets/agents/security-ops.yaml +61 -61
- package/dist/index.js +346 -9
- package/dist/index.js.map +1 -1
- package/package.json +72 -72
- package/dist/assets/.claude/commands/spell-eas-ios-deploy.md +0 -9
- package/dist/assets/.github/prompts/spell-eas-ios-deploy.prompt.md +0 -183
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Testing Standards
|
|
3
|
-
audience: both
|
|
4
|
-
last_updated: YYYY-MM-DD
|
|
5
|
-
status: active
|
|
6
|
-
tags: [testing, qa, coverage, standards, lince]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Testing Standards
|
|
10
|
-
|
|
11
|
-
Framework selection, coverage thresholds, and test evidence requirements across all your projects.
|
|
12
|
-
|
|
13
|
-
## Executive Summary
|
|
14
|
-
|
|
15
|
-
- Every tech stack has a designated test framework — no ambiguity.
|
|
16
|
-
- New code requires 80% unit test coverage; critical paths require 95%.
|
|
17
|
-
- Lince (QA Lead) must sign off on test evidence before any ticket moves to "Resolved."
|
|
18
|
-
- Test evidence is required in every PR: results, coverage report, known limitations.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Frameworks Per Stack
|
|
23
|
-
|
|
24
|
-
| Stack | Framework | Assertion Library | Runner | Who Writes | Who Validates |
|
|
25
|
-
|-------|-----------|------------------|--------|-----------|---------------|
|
|
26
|
-
| .NET 10 (backend) | xUnit | FluentAssertions | `dotnet test` | Lafayette | Lince |
|
|
27
|
-
| Arduino/C++ (firmware) | PlatformIO Unity | Unity assertions | `pio test` | Lafayette + a partner | Lince |
|
|
28
|
-
| Flutter (mobile) | flutter_test + integration_test | expect matchers | `flutter test` | Mercurio | Lince |
|
|
29
|
-
| Node.js (agent tools, bots) | Vitest | Vitest matchers (chai-compatible) | `npx vitest run` | Lafayette | Lince |
|
|
30
|
-
| Terraform (IaC) | terraform validate + Checkov | Policy-as-code rules | `checkov -d .` | Prospero | Merlin |
|
|
31
|
-
| Markdown docs (Arcane) | markdownlint + markdown-link-check | Lint rules | `markdownlint .` | Any agent | Prospero |
|
|
32
|
-
|
|
33
|
-
### Why These Frameworks
|
|
34
|
-
|
|
35
|
-
- **xUnit** — .NET ecosystem default; best LLM training coverage; clean fixture model.
|
|
36
|
-
- **FluentAssertions** — human-readable assertions; better failure messages than Assert.
|
|
37
|
-
- **PlatformIO Unity** — the dominant embedded C/C++ test framework; runs on host (no hardware needed for unit tests).
|
|
38
|
-
- **flutter_test** — Flutter's built-in; widget testing + integration_test for full-app scenarios.
|
|
39
|
-
- **Vitest** — modern, fast, ESM-native; Jest-compatible API but better performance.
|
|
40
|
-
- **Checkov** — policy-as-code scanner for Terraform; catches security misconfigurations before apply.
|
|
41
|
-
- **markdownlint** — catches formatting issues, broken links, inconsistent heading levels.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Coverage Thresholds
|
|
46
|
-
|
|
47
|
-
| Category | Minimum Coverage | Examples |
|
|
48
|
-
|----------|-----------------|----------|
|
|
49
|
-
| **Standard code** | 80% | Business logic, data access, UI components, API handlers |
|
|
50
|
-
| **Critical paths** | 95% | Authentication, payment processing, IoT firmware commands, calibration protocols, encryption/signing |
|
|
51
|
-
|
|
52
|
-
### What Counts as "Critical"
|
|
53
|
-
|
|
54
|
-
- **Authentication and authorization** — login, token validation, permission checks
|
|
55
|
-
- **Payment processing** — any code that touches money or billing
|
|
56
|
-
- **IoT firmware commands** — device provisioning, calibration, OTA updates
|
|
57
|
-
- **Encryption and signing** — key generation, message signing, certificate validation
|
|
58
|
-
- **Data integrity** — database migrations, schema changes, backup/restore
|
|
59
|
-
|
|
60
|
-
### What Doesn't Count Toward Coverage
|
|
61
|
-
|
|
62
|
-
- Auto-generated code (EF migrations, gRPC stubs, Swagger output)
|
|
63
|
-
- Framework boilerplate (startup.cs routing, middleware registration)
|
|
64
|
-
- Configuration-only files (appsettings.json, terraform.tfvars)
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Test Evidence Requirements
|
|
69
|
-
|
|
70
|
-
Every PR must include:
|
|
71
|
-
|
|
72
|
-
1. **Test results** — pass/fail output from the test runner (screenshot or CI log link)
|
|
73
|
-
2. **Coverage report** — line/branch coverage percentage (from `dotnet test --collect`, `flutter test --coverage`, etc.)
|
|
74
|
-
3. **Known limitations** — document any untested edge cases or deferred scenarios
|
|
75
|
-
4. **Agent attribution** — if an agent wrote the tests, include standard commit trailers
|
|
76
|
-
|
|
77
|
-
### PR Template (Test Section)
|
|
78
|
-
|
|
79
|
-
```markdown
|
|
80
|
-
## Test Evidence
|
|
81
|
-
|
|
82
|
-
**Test runner output:**
|
|
83
|
-
[paste or link to CI output]
|
|
84
|
-
|
|
85
|
-
**Coverage:**
|
|
86
|
-
- Overall: XX%
|
|
87
|
-
- Critical paths: XX%
|
|
88
|
-
|
|
89
|
-
**Known limitations:**
|
|
90
|
-
- [any untested scenarios]
|
|
91
|
-
|
|
92
|
-
**Agent trailers:**
|
|
93
|
-
- Agent: [agent name]
|
|
94
|
-
- Model: [model]
|
|
95
|
-
- Provider: [provider]
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Test Types
|
|
101
|
-
|
|
102
|
-
### Unit Tests (Required)
|
|
103
|
-
|
|
104
|
-
- Test individual functions/methods in isolation
|
|
105
|
-
- Mock external dependencies (DB, API, hardware)
|
|
106
|
-
- Fast execution (< 1 second per test)
|
|
107
|
-
- Run on every commit and in CI
|
|
108
|
-
|
|
109
|
-
### Integration Tests (Recommended)
|
|
110
|
-
|
|
111
|
-
- Test component interactions (API → DB, mobile → backend)
|
|
112
|
-
- Use real dependencies where practical (in-memory DB, test containers)
|
|
113
|
-
- Run in CI on PR creation and merge
|
|
114
|
-
|
|
115
|
-
### End-to-End Tests (For UI Stories)
|
|
116
|
-
|
|
117
|
-
- Test complete user workflows
|
|
118
|
-
- Use browser automation (Playwright for web, Flutter integration_test for mobile)
|
|
119
|
-
- Run in CI on merge to main (not on every commit — too slow)
|
|
120
|
-
|
|
121
|
-
### Firmware Tests ({BUSINESS_NAME}-Specific)
|
|
122
|
-
|
|
123
|
-
- Host-based unit tests via PlatformIO Unity (no hardware required)
|
|
124
|
-
- Hardware-in-the-loop tests for calibration validation (requires physical device)
|
|
125
|
-
- BLE protocol tests via mock transport
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Quality Gate in Ticket Lifecycle
|
|
130
|
-
|
|
131
|
-
Adapt the ticket lifecycle policy to your tracker:
|
|
132
|
-
|
|
133
|
-
The **Code Review → QA** transition now requires:
|
|
134
|
-
|
|
135
|
-
1. All unit tests pass (CI green)
|
|
136
|
-
2. Coverage meets thresholds (80% standard / 95% critical)
|
|
137
|
-
3. No HIGH-severity review findings unresolved
|
|
138
|
-
4. Lince signs off with test evidence linked to the work item
|
|
139
|
-
|
|
140
|
-
The **QA → Resolved** transition requires:
|
|
141
|
-
|
|
142
|
-
1. Integration tests pass (if applicable)
|
|
143
|
-
2. Manual verification for UI stories (screenshot or recording)
|
|
144
|
-
3. Known limitations documented in work item
|
|
145
|
-
4. Lince marks ticket as validated
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Agent Responsibilities
|
|
150
|
-
|
|
151
|
-
| Agent | Testing Role |
|
|
152
|
-
|-------|-------------|
|
|
153
|
-
| **Lafayette** | Writes unit + integration tests for .NET backend, Node.js tools, firmware |
|
|
154
|
-
| **Mercurio** | Writes unit + widget + integration tests for mobile (Flutter) |
|
|
155
|
-
| **Adelaide** | Writes unit + E2E tests for frontend (Blazor/React) |
|
|
156
|
-
| **Lince** | Validates all test evidence; signs off on QA gates; runs adversarial test review |
|
|
157
|
-
| **Prospero** | Maintains CI pipelines that run tests; configures Checkov for Terraform; maintains markdownlint config |
|
|
158
|
-
| **Merlin** | Reviews test architecture decisions; validates Terraform policy compliance |
|
|
1
|
+
---
|
|
2
|
+
title: Testing Standards
|
|
3
|
+
audience: both
|
|
4
|
+
last_updated: YYYY-MM-DD
|
|
5
|
+
status: active
|
|
6
|
+
tags: [testing, qa, coverage, standards, lince]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Testing Standards
|
|
10
|
+
|
|
11
|
+
Framework selection, coverage thresholds, and test evidence requirements across all your projects.
|
|
12
|
+
|
|
13
|
+
## Executive Summary
|
|
14
|
+
|
|
15
|
+
- Every tech stack has a designated test framework — no ambiguity.
|
|
16
|
+
- New code requires 80% unit test coverage; critical paths require 95%.
|
|
17
|
+
- Lince (QA Lead) must sign off on test evidence before any ticket moves to "Resolved."
|
|
18
|
+
- Test evidence is required in every PR: results, coverage report, known limitations.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Frameworks Per Stack
|
|
23
|
+
|
|
24
|
+
| Stack | Framework | Assertion Library | Runner | Who Writes | Who Validates |
|
|
25
|
+
|-------|-----------|------------------|--------|-----------|---------------|
|
|
26
|
+
| .NET 10 (backend) | xUnit | FluentAssertions | `dotnet test` | Lafayette | Lince |
|
|
27
|
+
| Arduino/C++ (firmware) | PlatformIO Unity | Unity assertions | `pio test` | Lafayette + a partner | Lince |
|
|
28
|
+
| Flutter (mobile) | flutter_test + integration_test | expect matchers | `flutter test` | Mercurio | Lince |
|
|
29
|
+
| Node.js (agent tools, bots) | Vitest | Vitest matchers (chai-compatible) | `npx vitest run` | Lafayette | Lince |
|
|
30
|
+
| Terraform (IaC) | terraform validate + Checkov | Policy-as-code rules | `checkov -d .` | Prospero | Merlin |
|
|
31
|
+
| Markdown docs (Arcane) | markdownlint + markdown-link-check | Lint rules | `markdownlint .` | Any agent | Prospero |
|
|
32
|
+
|
|
33
|
+
### Why These Frameworks
|
|
34
|
+
|
|
35
|
+
- **xUnit** — .NET ecosystem default; best LLM training coverage; clean fixture model.
|
|
36
|
+
- **FluentAssertions** — human-readable assertions; better failure messages than Assert.
|
|
37
|
+
- **PlatformIO Unity** — the dominant embedded C/C++ test framework; runs on host (no hardware needed for unit tests).
|
|
38
|
+
- **flutter_test** — Flutter's built-in; widget testing + integration_test for full-app scenarios.
|
|
39
|
+
- **Vitest** — modern, fast, ESM-native; Jest-compatible API but better performance.
|
|
40
|
+
- **Checkov** — policy-as-code scanner for Terraform; catches security misconfigurations before apply.
|
|
41
|
+
- **markdownlint** — catches formatting issues, broken links, inconsistent heading levels.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Coverage Thresholds
|
|
46
|
+
|
|
47
|
+
| Category | Minimum Coverage | Examples |
|
|
48
|
+
|----------|-----------------|----------|
|
|
49
|
+
| **Standard code** | 80% | Business logic, data access, UI components, API handlers |
|
|
50
|
+
| **Critical paths** | 95% | Authentication, payment processing, IoT firmware commands, calibration protocols, encryption/signing |
|
|
51
|
+
|
|
52
|
+
### What Counts as "Critical"
|
|
53
|
+
|
|
54
|
+
- **Authentication and authorization** — login, token validation, permission checks
|
|
55
|
+
- **Payment processing** — any code that touches money or billing
|
|
56
|
+
- **IoT firmware commands** — device provisioning, calibration, OTA updates
|
|
57
|
+
- **Encryption and signing** — key generation, message signing, certificate validation
|
|
58
|
+
- **Data integrity** — database migrations, schema changes, backup/restore
|
|
59
|
+
|
|
60
|
+
### What Doesn't Count Toward Coverage
|
|
61
|
+
|
|
62
|
+
- Auto-generated code (EF migrations, gRPC stubs, Swagger output)
|
|
63
|
+
- Framework boilerplate (startup.cs routing, middleware registration)
|
|
64
|
+
- Configuration-only files (appsettings.json, terraform.tfvars)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Test Evidence Requirements
|
|
69
|
+
|
|
70
|
+
Every PR must include:
|
|
71
|
+
|
|
72
|
+
1. **Test results** — pass/fail output from the test runner (screenshot or CI log link)
|
|
73
|
+
2. **Coverage report** — line/branch coverage percentage (from `dotnet test --collect`, `flutter test --coverage`, etc.)
|
|
74
|
+
3. **Known limitations** — document any untested edge cases or deferred scenarios
|
|
75
|
+
4. **Agent attribution** — if an agent wrote the tests, include standard commit trailers
|
|
76
|
+
|
|
77
|
+
### PR Template (Test Section)
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Test Evidence
|
|
81
|
+
|
|
82
|
+
**Test runner output:**
|
|
83
|
+
[paste or link to CI output]
|
|
84
|
+
|
|
85
|
+
**Coverage:**
|
|
86
|
+
- Overall: XX%
|
|
87
|
+
- Critical paths: XX%
|
|
88
|
+
|
|
89
|
+
**Known limitations:**
|
|
90
|
+
- [any untested scenarios]
|
|
91
|
+
|
|
92
|
+
**Agent trailers:**
|
|
93
|
+
- Agent: [agent name]
|
|
94
|
+
- Model: [model]
|
|
95
|
+
- Provider: [provider]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Test Types
|
|
101
|
+
|
|
102
|
+
### Unit Tests (Required)
|
|
103
|
+
|
|
104
|
+
- Test individual functions/methods in isolation
|
|
105
|
+
- Mock external dependencies (DB, API, hardware)
|
|
106
|
+
- Fast execution (< 1 second per test)
|
|
107
|
+
- Run on every commit and in CI
|
|
108
|
+
|
|
109
|
+
### Integration Tests (Recommended)
|
|
110
|
+
|
|
111
|
+
- Test component interactions (API → DB, mobile → backend)
|
|
112
|
+
- Use real dependencies where practical (in-memory DB, test containers)
|
|
113
|
+
- Run in CI on PR creation and merge
|
|
114
|
+
|
|
115
|
+
### End-to-End Tests (For UI Stories)
|
|
116
|
+
|
|
117
|
+
- Test complete user workflows
|
|
118
|
+
- Use browser automation (Playwright for web, Flutter integration_test for mobile)
|
|
119
|
+
- Run in CI on merge to main (not on every commit — too slow)
|
|
120
|
+
|
|
121
|
+
### Firmware Tests ({BUSINESS_NAME}-Specific)
|
|
122
|
+
|
|
123
|
+
- Host-based unit tests via PlatformIO Unity (no hardware required)
|
|
124
|
+
- Hardware-in-the-loop tests for calibration validation (requires physical device)
|
|
125
|
+
- BLE protocol tests via mock transport
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Quality Gate in Ticket Lifecycle
|
|
130
|
+
|
|
131
|
+
Adapt the ticket lifecycle policy to your tracker:
|
|
132
|
+
|
|
133
|
+
The **Code Review → QA** transition now requires:
|
|
134
|
+
|
|
135
|
+
1. All unit tests pass (CI green)
|
|
136
|
+
2. Coverage meets thresholds (80% standard / 95% critical)
|
|
137
|
+
3. No HIGH-severity review findings unresolved
|
|
138
|
+
4. Lince signs off with test evidence linked to the work item
|
|
139
|
+
|
|
140
|
+
The **QA → Resolved** transition requires:
|
|
141
|
+
|
|
142
|
+
1. Integration tests pass (if applicable)
|
|
143
|
+
2. Manual verification for UI stories (screenshot or recording)
|
|
144
|
+
3. Known limitations documented in work item
|
|
145
|
+
4. Lince marks ticket as validated
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Agent Responsibilities
|
|
150
|
+
|
|
151
|
+
| Agent | Testing Role |
|
|
152
|
+
|-------|-------------|
|
|
153
|
+
| **Lafayette** | Writes unit + integration tests for .NET backend, Node.js tools, firmware |
|
|
154
|
+
| **Mercurio** | Writes unit + widget + integration tests for mobile (Flutter) |
|
|
155
|
+
| **Adelaide** | Writes unit + E2E tests for frontend (Blazor/React) |
|
|
156
|
+
| **Lince** | Validates all test evidence; signs off on QA gates; runs adversarial test review |
|
|
157
|
+
| **Prospero** | Maintains CI pipelines that run tests; configures Checkov for Terraform; maintains markdownlint config |
|
|
158
|
+
| **Merlin** | Reviews test architecture decisions; validates Terraform policy compliance |
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Universal Agent Rules — Single Source of Truth
|
|
3
|
-
audience: ai
|
|
4
|
-
status: active
|
|
5
|
-
tags: [rules, governance, ai-agents, multi-client]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Universal Agent Rules
|
|
9
|
-
|
|
10
|
-
These rules apply to **every AI agent and tool** working in this repository, regardless of client (GitHub Copilot, Claude Code, Codex, your agent runtime, or any future tool). This file is the canonical source; client-specific instruction files reference this document and add client-specific behavior on top.
|
|
11
|
-
|
|
12
|
-
See also: [[README]], [[DECISIONS]], [[governance/git-conventions|Git Conventions]], [[agents/agent-policies|Agent Policies]].
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Non-Negotiable Safety Rules
|
|
17
|
-
|
|
18
|
-
1. **Never access an encrypted or cross-OS volume you are not authorized to touch.** Do not suggest, execute, or recommend any action that would mount, read, or probe a drive outside the agent's authorized environment. This rule stands as defense-in-depth regardless of encryption status.
|
|
19
|
-
|
|
20
|
-
2. **No root commands without justification.** Do not generate or suggest commands that run as root unless explicitly scoped and justified. The agent runtime should run as a dedicated non-root user by design. See [[security/hardening-checklist|Hardening Checklist]].
|
|
21
|
-
|
|
22
|
-
3. **No secrets on the command line.** Never pass API keys, tokens, or secrets on the command line, in chat, or in config files. Use SecretRef (env vars) and `read -s` for interactive input.
|
|
23
|
-
|
|
24
|
-
4. **This is a production system.** No "fix it later" shortcuts. No experimental changes without rollback plans.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Documentation Rules
|
|
29
|
-
|
|
30
|
-
5. **Update `last_updated` frontmatter** whenever you edit a document. Every document must have YAML frontmatter with `audience`, `status`, `last_updated`, and `tags`.
|
|
31
|
-
|
|
32
|
-
6. **Log significant decisions in [[DECISIONS]].** Use the next sequential ADR number. Format: Date, Status, Context, Decision, Reasoning, Rejected alternatives.
|
|
33
|
-
|
|
34
|
-
7. **Use wiki-links for cross-references** (e.g., `[[DECISIONS#ADR-NNN|Short Title]]`, `[[journal/YYYY-MM-DD-topic-slug|Session Label]]`). This enables knowledge graph visualization.
|
|
35
|
-
|
|
36
|
-
8. **Use Mermaid for diagrams** (` ```mermaid ` blocks) for all flow charts, architecture diagrams, and sequence diagrams. Directory trees stay as plain code blocks.
|
|
37
|
-
|
|
38
|
-
9. **Journal files use date-prefix naming:** `journal/YYYY-MM-DD-topic-slug.md` for chronological sorting.
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Git Rules
|
|
43
|
-
|
|
44
|
-
10. **Never auto-commit during interactive sessions.** Stage changes and present the proposed commit message for human approval before executing `git commit`. This applies to Copilot, Claude Code, Codex, and any other interactive AI tool. The human decides when to commit. Exception: autonomous agents at Magus+ power level may self-commit within approved scope.
|
|
45
|
-
|
|
46
|
-
11. **Use Conventional Commits format** for all commit messages: `type(scope): description`. See [[governance/git-conventions|Git Conventions]] for types, scopes, and examples.
|
|
47
|
-
|
|
48
|
-
12. **Agent attribution trailers** are required on agent-authored commits (`Agent`, `Model`, `Provider`). See [[governance/git-conventions#agent-attribution-model|Attribution Model]].
|
|
49
|
-
|
|
50
|
-
13. **For runtime config changes** (anything touching the agent runtime's config files or service restarts): do NOT commit supporting docs until the user has confirmed the change is working. Stage and present — but wait for explicit approval after testing.
|
|
51
|
-
|
|
52
|
-
14. **Never commit directly to main.** All work — human or agent — happens on topic branches. Humans use `type/short-description`; agents use `{agent-slug}/type/short-description`. Main receives changes only through PR completion, not local direct merges. See [[governance/git-conventions#branch-discipline|Branch Discipline]].
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Recommendation Guardrails (ADR-034)
|
|
57
|
-
|
|
58
|
-
15. **Flag actionable recommendations.** Any recommendation that could lead to a purchase, subscription, account creation, or irreversible action must: (a) be flagged explicitly, (b) use verified current information — never assume or fabricate, (c) present free/no-cost alternatives when they exist, (d) state confidence level if based on general knowledge. For >$50 or contracts, require explicit confirmation. See [[agents/agent-policies#actionable-recommendation-policy-adr-034|Full Policy]].
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Screenshot Curation
|
|
63
|
-
|
|
64
|
-
15. **Curate screenshots — not every screenshot needs saving.** Use these heuristics:
|
|
65
|
-
- **Save** when it shows a completed setup, config state, UI result, or evidence of a problem/fix.
|
|
66
|
-
- **Save** when the user explicitly says "save this" or "add this to docs."
|
|
67
|
-
- **Save key decision points and final states** in multi-step flows; skip intermediate steps.
|
|
68
|
-
- **Don't save** external reference material, transient troubleshooting, or items marked "just for reference."
|
|
69
|
-
- **When ambiguous, save it** — easier to delete than to re-paste.
|
|
70
|
-
- Saved screenshots go to `assets/screenshots/YYYY-MM-DD/` with descriptive lowercase-with-dashes filenames.
|
|
71
|
-
- Never save screenshots containing secrets, API keys, tokens, or PII.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Naming Conventions
|
|
76
|
-
|
|
77
|
-
16. **Three naming tiers — never mix them:**
|
|
78
|
-
|
|
79
|
-
| Tier | What | Style | Examples |
|
|
80
|
-
|------|------|-------|---------|
|
|
81
|
-
| Machines | Physical hardware | Iconic character names | Atlas, Voyager |
|
|
82
|
-
| AI Agents | Autonomous agents | Persona name + role title | Merlin — CTO, Kellar — Product Ops |
|
|
83
|
-
| Systems/Services | DBs, APIs, tools | Functional `[slug]-[function]` | `inventory-api`, `orders-worker` |
|
|
84
|
-
|
|
85
|
-
17. **Projects and repos follow a consistent naming convention.** Pick one (TitleCase or kebab-case) and apply it uniformly across your org.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Operational Rules
|
|
90
|
-
|
|
91
|
-
18. **TODO.md is a scratchpad.** Resolved items move to the relevant doc, then get deleted from TODO.md.
|
|
92
|
-
|
|
93
|
-
19. **After any onboarding or config wizard**, re-validate authentication and network-exposure settings — wizards can silently downgrade security settings.
|
|
94
|
-
|
|
95
|
-
20. **For repo path requests**, perform read-only discovery before claiming "no access." Use [[agents/agent-approved-paths|Agent Approved Paths Registry]].
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Client-Specific Instruction Locations
|
|
100
|
-
|
|
101
|
-
| Client | Instruction File | Notes |
|
|
102
|
-
|--------|-----------------|-------|
|
|
103
|
-
| GitHub Copilot | `.github/copilot-instructions.md` | Auto-loaded by Copilot in workspace |
|
|
104
|
-
| Claude Code (CLI) | `CLAUDE.md` | Auto-loaded by Claude Code in repo root |
|
|
105
|
-
| Codex | `AGENTS.md` | Auto-loaded by Codex in repo root |
|
|
106
|
-
| Your agent runtime | [[agents/agent-policies]] | Loaded via agent config |
|
|
107
|
-
| Ad-hoc chat clients | [[ai-context/portable-bootstrap]] | Copy-paste into conversation |
|
|
108
|
-
| Any new tool | This file | Read this, then follow links above |
|
|
1
|
+
---
|
|
2
|
+
title: Universal Agent Rules — Single Source of Truth
|
|
3
|
+
audience: ai
|
|
4
|
+
status: active
|
|
5
|
+
tags: [rules, governance, ai-agents, multi-client]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Universal Agent Rules
|
|
9
|
+
|
|
10
|
+
These rules apply to **every AI agent and tool** working in this repository, regardless of client (GitHub Copilot, Claude Code, Codex, your agent runtime, or any future tool). This file is the canonical source; client-specific instruction files reference this document and add client-specific behavior on top.
|
|
11
|
+
|
|
12
|
+
See also: [[README]], [[DECISIONS]], [[governance/git-conventions|Git Conventions]], [[agents/agent-policies|Agent Policies]].
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Non-Negotiable Safety Rules
|
|
17
|
+
|
|
18
|
+
1. **Never access an encrypted or cross-OS volume you are not authorized to touch.** Do not suggest, execute, or recommend any action that would mount, read, or probe a drive outside the agent's authorized environment. This rule stands as defense-in-depth regardless of encryption status.
|
|
19
|
+
|
|
20
|
+
2. **No root commands without justification.** Do not generate or suggest commands that run as root unless explicitly scoped and justified. The agent runtime should run as a dedicated non-root user by design. See [[security/hardening-checklist|Hardening Checklist]].
|
|
21
|
+
|
|
22
|
+
3. **No secrets on the command line.** Never pass API keys, tokens, or secrets on the command line, in chat, or in config files. Use SecretRef (env vars) and `read -s` for interactive input.
|
|
23
|
+
|
|
24
|
+
4. **This is a production system.** No "fix it later" shortcuts. No experimental changes without rollback plans.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Documentation Rules
|
|
29
|
+
|
|
30
|
+
5. **Update `last_updated` frontmatter** whenever you edit a document. Every document must have YAML frontmatter with `audience`, `status`, `last_updated`, and `tags`.
|
|
31
|
+
|
|
32
|
+
6. **Log significant decisions in [[DECISIONS]].** Use the next sequential ADR number. Format: Date, Status, Context, Decision, Reasoning, Rejected alternatives.
|
|
33
|
+
|
|
34
|
+
7. **Use wiki-links for cross-references** (e.g., `[[DECISIONS#ADR-NNN|Short Title]]`, `[[journal/YYYY-MM-DD-topic-slug|Session Label]]`). This enables knowledge graph visualization.
|
|
35
|
+
|
|
36
|
+
8. **Use Mermaid for diagrams** (` ```mermaid ` blocks) for all flow charts, architecture diagrams, and sequence diagrams. Directory trees stay as plain code blocks.
|
|
37
|
+
|
|
38
|
+
9. **Journal files use date-prefix naming:** `journal/YYYY-MM-DD-topic-slug.md` for chronological sorting.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Git Rules
|
|
43
|
+
|
|
44
|
+
10. **Never auto-commit during interactive sessions.** Stage changes and present the proposed commit message for human approval before executing `git commit`. This applies to Copilot, Claude Code, Codex, and any other interactive AI tool. The human decides when to commit. Exception: autonomous agents at Magus+ power level may self-commit within approved scope.
|
|
45
|
+
|
|
46
|
+
11. **Use Conventional Commits format** for all commit messages: `type(scope): description`. See [[governance/git-conventions|Git Conventions]] for types, scopes, and examples.
|
|
47
|
+
|
|
48
|
+
12. **Agent attribution trailers** are required on agent-authored commits (`Agent`, `Model`, `Provider`). See [[governance/git-conventions#agent-attribution-model|Attribution Model]].
|
|
49
|
+
|
|
50
|
+
13. **For runtime config changes** (anything touching the agent runtime's config files or service restarts): do NOT commit supporting docs until the user has confirmed the change is working. Stage and present — but wait for explicit approval after testing.
|
|
51
|
+
|
|
52
|
+
14. **Never commit directly to main.** All work — human or agent — happens on topic branches. Humans use `type/short-description`; agents use `{agent-slug}/type/short-description`. Main receives changes only through PR completion, not local direct merges. See [[governance/git-conventions#branch-discipline|Branch Discipline]].
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Recommendation Guardrails (ADR-034)
|
|
57
|
+
|
|
58
|
+
15. **Flag actionable recommendations.** Any recommendation that could lead to a purchase, subscription, account creation, or irreversible action must: (a) be flagged explicitly, (b) use verified current information — never assume or fabricate, (c) present free/no-cost alternatives when they exist, (d) state confidence level if based on general knowledge. For >$50 or contracts, require explicit confirmation. See [[agents/agent-policies#actionable-recommendation-policy-adr-034|Full Policy]].
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Screenshot Curation
|
|
63
|
+
|
|
64
|
+
15. **Curate screenshots — not every screenshot needs saving.** Use these heuristics:
|
|
65
|
+
- **Save** when it shows a completed setup, config state, UI result, or evidence of a problem/fix.
|
|
66
|
+
- **Save** when the user explicitly says "save this" or "add this to docs."
|
|
67
|
+
- **Save key decision points and final states** in multi-step flows; skip intermediate steps.
|
|
68
|
+
- **Don't save** external reference material, transient troubleshooting, or items marked "just for reference."
|
|
69
|
+
- **When ambiguous, save it** — easier to delete than to re-paste.
|
|
70
|
+
- Saved screenshots go to `assets/screenshots/YYYY-MM-DD/` with descriptive lowercase-with-dashes filenames.
|
|
71
|
+
- Never save screenshots containing secrets, API keys, tokens, or PII.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Naming Conventions
|
|
76
|
+
|
|
77
|
+
16. **Three naming tiers — never mix them:**
|
|
78
|
+
|
|
79
|
+
| Tier | What | Style | Examples |
|
|
80
|
+
|------|------|-------|---------|
|
|
81
|
+
| Machines | Physical hardware | Iconic character names | Atlas, Voyager |
|
|
82
|
+
| AI Agents | Autonomous agents | Persona name + role title | Merlin — CTO, Kellar — Product Ops |
|
|
83
|
+
| Systems/Services | DBs, APIs, tools | Functional `[slug]-[function]` | `inventory-api`, `orders-worker` |
|
|
84
|
+
|
|
85
|
+
17. **Projects and repos follow a consistent naming convention.** Pick one (TitleCase or kebab-case) and apply it uniformly across your org.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Operational Rules
|
|
90
|
+
|
|
91
|
+
18. **TODO.md is a scratchpad.** Resolved items move to the relevant doc, then get deleted from TODO.md.
|
|
92
|
+
|
|
93
|
+
19. **After any onboarding or config wizard**, re-validate authentication and network-exposure settings — wizards can silently downgrade security settings.
|
|
94
|
+
|
|
95
|
+
20. **For repo path requests**, perform read-only discovery before claiming "no access." Use [[agents/agent-approved-paths|Agent Approved Paths Registry]].
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Client-Specific Instruction Locations
|
|
100
|
+
|
|
101
|
+
| Client | Instruction File | Notes |
|
|
102
|
+
|--------|-----------------|-------|
|
|
103
|
+
| GitHub Copilot | `.github/copilot-instructions.md` | Auto-loaded by Copilot in workspace |
|
|
104
|
+
| Claude Code (CLI) | `CLAUDE.md` | Auto-loaded by Claude Code in repo root |
|
|
105
|
+
| Codex | `AGENTS.md` | Auto-loaded by Codex in repo root |
|
|
106
|
+
| Your agent runtime | [[agents/agent-policies]] | Loaded via agent config |
|
|
107
|
+
| Ad-hoc chat clients | [[ai-context/portable-bootstrap]] | Copy-paste into conversation |
|
|
108
|
+
| Any new tool | This file | Read this, then follow links above |
|