@event4u/agent-config 2.25.0 → 2.26.0
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/.agent-src/commands/bug-fix.md +1 -0
- package/.agent-src/commands/feature/roadmap.md +2 -2
- package/.agent-src/commands/fix/seeder.md +3 -2
- package/.agent-src/commands/memory/add.md +3 -3
- package/.agent-src/commands/module/create.md +1 -0
- package/.agent-src/commands/module/explore.md +10 -6
- package/.agent-src/commands/onboard.md +9 -1
- package/.agent-src/commands/optimize/augmentignore.md +52 -20
- package/.agent-src/commands/optimize/rtk.md +56 -30
- package/.agent-src/commands/package-test.md +86 -10
- package/.agent-src/commands/quality-fix.md +49 -27
- package/.agent-src/commands/update-form-request-messages.md +2 -1
- package/.agent-src/contexts/augment-infrastructure.md +4 -7
- package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -1
- package/.agent-src/contexts/contracts/research-schema.md +1 -1
- package/.agent-src/contexts/execution/interrupt-examples.md +34 -0
- package/.agent-src/contexts/skills-and-commands.md +2 -2
- package/.agent-src/rules/architecture.md +24 -10
- package/.agent-src/rules/artifact-drafting-protocol.md +6 -0
- package/.agent-src/rules/augment-edit-discipline.md +28 -0
- package/.agent-src/rules/augment-source-of-truth.md +2 -2
- package/.agent-src/rules/autonomous-execution.md +31 -0
- package/.agent-src/rules/context-hygiene.md +1 -1
- package/.agent-src/rules/domain-adoption-policy.md +4 -5
- package/.agent-src/rules/domain-safety-disclaimer.md +114 -0
- package/.agent-src/rules/domain-safety-pii.md +142 -0
- package/.agent-src/rules/domain-safety-retention.md +86 -0
- package/.agent-src/rules/downstream-changes.md +4 -4
- package/.agent-src/rules/framework-neutrality-in-generic-skills.md +130 -0
- package/.agent-src/rules/git-history-discipline.md +99 -0
- package/.agent-src/rules/minimal-safe-diff.md +6 -0
- package/.agent-src/rules/no-roadmap-references.md +4 -2
- package/.agent-src/rules/user-interrupt-priority.md +46 -0
- package/.agent-src/rules/verify-before-complete.md +11 -2
- package/.agent-src/skills/adversarial-review/SKILL.md +1 -1
- package/.agent-src/skills/ai-council/SKILL.md +1 -0
- package/.agent-src/skills/api-endpoint/SKILL.md +58 -154
- package/.agent-src/skills/api-testing/SKILL.md +11 -0
- package/.agent-src/skills/code-refactoring/SKILL.md +36 -30
- package/.agent-src/skills/code-review/SKILL.md +41 -36
- package/.agent-src/skills/context-authoring/SKILL.md +1 -1
- package/.agent-src/skills/dashboard-design/SKILL.md +1 -2
- package/.agent-src/skills/database/SKILL.md +8 -3
- package/.agent-src/skills/dependency-upgrade/SKILL.md +65 -19
- package/.agent-src/skills/developer-like-execution/SKILL.md +25 -14
- package/.agent-src/skills/eloquent/SKILL.md +1 -1
- package/.agent-src/skills/feature-planning/SKILL.md +1 -1
- package/.agent-src/skills/file-editor/SKILL.md +45 -19
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
- package/.agent-src/skills/git-workflow/SKILL.md +4 -4
- package/.agent-src/skills/laravel-api-endpoint/SKILL.md +187 -0
- package/.agent-src/skills/{dto-creator → laravel-dto}/SKILL.md +5 -4
- package/.agent-src/skills/{migration-creator → laravel-migration}/SKILL.md +11 -10
- package/.agent-src/skills/laravel-reverb/SKILL.md +3 -3
- package/.agent-src/skills/{websocket → laravel-websocket}/SKILL.md +4 -3
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -1
- package/.agent-src/skills/merge-conflicts/SKILL.md +49 -17
- package/.agent-src/skills/migration-architect/SKILL.md +6 -6
- package/.agent-src/skills/module-management/SKILL.md +1 -0
- package/.agent-src/skills/multi-tenancy/SKILL.md +15 -8
- package/.agent-src/skills/pest-testing/SKILL.md +18 -0
- package/.agent-src/skills/php-debugging/SKILL.md +28 -0
- package/.agent-src/skills/php-service/SKILL.md +3 -3
- package/.agent-src/skills/playwright-testing/SKILL.md +16 -1
- package/.agent-src/skills/project-analyzer/SKILL.md +68 -42
- package/.agent-src/skills/readme-writing-package/SKILL.md +94 -23
- package/.agent-src/skills/roadmap-management/SKILL.md +1 -1
- package/.agent-src/skills/rtk-output-filtering/SKILL.md +23 -8
- package/.agent-src/skills/rule-refactor/SKILL.md +145 -0
- package/.agent-src/skills/rule-writing/SKILL.md +34 -8
- package/.agent-src/skills/security/SKILL.md +38 -29
- package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
- package/.agent-src/skills/test-driven-development/SKILL.md +4 -4
- package/.agent-src/skills/test-performance/SKILL.md +6 -5
- package/.agent-src/skills/verify-completion-evidence/SKILL.md +24 -27
- package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/.agent-src/templates/copilot-instructions.md +2 -2
- package/.agent-src/templates/rule.md +2 -2
- package/.claude-plugin/marketplace.json +6 -4
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +74 -170
- package/README.md +2 -2
- package/docs/architecture.md +2 -2
- package/docs/archive/CHANGELOG-pre-2.25.0.md +191 -0
- package/docs/catalog.md +17 -12
- package/docs/contracts/file-ownership-matrix.json +473 -43
- package/docs/contracts/kernel-membership.md +17 -0
- package/docs/contracts/smoke-contracts.md +8 -8
- package/docs/getting-started.md +1 -1
- package/docs/guidelines/php/api-design.md +1 -1
- package/docs/guidelines/php/controllers.md +1 -1
- package/docs/guidelines/php/resources.md +1 -1
- package/docs/guidelines/php/validations.md +1 -1
- package/package.json +1 -1
- package/scripts/build_linear_digest.py +0 -1
- package/scripts/lint_framework_leakage.py +348 -0
- package/scripts/lint_framework_leakage_allowlist.json +476 -0
- package/scripts/measure_augment_budget.py +6 -0
- package/scripts/schemas/command.schema.json +5 -0
- package/scripts/schemas/skill.schema.json +5 -0
- package/scripts/skill_linter.py +60 -7
- package/scripts/smoke/kernel.sh +4 -4
- package/scripts/smoke/router.sh +2 -2
- package/.agent-src/rules/agent-docs.md +0 -20
- package/.agent-src/rules/augment-portability.md +0 -23
- package/.agent-src/rules/capture-learnings.md +0 -19
- package/.agent-src/rules/docs-sync.md +0 -20
- package/.agent-src/rules/domain-safety-disclaimer-consulting.md +0 -52
- package/.agent-src/rules/domain-safety-disclaimer-financial.md +0 -54
- package/.agent-src/rules/domain-safety-disclaimer-legal.md +0 -49
- package/.agent-src/rules/domain-safety-disclaimer-medical.md +0 -56
- package/.agent-src/rules/domain-safety-export-redact.md +0 -65
- package/.agent-src/rules/domain-safety-logging-pii-floor.md +0 -55
- package/.agent-src/rules/domain-safety-pii-finance.md +0 -57
- package/.agent-src/rules/domain-safety-pii-marketing.md +0 -60
- package/.agent-src/rules/domain-safety-pii-recruiting.md +0 -56
- package/.agent-src/rules/domain-safety-pii-support.md +0 -57
- package/.agent-src/rules/domain-safety-retention-finance.md +0 -48
- package/.agent-src/rules/domain-safety-retention-support.md +0 -55
- package/.agent-src/rules/e2e-testing.md +0 -19
- package/.agent-src/rules/no-unsolicited-rebase.md +0 -107
- package/.agent-src/rules/post-push-rewrite-discipline.md +0 -70
|
@@ -57,17 +57,14 @@ Define hard constraints: coding standards, Docker usage, language preferences, s
|
|
|
57
57
|
|---|---|
|
|
58
58
|
| `quality-workflow.md` | PHP (PHPStan → Rector → PHPStan) and JS/TS pipelines |
|
|
59
59
|
| `downstream-changes.md` | After every edit, find and update ALL callers, tests, imports |
|
|
60
|
-
| `
|
|
60
|
+
| `augment-edit-discipline.md` | Edits inside `.augment/` / `.agent-src.uncompressed/` stay project-agnostic AND sync counts + cross-references in the same edit |
|
|
61
61
|
| `context-hygiene.md` | 3-failure rule, state dumps |
|
|
62
62
|
| `architecture.md` | Architecture principles, file placement |
|
|
63
63
|
| `docker-commands.md` | All PHP commands run inside Docker containers |
|
|
64
64
|
| `commit-conventions.md` | Conventional Commits format |
|
|
65
65
|
| `dev-efficiency.md` | Running CLI commands with verbose output — git, tests, linters, docker, build tools |
|
|
66
|
-
| `e2e-testing.md` | Playwright E2E tests — locators, assertions, Page Objects, CI |
|
|
67
66
|
| `lang-files.md` | Laravel lang files, both de/ and en/ always in sync |
|
|
68
67
|
| `rtk.md` | Using rtk for token-efficient CLI output filtering |
|
|
69
|
-
| `agent-docs.md` | When to read/create/update documentation |
|
|
70
|
-
| `augment-portability.md` | Everything in `.augment/` must be project-agnostic |
|
|
71
68
|
| `roadmap-progress-sync.md` | Checkbox edits in `agents/roadmaps/*.md` must regenerate `agents/roadmaps-progress.md` in the same response |
|
|
72
69
|
|
|
73
70
|
### Skills (`.augment/skills/`)
|
|
@@ -79,14 +76,14 @@ Skills organized by domain:
|
|
|
79
76
|
|
|
80
77
|
| Category | Skills |
|
|
81
78
|
|---|---|
|
|
82
|
-
| **PHP/Laravel** | `php`, `php-coder`, `laravel`, `eloquent`, `laravel-validation`, `php-service`, `dto
|
|
79
|
+
| **PHP/Laravel** | `php`, `php-coder`, `laravel`, `eloquent`, `laravel-validation`, `php-service`, `laravel-dto`, `artisan-commands`, `laravel-horizon`, `laravel-mail`, `laravel-middleware`, `laravel-notifications`, `laravel-pennant`, `laravel-pulse`, `laravel-reverb`, `laravel-scheduling` |
|
|
83
80
|
| **API** | `api-endpoint`, `api-design`, `api-versioning`, `api-testing`, `openapi` |
|
|
84
81
|
| **Analysis** | `analysis-autonomous-mode`, `universal-project-analysis`, `project-analysis-laravel`, `bug-analyzer`, `security-audit`, `performance-analysis` |
|
|
85
82
|
| **Testing** | `pest-testing`, `test-generator`, `test-performance`, `php-debugging`, `playwright-testing` |
|
|
86
83
|
| **Frontend** | `javascript`, `typescript`, `vue`, `react`, `nextjs`, `nuxt`, `tailwind`, `livewire`, `flux`, `blade-ui`, `fe-design` |
|
|
87
84
|
| **Infrastructure** | `docker`, `aws-infrastructure`, `terraform`, `terragrunt`, `devcontainer`, `github-ci`, `cloudflare-workers`, `traefik` |
|
|
88
|
-
| **Data** | `database`, `migration
|
|
89
|
-
| **Jobs/Events** | `jobs-events`, `logging-monitoring`, `grafana`, `websocket` |
|
|
85
|
+
| **Data** | `database`, `laravel-migration`, `multi-tenancy`, `performance`, `sql-writing` |
|
|
86
|
+
| **Jobs/Events** | `jobs-events`, `logging-monitoring`, `grafana`, `laravel-websocket` |
|
|
90
87
|
| **Packages** | `composer`, `composer-packages`, `npm`, `npm-packages` |
|
|
91
88
|
| **Design** | `dashboard-design`, `design-review`, `fe-design` |
|
|
92
89
|
| **Agent System** | `agent-docs-writing`, `agents-audit`, `context-create`, `commands`, `copilot-config`, `copilot-agents-optimization`, `feature-planning`, `file-editor`, `guidelines`, `mcp`, `override-management`, `project-docs`, `roadmap-management`, `module-management`, `naming`, `project-analyzer`, `sequential-thinking`, `skill-reviewer` |
|
|
@@ -33,7 +33,7 @@ before writing or reviewing code); this file is the catalog.
|
|
|
33
33
|
| `performance.md` | Performance conventions — caching, Redis, eager loading, response time targets |
|
|
34
34
|
| `security.md` | Security conventions — auth, authorization, SQL injection, XSS, CSRF, headers |
|
|
35
35
|
| `sql.md` | Raw SQL conventions — parameterization, MariaDB syntax, common mistakes |
|
|
36
|
-
| `websocket.md` |
|
|
36
|
+
| `laravel-websocket.md` | Laravel Broadcasting conventions — channel types, connection management, Echo client |
|
|
37
37
|
| `patterns.md` | Design patterns index (links to `patterns/` subdirectory) |
|
|
38
38
|
|
|
39
39
|
## PHP Patterns (`docs/guidelines/php/patterns/`)
|
|
@@ -103,7 +103,7 @@ properties:
|
|
|
103
103
|
Upstream (`Weizhena/Deep-Research-skills`) shipped a `validate_json.py`
|
|
104
104
|
Pydantic-based validator that assumed `~/.claude/` paths and a Python
|
|
105
105
|
runtime in the consumer environment. Both are
|
|
106
|
-
`augment-
|
|
106
|
+
`augment-edit-discipline` violations for this package (zero-runtime-Python
|
|
107
107
|
goal, host-agnostic distribution). The schema reference above lets the
|
|
108
108
|
agent validate by reading; consumers needing programmatic validation
|
|
109
109
|
can pipe the YAML through any JSON-Schema validator they prefer
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Interrupt Examples — Non-Interrupts, Failure Modes
|
|
2
|
+
|
|
3
|
+
Loaded by the [`user-interrupt-priority`](../../rules/user-interrupt-priority.md)
|
|
4
|
+
rule when concrete examples sharpen a classification call. The Iron
|
|
5
|
+
Law, classification table, and stop-ask-resume protocol live in the
|
|
6
|
+
rule itself.
|
|
7
|
+
|
|
8
|
+
## What does NOT count as an interrupt
|
|
9
|
+
|
|
10
|
+
- **Clarifying question about the current task** — answer in place,
|
|
11
|
+
keep going.
|
|
12
|
+
- **Quoted text / code / log content** containing imperative verbs
|
|
13
|
+
("stop", "abort") — content, not instruction. Speech-act check, same
|
|
14
|
+
as [`autonomous-execution § opt-in detection`](../../rules/autonomous-execution.md#opt-in-detection--match-by-intent-not-exact-string).
|
|
15
|
+
- **User pasting an error or screenshot** without a redirect —
|
|
16
|
+
diagnostic input for the current task.
|
|
17
|
+
- **"Why are you doing X?"** as a question — answer it, then continue
|
|
18
|
+
(unless the answer reveals the current task is wrong, in which case
|
|
19
|
+
STOP and confirm).
|
|
20
|
+
|
|
21
|
+
## Failure modes
|
|
22
|
+
|
|
23
|
+
- **Silent-resume** — treated the interrupt as a pause, returned to the
|
|
24
|
+
old task without asking. Iron Law violation.
|
|
25
|
+
- **Partial-execution-then-resume** — answered the new ask in two
|
|
26
|
+
sentences, then went back to the old task without completing the new
|
|
27
|
+
one. Treat meta-tasks (process audits, council consultations, rule
|
|
28
|
+
changes) as full tasks, not as quick acknowledgments.
|
|
29
|
+
- **Greedy-bundling** — appended the new task to the old task's plan
|
|
30
|
+
and continued the old plan first. New task runs **first**, alone, in
|
|
31
|
+
full.
|
|
32
|
+
- **Autonomy-as-cover** — "user said autonomy on, so I just continued"
|
|
33
|
+
— autonomy never overrides a fresh instruction. See
|
|
34
|
+
[`autonomous-execution § Task-scope`](../../rules/autonomous-execution.md).
|
|
@@ -95,13 +95,13 @@ Commands often chain together. Here are the main workflows:
|
|
|
95
95
|
| Area | Skills |
|
|
96
96
|
|---|---|
|
|
97
97
|
| API endpoints | `api-endpoint`, `api-design`, `api-versioning`, `api-testing`, `openapi`, `laravel-validation` |
|
|
98
|
-
| Database | `eloquent`, `database`, `migration
|
|
98
|
+
| Database | `eloquent`, `database`, `laravel-migration`, `multi-tenancy`, `sql-writing` |
|
|
99
99
|
| Background jobs | `jobs-events`, `laravel-horizon`, `laravel-scheduling`, `performance` |
|
|
100
100
|
| Email/Notifications | `laravel-mail`, `laravel-notifications` |
|
|
101
101
|
| Middleware/Auth | `laravel-middleware`, `security` |
|
|
102
102
|
| Feature flags | `laravel-pennant` |
|
|
103
103
|
| Monitoring | `laravel-pulse`, `logging-monitoring`, `grafana`, `sentry-integration` |
|
|
104
|
-
| Real-time | `laravel-reverb`, `websocket` |
|
|
104
|
+
| Real-time | `laravel-reverb`, `laravel-websocket` |
|
|
105
105
|
| Testing | `pest-testing`, `test-generator`, `playwright-testing` |
|
|
106
106
|
| Frontend | `livewire`, `flux`, `blade-ui`, `tailwind`, `vue`, `react`, `fe-design` |
|
|
107
107
|
| Infrastructure | `docker`, `aws-infrastructure`, `terraform`, `terragrunt`, `cloudflare-workers`, `traefik` |
|
|
@@ -13,26 +13,40 @@ triggers:
|
|
|
13
13
|
|
|
14
14
|
# Architecture Rules
|
|
15
15
|
|
|
16
|
+
```
|
|
17
|
+
HTTP HANDLERS STAY THIN. BUSINESS LOGIC LIVES IN SERVICES OR USE-CASES.
|
|
18
|
+
ALWAYS VALIDATE AT THE REQUEST BOUNDARY. NEVER INLINE-VALIDATE INSIDE THE HANDLER.
|
|
19
|
+
ALWAYS READ AGENTS.MD AND PROJECT-LOCAL DOCS BEFORE STRUCTURAL DECISIONS.
|
|
20
|
+
```
|
|
21
|
+
|
|
16
22
|
## General Principles
|
|
17
23
|
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
24
|
+
- **HTTP handlers stay thin** — no business logic; delegate to a service / use-case / domain layer.
|
|
25
|
+
- **Validate at the request boundary** — never inline-validate user input inside the handler. Use the framework's request-validation primitive (Laravel `FormRequest`, Symfony validator, Zod / class-validator in TS, Pydantic in Python).
|
|
26
|
+
- **One handler, one responsibility** — prefer single-purpose handlers over multi-action controllers when the framework supports it (Laravel `__invoke`, Next.js route handlers, Express handler-per-route).
|
|
27
|
+
- **Business logic lives in services / use-cases** — calculations, orchestration, cross-aggregate validation.
|
|
28
|
+
- **Domain models stay behavior-rich but I/O-free** — no HTTP, no DB transactions in the model; only domain rules, relationships, derived properties.
|
|
23
29
|
- Always check the existing directory structure before creating new files.
|
|
24
30
|
- Respect existing patterns — apply modern standards to **new** code only.
|
|
25
31
|
|
|
32
|
+
→ Laravel-specific patterns (FormRequest, single-action `__invoke`, Eloquent scopes): see [`laravel`](../skills/laravel/SKILL.md), [`laravel-validation`](../skills/laravel-validation/SKILL.md).
|
|
33
|
+
→ Symfony: see [`symfony-workflow`](../skills/symfony-workflow/SKILL.md).
|
|
34
|
+
→ Next.js / TypeScript backends: see [`nextjs-patterns`](../skills/nextjs-patterns/SKILL.md).
|
|
35
|
+
|
|
26
36
|
## Project Detection
|
|
27
37
|
|
|
28
38
|
Detect the current project type from the **Git remote URL**, **directory name**, or **project files**:
|
|
29
39
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
40
|
+
- **PHP** — `composer.json` (framework slot: Laravel via `artisan`, Symfony via `bin/console`, standalone otherwise).
|
|
41
|
+
- **JS / TS** — `package.json` (framework slot: Next.js via `next` dep, Nuxt via `nuxt`, Express / Fastify / NestJS via deps; plain Node otherwise).
|
|
42
|
+
- **Python** — `pyproject.toml` / `requirements.txt` (framework slot: Django via `django`, FastAPI via `fastapi`, Flask via `flask`).
|
|
43
|
+
- **Go** — `go.mod` (framework slot: `gin`, `echo`, `fiber`, stdlib `net/http`).
|
|
44
|
+
- **Ruby** — `Gemfile` (framework slot: Rails via `rails` gem, Sinatra otherwise).
|
|
45
|
+
- **Rust** — `Cargo.toml` (framework slot: `axum`, `actix-web`, `rocket`).
|
|
33
46
|
- Check `AGENTS.md` or `agents/` for project-specific documentation.
|
|
34
47
|
|
|
35
|
-
|
|
48
|
+
Tooling lives in a runner file at the project root — detect once and reuse the result:
|
|
49
|
+
`Taskfile.yml` → `task`, `Makefile` → `make`, `package.json` `scripts:` → `npm` / `pnpm` / `yarn`, `pyproject.toml` `[tool.poetry.scripts]` or `[project.scripts]` → `poetry` / `uv`, framework CLIs (`artisan`, `bin/console`, `manage.py`, `bin/rails`) when the matching manifest is present.
|
|
36
50
|
|
|
37
51
|
## Project-Specific Architecture
|
|
38
52
|
|
|
@@ -51,7 +65,7 @@ projects use `docs/decisions/`. Reversible refactors and minor cleanups do **not
|
|
|
51
65
|
|
|
52
66
|
## Module-Level Documentation
|
|
53
67
|
|
|
54
|
-
Some projects use a module system (e.g. `app/Modules/` in Laravel
|
|
68
|
+
Some projects use a module system (e.g. `app/Modules/` in Laravel, `apps/`/`packages/` in a Turborepo, `src/modules/` in NestJS, `internal/` in Go).
|
|
55
69
|
Modules may have their own agent docs in `app/Modules/*/agents/` with:
|
|
56
70
|
|
|
57
71
|
- Module descriptions and feature docs
|
|
@@ -13,6 +13,12 @@ triggers:
|
|
|
13
13
|
|
|
14
14
|
# Artifact Drafting Protocol
|
|
15
15
|
|
|
16
|
+
```
|
|
17
|
+
NEVER START WRITING WITHOUT THE UNDERSTAND → RESEARCH → DRAFT PHASES.
|
|
18
|
+
EVERY PHASE ENDS WITH A NUMBERED-OPTIONS PROMPT. NO SILENT PROGRESSION.
|
|
19
|
+
ZERO AUTOPILOT. AGENT PROPOSES, HUMAN DECIDES. COMMIT ONLY ON APPROVAL.
|
|
20
|
+
```
|
|
21
|
+
|
|
16
22
|
When the user asks to build or significantly rewrite a **skill, rule,
|
|
17
23
|
command, or guideline**, the agent does **not** start writing. It runs
|
|
18
24
|
three phases: **Understand → Research → Draft**. Each phase ends with a
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: "auto"
|
|
3
|
+
tier: "2a"
|
|
4
|
+
description: "Editing inside .augment/ or .agent-src.uncompressed/ — files MUST stay project-agnostic AND any add/rename/delete syncs counts and cross-references in the same edit"
|
|
5
|
+
source: package
|
|
6
|
+
triggers:
|
|
7
|
+
- path_prefix: ".augment/"
|
|
8
|
+
- path_prefix: ".agent-src.uncompressed/"
|
|
9
|
+
- keyword: "portable"
|
|
10
|
+
- keyword: "rename"
|
|
11
|
+
- keyword: "delete"
|
|
12
|
+
routes_to:
|
|
13
|
+
- "guideline:augment-portability-patterns"
|
|
14
|
+
- "skill:agent-docs-writing"
|
|
15
|
+
validator_ignore:
|
|
16
|
+
- type: "substring"
|
|
17
|
+
pattern: ".agent-src.uncompressed/"
|
|
18
|
+
reason: "Rule scopes the portability gate to the uncompressed authoring tree."
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Augment Edit Discipline
|
|
22
|
+
|
|
23
|
+
**Iron Law (portability).** Files inside `.augment/` and `.agent-src.uncompressed/` MUST stay project-agnostic — no project names, domains, stacks.
|
|
24
|
+
|
|
25
|
+
**Iron Law (sync).** On any add / rename / delete of skill / rule / command / guideline, update counts and cross-references in the same edit.
|
|
26
|
+
|
|
27
|
+
Portability body migrated to `guideline:augment-portability-patterns`. Sync body migrated to `skill:agent-docs-writing` (per P4 of `road-to-kernel-and-router.md`).
|
|
28
|
+
Trigger-set above activates both routes under the `balanced` and `full` profiles.
|
|
@@ -33,8 +33,8 @@ Never edit any of these generated layers directly:
|
|
|
33
33
|
## The Iron Rule
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
NEVER
|
|
37
|
-
ALWAYS
|
|
36
|
+
NEVER CREATE OR EDIT FILES IN .agent-src/ OR .augment/ DIRECTLY — NOT EVEN "JUST A SMALL FIX".
|
|
37
|
+
ALWAYS WORK IN .agent-src.uncompressed/ — THEN COMPRESS VIA THE /compress COMMAND.
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
**There are ZERO exceptions to this rule.** Even if:
|
|
@@ -57,8 +57,39 @@ When the user later issues a **new** request — different ticket, different roa
|
|
|
57
57
|
|
|
58
58
|
In doubt whether the new request inherits or needs fresh confirmation → fresh confirmation. The Hard Floor and [`scope-control`](scope-control.md) gates apply to every task regardless.
|
|
59
59
|
|
|
60
|
+
## User interrupts override the current task
|
|
61
|
+
|
|
62
|
+
A new instruction from the user mid-flight is **not** a continuation — see [`user-interrupt-priority`](user-interrupt-priority.md) for the mandatory STOP → run new task → ASK before resume protocol. Autonomy never authorizes silent-resume of the prior task.
|
|
63
|
+
|
|
64
|
+
## Validation-loop budget — hard cap N=3 per target
|
|
65
|
+
|
|
66
|
+
Autonomous flows must not iterate indefinitely on the same validation target. **Validation target** = a single identifiable artefact: a file path, a lint rule ID, a test name, a CI sub-task name. Natural-language clustering ("the linter stuff") does **not** count as a target — agents will rename their way out of the budget.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
3 CONSECUTIVE FAILED ATTEMPTS ON THE SAME VALIDATION TARGET → STOP.
|
|
70
|
+
SURFACE THE 3 ATTEMPTS + BLOCKING ISSUE. ASK USER FOR GUIDANCE.
|
|
71
|
+
DO NOT ITERATE BEYOND N=3 WITHOUT EXPLICIT USER APPROVAL.
|
|
72
|
+
COUNTER RESETS ONLY ON A DIFFERENT TARGET OR USER-APPROVED CONTINUATION.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
A "failed attempt" is an iteration that did not move the target from red to green. Tuning the tool around the target (e.g. growing an allowlist, loosening a threshold, suppressing a check) counts as an attempt — and is usually a sign the **tool**, not the content, is wrong.
|
|
76
|
+
|
|
77
|
+
### Antipattern — allowlist-growth as silent budget bypass
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
ALLOWLIST > 20 ENTRIES IN ONE SESSION = THE LINTER IS WRONG.
|
|
81
|
+
STOP. PROPOSE LINTER REDESIGN OR REMOVAL. DO NOT EXPAND THE ALLOWLIST FURTHER.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Crossing the 20-entry threshold counts as the 3rd validation-target failure for the linter in question, regardless of prior attempt count. The fix is a tool-shape change (heuristic tightening, scope narrowing, deletion), not more entries. Same logic for: warning-suppression lists growing past ~20, `// noqa` / `# type: ignore` sweeps over many files in one session, test `skip` / `xfail` bulk-adds to chase green.
|
|
85
|
+
|
|
86
|
+
### Probe efficiency — direct over orchestration
|
|
87
|
+
|
|
88
|
+
When validating a single target, run the **specific** check, not a meta-task that fans out to dozens of sub-tasks. Use the failing tool's direct entry point (the specific script invocation, the specific runner target, the single-test filter for the project's test runner) rather than the full CI meta-pipeline. Full-pipeline runs are appropriate at phase boundaries, not as a per-iteration probe.
|
|
89
|
+
|
|
60
90
|
## See also
|
|
61
91
|
|
|
92
|
+
- [`user-interrupt-priority`](user-interrupt-priority.md) — STOP-ASK-RESUME on new tasks; overrides autonomy
|
|
62
93
|
- [`non-destructive-by-default`](non-destructive-by-default.md) — universal safety floor; never overridden by autonomy
|
|
63
94
|
- [`scope-control`](scope-control.md) — git-ops permission gate
|
|
64
95
|
- [`ask-when-uncertain`](ask-when-uncertain.md) — vague-request triggers that always require asking
|
|
@@ -61,7 +61,7 @@ When **3 consecutive attempts** at the same task fail (code fix, test fix, confi
|
|
|
61
61
|
|
|
62
62
|
- Code change that doesn't fix the problem
|
|
63
63
|
- Test that still fails after the fix
|
|
64
|
-
- Quality check (
|
|
64
|
+
- Quality check (type-checker, linter, formatter) that still errors
|
|
65
65
|
- Build/deploy that fails after config change
|
|
66
66
|
|
|
67
67
|
**Does NOT reset the counter:** Unrelated tasks. User providing new information (course correction).
|
|
@@ -104,7 +104,7 @@ in any plate that imports volatile upstream content:
|
|
|
104
104
|
- The `check-refs` and `check-portability` linters apply unchanged.
|
|
105
105
|
|
|
106
106
|
Adopting a domain does not exempt it from any other suite-wide rule —
|
|
107
|
-
`augment-
|
|
107
|
+
`augment-edit-discipline`, `skill-quality`, `size-enforcement`,
|
|
108
108
|
`rule-type-governance`. Every domain artefact passes the same gates as a
|
|
109
109
|
core artefact.
|
|
110
110
|
|
|
@@ -146,12 +146,11 @@ core artefact.
|
|
|
146
146
|
|
|
147
147
|
## See also
|
|
148
148
|
|
|
149
|
-
- [`augment-
|
|
150
|
-
must stay project-agnostic
|
|
149
|
+
- [`augment-edit-discipline`](augment-edit-discipline.md) —
|
|
150
|
+
`.agent-src/` must stay project-agnostic and cross-references must stay
|
|
151
|
+
in sync; domain plates inherit both floors
|
|
151
152
|
- [`size-enforcement`](size-enforcement.md) — size budgets apply per
|
|
152
153
|
artefact regardless of domain
|
|
153
|
-
- [`docs-sync`](docs-sync.md) — keep cross-references in sync when
|
|
154
|
-
opening a domain plate
|
|
155
154
|
- [`rule-type-governance`](rule-type-governance.md) — within-domain rules
|
|
156
155
|
still pick `always` vs `auto` per the governance table
|
|
157
156
|
- [`skill-quality`](skill-quality.md) — every domain skill passes the
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: "auto"
|
|
3
|
+
tier: "2a"
|
|
4
|
+
description: "Drafting advisory-shaped content (legal, medical, financial, strategic-consulting) — require the matching 'not X advice' disclaimer; refuse diagnosis/dosage outright"
|
|
5
|
+
source: package
|
|
6
|
+
triggers:
|
|
7
|
+
- keyword: "legal brief"
|
|
8
|
+
- keyword: "contract redline"
|
|
9
|
+
- keyword: "terms of service"
|
|
10
|
+
- keyword: "privacy policy"
|
|
11
|
+
- keyword: "diagnosis"
|
|
12
|
+
- keyword: "symptoms"
|
|
13
|
+
- keyword: "dosage"
|
|
14
|
+
- keyword: "medication"
|
|
15
|
+
- keyword: "investment memo"
|
|
16
|
+
- keyword: "valuation"
|
|
17
|
+
- keyword: "DCF"
|
|
18
|
+
- keyword: "tax position"
|
|
19
|
+
- keyword: "strategic recommendation"
|
|
20
|
+
- keyword: "board memo"
|
|
21
|
+
- keyword: "executive summary"
|
|
22
|
+
- phrase: "review this contract"
|
|
23
|
+
- phrase: "is this symptom"
|
|
24
|
+
- phrase: "should I invest"
|
|
25
|
+
- phrase: "what should we do"
|
|
26
|
+
routes_to:
|
|
27
|
+
- "skill:contracts-cognition"
|
|
28
|
+
- "skill:privacy-review"
|
|
29
|
+
- "skill:dcf-modeling"
|
|
30
|
+
- "skill:scenario-modeling"
|
|
31
|
+
- "skill:stakeholder-tradeoff"
|
|
32
|
+
- "skill:decision-record"
|
|
33
|
+
applies_to_user_types:
|
|
34
|
+
- "legal"
|
|
35
|
+
- "finance"
|
|
36
|
+
- "founder"
|
|
37
|
+
- "consultant"
|
|
38
|
+
- "creator"
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Domain Safety — Advisory Disclaimer
|
|
42
|
+
|
|
43
|
+
## Iron Law
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
EVERY ADVISORY-SHAPED DRAFT SHIPS WITH THE MATCHING "NOT X ADVICE"
|
|
47
|
+
DISCLAIMER. DIAGNOSIS AND DOSAGE OUTPUTS ARE REFUSED OUTRIGHT.
|
|
48
|
+
STRATEGIC RECOMMENDATIONS CITE ASSUMPTIONS + CONFIDENCE LABELS.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The agent is not a licensed attorney, healthcare provider, financial advisor, or auditor. Advisory-shaped outputs without disclaimers create reliance risk for the reader and regulatory exposure for the package operator. Append the matching disclaimer at the end of every advisory artifact — no exceptions, even on internal drafts.
|
|
52
|
+
|
|
53
|
+
## Sector matrix
|
|
54
|
+
|
|
55
|
+
| Sector | Refuse outright | Disclaimer key | Routes |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| **Legal** | — | `not-legal-advice` | `skill:contracts-cognition` |
|
|
58
|
+
| **Medical** | diagnosis, dosage, "stop medication" | `not-medical-advice` | `skill:privacy-review` |
|
|
59
|
+
| **Financial** | — (advice OK with disclaimer) | `not-financial-advice` | `skill:dcf-modeling`, `skill:scenario-modeling` |
|
|
60
|
+
| **Strategic** | — | (structured: assumptions + confidence) | `skill:stakeholder-tradeoff`, `skill:decision-record` |
|
|
61
|
+
|
|
62
|
+
## Disclaimer templates (append verbatim or translated)
|
|
63
|
+
|
|
64
|
+
### Legal — `not-legal-advice`
|
|
65
|
+
|
|
66
|
+
> **Not legal advice.** This draft was generated by an AI assistant and is provided for informational purposes only. It does not constitute legal advice and does not create an attorney-client relationship. Consult a licensed attorney in your jurisdiction before relying on this content for any binding decision.
|
|
67
|
+
|
|
68
|
+
DE: **Keine Rechtsberatung.** Dieser Entwurf wurde von einem KI-Assistenten erstellt und dient ausschließlich zu Informationszwecken. Er stellt keine Rechtsberatung dar und begründet kein Mandatsverhältnis. Konsultieren Sie vor jeder rechtsverbindlichen Entscheidung eine zugelassene Anwältin oder einen Anwalt in Ihrer Rechtsordnung.
|
|
69
|
+
|
|
70
|
+
### Medical — `not-medical-advice`
|
|
71
|
+
|
|
72
|
+
> **Not medical advice.** This content was generated by an AI assistant for general informational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of a qualified healthcare provider with any questions you may have regarding a medical condition. If you think you may have a medical emergency, call your local emergency number immediately.
|
|
73
|
+
|
|
74
|
+
DE: **Keine medizinische Beratung.** Dieser Inhalt wurde von einem KI-Assistenten zu allgemeinen Informationszwecken erstellt. Er ist kein Ersatz für professionelle medizinische Beratung, Diagnose oder Behandlung. Wenden Sie sich bei Fragen zu einer Erkrankung stets an eine qualifizierte medizinische Fachkraft. Bei einem medizinischen Notfall rufen Sie sofort die örtliche Notrufnummer.
|
|
75
|
+
|
|
76
|
+
### Financial — `not-financial-advice`
|
|
77
|
+
|
|
78
|
+
> **Not financial or tax advice.** This analysis was generated by an AI assistant and is provided for informational and educational purposes only. It does not constitute investment, financial, accounting, or tax advice. Past performance does not predict future results. Consult a licensed financial advisor and a qualified tax professional in your jurisdiction before making any investment or tax decision.
|
|
79
|
+
|
|
80
|
+
DE: **Keine Anlage- oder Steuerberatung.** Diese Analyse wurde von einem KI-Assistenten erstellt und dient ausschließlich zu Informations- und Bildungszwecken. Sie stellt keine Anlage-, Finanz-, Buchhaltungs- oder Steuerberatung dar. Vergangene Wertentwicklung ist keine Garantie für zukünftige Ergebnisse. Konsultieren Sie vor jeder Anlage- oder Steuerentscheidung eine zugelassene Anlageberaterin und eine qualifizierte Steuerexpertin in Ihrer Rechtsordnung.
|
|
81
|
+
|
|
82
|
+
### Strategic — structural requirement
|
|
83
|
+
|
|
84
|
+
Every recommendation must include:
|
|
85
|
+
|
|
86
|
+
1. **Assumptions section.** 3-5 bullets naming the load-bearing priors (market size, competitive response, internal capacity, regulatory stability, customer demand). If any one of these flips, the recommendation flips.
|
|
87
|
+
2. **Confidence label per claim.** High / Medium / Low — verifiable from cited data → High; reasoned but unverified → Medium; speculative → Low.
|
|
88
|
+
3. **Inversion check.** One paragraph: *"This recommendation fails if [X happens]. The early signal to watch is [Y]."*
|
|
89
|
+
4. **Footer**:
|
|
90
|
+
|
|
91
|
+
> **AI-generated strategic analysis.** This recommendation was drafted by an AI assistant based on the assumptions stated above. It is one input among several and should not be acted on without human review, validation against current data, and stakeholder consultation. Confidence labels are the AI's self-assessment, not an external audit.
|
|
92
|
+
|
|
93
|
+
## Medical — refuse outright
|
|
94
|
+
|
|
95
|
+
- *"What do I have?"* / *"Is this symptom serious?"* → refuse + redirect to a licensed provider, urgent care, or emergency services if symptoms suggest acute risk.
|
|
96
|
+
- *"How much [medication] should I take?"* → refuse + redirect to pharmacist / prescriber.
|
|
97
|
+
- *"Can I stop my medication?"* → refuse + redirect to prescriber.
|
|
98
|
+
|
|
99
|
+
## What counts as "advisory-shaped"
|
|
100
|
+
|
|
101
|
+
- **Legal:** briefs, contract redlines, ToS, privacy policies, MSAs, DPAs, clause drafts, contract reviews.
|
|
102
|
+
- **Medical:** symptom interpretation, diagnostic reasoning, treatment selection, wellness/supplement recommendations for a condition, mental-health crisis response (include crisis-hotline redirect if acute).
|
|
103
|
+
- **Financial:** buy/sell/hold recommendations on any security, crypto, or asset; valuation outputs (DCF, comps, precedent transactions); tax position recommendations; portfolio allocation. **Not in scope:** bookkeeping, expense categorization, runway-cash math.
|
|
104
|
+
- **Strategic:** board memos, executive summaries, go-to-market plans, consulting deliverables, organizational recommendations.
|
|
105
|
+
|
|
106
|
+
## When to skip
|
|
107
|
+
|
|
108
|
+
Never — the disclaimer is non-negotiable on advisory-shaped drafts. If the user says *"this is for [a professional] to review, skip the disclaimer"* — still include it; the professional can strip it. The risk of forgetting outweighs the friction of one paragraph.
|
|
109
|
+
|
|
110
|
+
## See also
|
|
111
|
+
|
|
112
|
+
- `skill:contracts-cognition`, `skill:dcf-modeling`, `skill:scenario-modeling`, `skill:stakeholder-tradeoff`, `skill:decision-record`, `skill:adversarial-review`, `skill:privacy-review`.
|
|
113
|
+
- `domain-safety-pii` — companion when drafts embed real identifiers.
|
|
114
|
+
- `domain-safety-retention` — companion when advisory content has retention implications.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: "auto"
|
|
3
|
+
tier: "2a"
|
|
4
|
+
description: "Drafts, logs, and exports touching real customer/candidate/counterparty data — redact direct identifiers, use placeholders, flag re-identification on quasi-IDs"
|
|
5
|
+
source: package
|
|
6
|
+
triggers:
|
|
7
|
+
- keyword: "support macro"
|
|
8
|
+
- keyword: "ticket response"
|
|
9
|
+
- keyword: "help desk"
|
|
10
|
+
- keyword: "Zendesk"
|
|
11
|
+
- keyword: "Intercom"
|
|
12
|
+
- keyword: "testimonial"
|
|
13
|
+
- keyword: "case study"
|
|
14
|
+
- keyword: "customer story"
|
|
15
|
+
- keyword: "candidate"
|
|
16
|
+
- keyword: "interview notes"
|
|
17
|
+
- keyword: "scorecard"
|
|
18
|
+
- keyword: "rejection email"
|
|
19
|
+
- keyword: "offer letter"
|
|
20
|
+
- keyword: "invoice"
|
|
21
|
+
- keyword: "accounts receivable"
|
|
22
|
+
- keyword: "accounts payable"
|
|
23
|
+
- keyword: "finance memo"
|
|
24
|
+
- keyword: "log"
|
|
25
|
+
- keyword: "logger"
|
|
26
|
+
- keyword: "Sentry"
|
|
27
|
+
- keyword: "Datadog"
|
|
28
|
+
- keyword: "structured log"
|
|
29
|
+
- keyword: "export to CSV"
|
|
30
|
+
- keyword: "data export"
|
|
31
|
+
- keyword: "partner integration"
|
|
32
|
+
- phrase: "draft a response to"
|
|
33
|
+
- phrase: "marketing email featuring"
|
|
34
|
+
- phrase: "draft feedback for"
|
|
35
|
+
- phrase: "log the user"
|
|
36
|
+
- phrase: "send them the spreadsheet"
|
|
37
|
+
routes_to:
|
|
38
|
+
- "skill:privacy-review"
|
|
39
|
+
- "skill:data-handling-judgment"
|
|
40
|
+
- "skill:logging-monitoring"
|
|
41
|
+
- "skill:secrets-management"
|
|
42
|
+
applies_to_user_types:
|
|
43
|
+
- "all"
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
# Domain Safety — PII Redaction
|
|
47
|
+
|
|
48
|
+
## Iron Law
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
NO RAW DIRECT IDENTIFIER IN ANY AI-GENERATED DRAFT, LOG LINE, OR EXPORT.
|
|
52
|
+
PLACEHOLDERS IN DRAFTS. ALLOWLISTED STRUCTURED FIELDS IN LOGS.
|
|
53
|
+
REDACTION + RE-IDENTIFICATION CHECK ON EXPORTS.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
PII leaks via three surfaces: AI-drafted artifacts (emails, scorecards, invoices), log streams (Datadog / Sentry / CloudWatch), and exports (CSV / partner shares). Redact at generation time, not after review. Marketing case studies are the consent-cited exception — and consent must be cited in the prompt.
|
|
57
|
+
|
|
58
|
+
## Surface 1 — Drafts (artifacts)
|
|
59
|
+
|
|
60
|
+
Replace any pasted PII with placeholders **before** drafting. Sector matrix:
|
|
61
|
+
|
|
62
|
+
| Sector | Placeholders | Routes |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| **Support** | `[CUSTOMER_NAME]`, `[EMAIL]`, `[PHONE]`, `[ACCOUNT_ID]`, `[ORDER_ID]`, `[ADDRESS]`, `[PAYMENT_DETAILS]` | `skill:privacy-review` |
|
|
65
|
+
| **Marketing** | `[CUSTOMER_COMPANY]`, `[CONTACT_NAME]`, paraphrase quotes, round metrics | `skill:privacy-review` |
|
|
66
|
+
| **Recruiting** | `[CANDIDATE_NAME]`, `[CANDIDATE_EMAIL]`, `[CURRENT_EMPLOYER]`, `[UNIVERSITY]`, `[COMP_TARGET]`; **omit demographics entirely** | `skill:privacy-review` |
|
|
67
|
+
| **Finance** | `[COUNTERPARTY]`, `[CONTACT_EMAIL]`, `[BANK_ACCOUNT]`, `[TAX_ID]`, `[COST_CENTER]`, `[AMOUNT]` | `skill:privacy-review`, `skill:data-handling-judgment` |
|
|
68
|
+
|
|
69
|
+
### Marketing — consent-cited exception
|
|
70
|
+
|
|
71
|
+
Real customer names / logos / quotes allowed only when the prompt cites one of:
|
|
72
|
+
|
|
73
|
+
- *"Reference-customer agreement dated YYYY-MM-DD"*
|
|
74
|
+
- *"Quote approved by [CONTACT] on YYYY-MM-DD"*
|
|
75
|
+
- *"Public press release [URL]"*
|
|
76
|
+
|
|
77
|
+
Otherwise — redact to placeholders.
|
|
78
|
+
|
|
79
|
+
### Recruiting — special-category warning
|
|
80
|
+
|
|
81
|
+
Demographic markers (age, gender, ethnicity, family status) are **never** echoed in drafted artifacts — they belong in the ATS record. Special-category data under GDPR + protected-class data under US EEO.
|
|
82
|
+
|
|
83
|
+
## Surface 2 — Logs
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
NO RAW EMAIL, NAME, PHONE, ADDRESS, TOKEN, OR PAYMENT IDENTIFIER
|
|
87
|
+
EVER REACHES THE LOG STREAM. ALLOWLISTED STRUCTURED FIELDS ONLY.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Required patterns:
|
|
91
|
+
|
|
92
|
+
1. **Allowlisted structured fields only.** Log `user_id`, `tenant_id`, `request_id`, `event_type` — never `user` or `request` blobs.
|
|
93
|
+
2. **Logger-level redaction.** Configure the logger to scrub `email`, `phone`, `name`, `address`, `token`, `password`, `card_number`, `iban` keys recursively from any payload.
|
|
94
|
+
3. **No raw exception payloads.** Exceptions captured by Sentry / Bugsnag must scrub the request body via the SDK's `before_send` hook.
|
|
95
|
+
4. **No log-and-forget for auth flows.** Login / password-reset / token-mint logs never include the credential itself, only the actor + outcome.
|
|
96
|
+
|
|
97
|
+
Refuse to write `logger.info("User logged in: $request->all()")` or `Log::info($user)` — show allowlisted version instead. Tokens + API keys + webhook secrets follow the same rule under `skill:secrets-management`.
|
|
98
|
+
|
|
99
|
+
## Surface 3 — Exports
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
NO DIRECT IDENTIFIER LEAVES THE SYSTEM IN AN EXPORT.
|
|
103
|
+
NO QUASI-IDENTIFIER COMBINATION THAT IS RE-IDENTIFIABLE LEAVES UNFLAGGED.
|
|
104
|
+
THE RECIPIENT MATTERS — INTERNAL ANALYST IS NOT EXTERNAL PARTNER.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Direct identifiers — always redact
|
|
108
|
+
|
|
109
|
+
| Class | Action |
|
|
110
|
+
|---|---|
|
|
111
|
+
| Name, email, phone, address | Drop column or hash with a tenant-scoped salt |
|
|
112
|
+
| National ID (SSN, tax ID) | Drop column — never hash, hash is reversible by recipient |
|
|
113
|
+
| Payment card / IBAN | Drop column |
|
|
114
|
+
| Free-text fields (comments, notes) | Pass through a PII scrubber or drop the column |
|
|
115
|
+
|
|
116
|
+
### Quasi-identifiers — flag and audit
|
|
117
|
+
|
|
118
|
+
k-anonymity rule of thumb: combinations of {birth date, ZIP/postal code, gender} re-identify 87% of US population; same for {company size, industry, region, founding year} in B2B. When the export contains 3+ quasi-identifiers per row, surface the re-identification risk and ask whether bucketing (age-band instead of birthdate, region instead of city) is acceptable.
|
|
119
|
+
|
|
120
|
+
### Recipient-tier matrix
|
|
121
|
+
|
|
122
|
+
| Recipient | Floor |
|
|
123
|
+
|---|---|
|
|
124
|
+
| Internal analyst, NDA-bound, on-prem analytics | Pseudonymized identifiers OK |
|
|
125
|
+
| Internal analyst, BYO-device, cloud analytics | Pseudonymized + aggregated only |
|
|
126
|
+
| External partner, signed DPA | Pseudonymized + minimum-necessary columns |
|
|
127
|
+
| External partner, no DPA | Refuse; require DPA first |
|
|
128
|
+
| Public dataset | Aggregated, k-anonymity ≥ 5, no quasi-identifier combos |
|
|
129
|
+
|
|
130
|
+
## Refusal triggers
|
|
131
|
+
|
|
132
|
+
- *"Send the customer list to our new marketing vendor"* (no DPA cited) → refuse + redirect to legal.
|
|
133
|
+
- *"Export everything to a Google Sheet"* (recipient tier unknown) → ask the recipient question first.
|
|
134
|
+
- *"We're under SEC investigation — can we clean up old emails?"* → hard refuse; flag spoliation risk; redirect to counsel.
|
|
135
|
+
|
|
136
|
+
## See also
|
|
137
|
+
|
|
138
|
+
- `skill:privacy-review` — regulatory-regime read (GDPR / CCPA / HIPAA / EEO).
|
|
139
|
+
- `skill:data-handling-judgment` — transfer + retention cognition.
|
|
140
|
+
- `skill:logging-monitoring`, `skill:secrets-management` — technical surfaces.
|
|
141
|
+
- `domain-safety-disclaimer` — companion advisory rule.
|
|
142
|
+
- `domain-safety-retention` — companion retention rule.
|