azcodr 1.5.0 → 1.5.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/.agents/hooks.json +42 -0
- package/.agents/hooks.json.example +42 -42
- package/.agents/mcp_config.json.example +6 -1
- package/.agents/scripts/safety_guard.sh +34 -16
- package/.agents/scripts/verify_completion.sh +27 -13
- package/.agents/skills/agentic-architect/SKILL.md +125 -125
- package/.agents/skills/agentic-architect/references/agents_md_template.md +62 -62
- package/.agents/skills/agentic-architect/references/refinement_workflow.md +32 -32
- package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +63 -63
- package/.agents/skills/agentic-architect/references/skill_template.md +56 -56
- package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +401 -362
- package/.agents/skills/clean-code-refactor/SKILL.md +91 -91
- package/.agents/skills/clean-code-refactor/references/clean_code_smells.md +27 -27
- package/.agents/skills/clean-code-refactor/references/design_patterns_ts.md +65 -65
- package/.agents/skills/compliance-audit/SKILL.md +120 -120
- package/.agents/skills/compliance-audit/references/owasp_top10_controls.md +16 -16
- package/.agents/skills/compliance-audit/references/soc2_iso_controls.md +28 -28
- package/.agents/skills/lets-build/SKILL.md +173 -172
- package/.agents/skills/lets-build/references/architecture_interview_matrix.md +115 -115
- package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +160 -160
- package/.agents/skills/lets-build/references/project_readme_template.md +79 -79
- package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +255 -253
- package/.agents/skills/product-analyst/SKILL.md +154 -154
- package/.agents/skills/product-analyst/references/backlog_ordering_techniques.md +107 -107
- package/.agents/skills/product-analyst/references/gherkin_patterns.md +46 -46
- package/.agents/skills/product-analyst/references/invest_checklist.md +38 -38
- package/.agents/skills/product-analyst/references/okr_alignment_guide.md +76 -76
- package/.agents/skills/product-analyst/references/smart_tasks.md +59 -59
- package/.agents/skills/relentless-questioner/SKILL.md +128 -128
- package/.agents/skills/relentless-questioner/references/adaptive_question_trees.md +102 -102
- package/.editorconfig +19 -19
- package/.github/copilot-instructions.md +1 -0
- package/.github/workflows/ci.yml +56 -0
- package/.gitignore +25 -25
- package/AGENTS.md +102 -102
- package/LICENSE +21 -21
- package/README.md +154 -154
- package/bin/azcodr.js +228 -228
- package/data/.gitkeep +0 -0
- package/docs/knowledge/ubiquitous_language.md +18 -18
- package/docs/rules/agentic_configuration.md +259 -259
- package/docs/rules/api_architecture.md +179 -179
- package/docs/rules/authentication.md +76 -76
- package/docs/rules/authorization.md +75 -75
- package/docs/rules/caching.md +69 -69
- package/docs/rules/clean_code.md +62 -62
- package/docs/rules/cloud_native.md +41 -41
- package/docs/rules/cqrs.md +203 -203
- package/docs/rules/database_design.md +125 -125
- package/docs/rules/database_operations.md +69 -69
- package/docs/rules/design_patterns.md +98 -98
- package/docs/rules/devops_ci_cd.md +76 -76
- package/docs/rules/domain_driven_design.md +122 -122
- package/docs/rules/error_handling.md +52 -52
- package/docs/rules/feature_flags.md +59 -59
- package/docs/rules/frontend_architecture.md +157 -157
- package/docs/rules/multitenancy_architecture.md +98 -98
- package/docs/rules/product_ownership.md +127 -127
- package/docs/rules/project_management.md +49 -49
- package/docs/rules/relentless_questioning.md +52 -52
- package/docs/rules/requirements_engineering.md +98 -98
- package/docs/rules/security_compliance.md +53 -53
- package/docs/rules/server_driven_ui.md +88 -88
- package/docs/rules/test_driven_development.md +185 -185
- package/docs/rules/transactional_email.md +27 -27
- package/docs/rules/type_safety.md +65 -65
- package/docs/rules/ui_ux_architecture.md +150 -150
- package/docs/rules/workflow_state_machines.md +117 -117
- package/lib/index.d.ts +134 -123
- package/lib/index.js +5 -5
- package/lib/scaffold.js +399 -351
- package/memory.md +36 -36
- package/package.json +62 -59
- package/scripts/test_coverage.js +38 -0
- package/scripts/validate.js +246 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"safety-guard": {
|
|
3
|
+
"enabled": true,
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "run_command",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "./.agents/scripts/safety_guard.sh",
|
|
11
|
+
"timeout": 15
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"post-tool-lint": {
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"PostToolUse": [
|
|
20
|
+
{
|
|
21
|
+
"matcher": "run_command",
|
|
22
|
+
"hooks": [
|
|
23
|
+
{
|
|
24
|
+
"type": "command",
|
|
25
|
+
"command": "npm run lint",
|
|
26
|
+
"timeout": 30
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"stop-verifier": {
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"Stop": [
|
|
35
|
+
{
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "./.agents/scripts/verify_completion.sh",
|
|
38
|
+
"timeout": 120
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"safety-guard": {
|
|
3
|
-
"enabled": false,
|
|
4
|
-
"PreToolUse": [
|
|
5
|
-
{
|
|
6
|
-
"matcher": "run_command",
|
|
7
|
-
"hooks": [
|
|
8
|
-
{
|
|
9
|
-
"type": "command",
|
|
10
|
-
"command": "./.agents/scripts/safety_guard.sh",
|
|
11
|
-
"timeout": 15
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
"post-tool-lint": {
|
|
18
|
-
"enabled": false,
|
|
19
|
-
"PostToolUse": [
|
|
20
|
-
{
|
|
21
|
-
"matcher": "run_command",
|
|
22
|
-
"hooks": [
|
|
23
|
-
{
|
|
24
|
-
"type": "command",
|
|
25
|
-
"command": "npm run lint",
|
|
26
|
-
"timeout": 30
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"stop-verifier": {
|
|
33
|
-
"enabled": false,
|
|
34
|
-
"Stop": [
|
|
35
|
-
{
|
|
36
|
-
"type": "command",
|
|
37
|
-
"command": "./.agents/scripts/verify_completion.sh",
|
|
38
|
-
"timeout": 15
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"safety-guard": {
|
|
3
|
+
"enabled": false,
|
|
4
|
+
"PreToolUse": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "run_command",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "command",
|
|
10
|
+
"command": "./.agents/scripts/safety_guard.sh",
|
|
11
|
+
"timeout": 15
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"post-tool-lint": {
|
|
18
|
+
"enabled": false,
|
|
19
|
+
"PostToolUse": [
|
|
20
|
+
{
|
|
21
|
+
"matcher": "run_command",
|
|
22
|
+
"hooks": [
|
|
23
|
+
{
|
|
24
|
+
"type": "command",
|
|
25
|
+
"command": "npm run lint",
|
|
26
|
+
"timeout": 30
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"stop-verifier": {
|
|
33
|
+
"enabled": false,
|
|
34
|
+
"Stop": [
|
|
35
|
+
{
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "./.agents/scripts/verify_completion.sh",
|
|
38
|
+
"timeout": 15
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"_notes": [
|
|
3
|
+
"Copy to .agents/mcp_config.json and replace placeholders before use.",
|
|
4
|
+
"Create ./data/ (shipped with .gitkeep) before starting the sqlite server.",
|
|
5
|
+
"Replace remote-service.url with your deployment; example.com is intentionally non-functional."
|
|
6
|
+
],
|
|
2
7
|
"mcpServers": {
|
|
3
8
|
"sqlite": {
|
|
4
9
|
"command": "npx",
|
|
@@ -18,7 +23,7 @@
|
|
|
18
23
|
]
|
|
19
24
|
},
|
|
20
25
|
"remote-service": {
|
|
21
|
-
"
|
|
26
|
+
"url": "https://mcp.example.com/sse"
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
}
|
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# ==============================================================================
|
|
3
|
-
# safety_guard.sh
|
|
4
|
-
# Example PreToolUse hook for agent commands
|
|
5
|
-
# ==============================================================================
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
COMMAND="
|
|
9
|
-
|
|
10
|
-
# Reject destructive
|
|
11
|
-
if [[ "${COMMAND}" =~
|
|
12
|
-
echo "🚨 Safety Guard: Destructive
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ==============================================================================
|
|
3
|
+
# safety_guard.sh
|
|
4
|
+
# Example PreToolUse hook for agent commands
|
|
5
|
+
# ==============================================================================
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
COMMAND="$*"
|
|
9
|
+
|
|
10
|
+
# Reject destructive filesystem commands targeting root, home, or recursive deletes
|
|
11
|
+
if [[ "${COMMAND}" =~ rm[[:space:]]+-[a-zA-Z]*r[a-zA-Z]*[[:space:]]+\"?(/|\$HOME|~|/)\"? ]]; then
|
|
12
|
+
echo "🚨 Safety Guard: Destructive rm targeting root/home rejected: ${COMMAND}" >&2
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
# Reject database destruction without explicit confirmation
|
|
17
|
+
if [[ "${COMMAND}" =~ (DROP[[:space:]]+(DATABASE|SCHEMA)|TRUNCATE[[:space:]]+[A-Za-z_]+|DELETE[[:space:]]+FROM[[:space:]]+[A-Za-z_]+[[:space:]]*;[[:space:]]*$) ]]; then
|
|
18
|
+
echo "🚨 Safety Guard: Destructive SQL rejected (require explicit user confirmation): ${COMMAND}" >&2
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Reject force-push and hard resets (history destruction)
|
|
23
|
+
if [[ "${COMMAND}" =~ git[[:space:]]+push[[:space:]]+--force ]] || [[ "${COMMAND}" =~ git[[:space:]]+reset[[:space:]]+--hard ]]; then
|
|
24
|
+
echo "🚨 Safety Guard: History-destructive git command rejected (require explicit user confirmation): ${COMMAND}" >&2
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Reject disk-level destruction
|
|
29
|
+
if [[ "${COMMAND}" =~ (mkfs|dd[[:space:]]+if=|: *\(\)[[:space:]]*\{[[:space:]]*:) ]]; then
|
|
30
|
+
echo "🚨 Safety Guard: Disk/fork-bomb command rejected: ${COMMAND}" >&2
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
exit 0
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# ==============================================================================
|
|
3
|
-
# verify_completion.sh
|
|
4
|
-
# Example Stop hook ensuring tests and validation pass before agent exit
|
|
5
|
-
# ==============================================================================
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ==============================================================================
|
|
3
|
+
# verify_completion.sh
|
|
4
|
+
# Example Stop hook ensuring tests and validation pass before agent exit
|
|
5
|
+
# ==============================================================================
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# Stop hook: block premature exit when validation or tests fail.
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
# Run project validation script if configured in package.json
|
|
12
|
+
if [[ -f "package.json" ]] && grep -q '"validate"' "package.json"; then
|
|
13
|
+
if ! npm run validate; then
|
|
14
|
+
echo "🚨 Stop Verifier: 'npm run validate' failed. Fix agentic configuration before stopping." >&2
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Run test suite if configured; never allow stopping with red tests.
|
|
20
|
+
if [[ -f "package.json" ]] && grep -q '"test"' "package.json"; then
|
|
21
|
+
if ! npm test --silent; then
|
|
22
|
+
echo "🚨 Stop Verifier: 'npm test' failed. Fix failing tests before stopping." >&2
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
exit 0
|
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: agentic-architect
|
|
3
|
-
description: Use when creating, modularizing, auditing, or updating agentic configuration files, including AGENTS.md, CLAUDE.md, rule documentation files, or skills under .agents/skills/ following the progressive disclosure architecture. Do not use for writing application business logic.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Agentic Architect Skill
|
|
7
|
-
|
|
8
|
-
> **Core Philosophy:** Eliminate context bloat and model degradation through progressive disclosure, lean entrypoints, strict skill front matter, automated symlink parity, and relentless questioning during skill architecture.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 1. When to Use This Skill
|
|
13
|
-
- Auditing existing `AGENTS.md` or `CLAUDE.md` files for token bloat or giant bullet lists.
|
|
14
|
-
- Decoupling large domain sections (testing, database, auth, UI) into modular rule files.
|
|
15
|
-
- Authoring new specialized skills under `.agents/skills/` using relentless questioning.
|
|
16
|
-
- Establishing harness parity across different AI coding environments via symlinks.
|
|
17
|
-
- Implementing the continuous refinement loop to update skills based on AI mistakes.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 2. Step-by-Step Execution Workflow
|
|
22
|
-
|
|
23
|
-
### Step 1: Relentless Skill Architecture Inquiry (Question Everything)
|
|
24
|
-
Before writing a single line of a skill or rule, execute the **7 Core Inquiry Branches**:
|
|
25
|
-
1. **Placement & Scope:** Does this belong in root `AGENTS.md` (all prompts), nested `AGENTS.md` (one package), a continuous rule in `docs/rules/`, or an on-demand skill in `.agents/skills/`?
|
|
26
|
-
2. **Trigger Boundaries & YAGNI Gate:** What is the explicit imperative trigger (`Use when...`), the anti-triggers (`Do NOT use for...`), and the empirical tipping points that justify unlocking this capability?
|
|
27
|
-
3. **Domain Ground Truth:** Have all generic textbook tutorials been purged? Is this grounded in verified codebase evidence?
|
|
28
|
-
4. **Gotchas & Anti-Patterns:** What exact mistakes has the AI repeatedly made in this domain that must be forbidden?
|
|
29
|
-
5. **Determinism vs. LLM:** Can brittle tasks be converted into deterministic scripts under `scripts/`?
|
|
30
|
-
6. **Progressive Bloat:** Is `SKILL.md` strictly under 500 lines, offloading deep manuals to `references/` and templates to `resources/`?
|
|
31
|
-
7. **Verification & Proof:** What structured response template and self-validation checklist will prove success?
|
|
32
|
-
*Rule:* If any branch is unanswered or ambiguous, **STOP and ask the user** (or inspect workspace files). Never fill gaps with assumptions.
|
|
33
|
-
|
|
34
|
-
### Step 2: Audit Existing Agent Configuration
|
|
35
|
-
Inspect current agent files and measure their token and line footprint:
|
|
36
|
-
- File length > 120–150 lines in root `AGENTS.md`.
|
|
37
|
-
- Giant bullet lists accumulated from past one-off bugs.
|
|
38
|
-
- Human onboarding guides (cloning instructions, dev machine setup).
|
|
39
|
-
- Framework-specific deep tutorials that only apply to a minority of tasks.
|
|
40
|
-
- Deep, fragile file paths that rot over time.
|
|
41
|
-
|
|
42
|
-
### Step 3: Decouple Domain Directives into Modular Rules
|
|
43
|
-
Extract continuous technical requirements into dedicated markdown files under `docs/rules/`:
|
|
44
|
-
- `docs/rules/clean_code.md` (Clean Code, Pragmatic Programmer, CQS, SLAP)
|
|
45
|
-
- `docs/rules/cloud_native.md` (12-Factor 2026, OpenTelemetry, API-first)
|
|
46
|
-
- `docs/rules/security_compliance.md` (SOC 2 Type II, ISO 27001, GDPR)
|
|
47
|
-
- `docs/rules/devops_ci_cd.md` (Shift-left pipelines, trunk-based CI, OCI distroless)
|
|
48
|
-
- `docs/rules/requirements_engineering.md` (INVEST user stories, Gherkin criteria)
|
|
49
|
-
|
|
50
|
-
### Step 4: Streamline Root AGENTS.md
|
|
51
|
-
Refactor root `AGENTS.md` to be strictly bounded:
|
|
52
|
-
1. **Mission Statement & Open-Source Mandate:** 1–2 sentences defining project domain, purpose, and 100% open-source requirement.
|
|
53
|
-
2. **Runtime & Scripts:** Declared package manager (Node 24 / npm
|
|
54
|
-
3. **Core Operating Framework:** Zero-Assumption Rule, Relentless Questioning Loop, 5-stage lifecycle, action boundaries.
|
|
55
|
-
4. **Progressive Disclosure Index:** Markdown table mapping each domain to its `docs/rules/*.md` file.
|
|
56
|
-
|
|
57
|
-
### Step 5: Author Specialized Skills via Progressive Disclosure
|
|
58
|
-
When a task is complex, multi-step, or specialized, encapsulate it into `.agents/skills/<skill-name>/`:
|
|
59
|
-
1. **Front Matter:**
|
|
60
|
-
- `name`: kebab-case identifier.
|
|
61
|
-
- `description`: < 1024 characters. Must start with imperative `Use when...` defining exact trigger conditions and when NOT to use.
|
|
62
|
-
2. **Body:**
|
|
63
|
-
- Keep under 500 lines.
|
|
64
|
-
- Ground in verified project experience, not general documentation the AI already knows.
|
|
65
|
-
- Include a mandatory **"Gotchas & What NOT to Do"** section.
|
|
66
|
-
- Provide structured output templates.
|
|
67
|
-
3. **Progressive Subdirectories:**
|
|
68
|
-
- `references/`: Reference manuals loaded only on demand.
|
|
69
|
-
- `scripts/`: Deterministic code (bash/node) to prevent stochastic AI divergence.
|
|
70
|
-
- `resources/`: Static templates, lookup tables, and schemas.
|
|
71
|
-
- `examples/`: Reference implementations and code patterns.
|
|
72
|
-
|
|
73
|
-
### Step 6: Enforce Harness Parity via Symlinks
|
|
74
|
-
Prevent divergence across Claude Code, Google Antigravity, Cursor, Windsurf, and standard AGENTS.md:
|
|
75
|
-
```bash
|
|
76
|
-
ln -sf AGENTS.md CLAUDE.md
|
|
77
|
-
ln -sf AGENTS.md agents.md
|
|
78
|
-
ln -sf AGENTS.md GEMINI.md
|
|
79
|
-
ln -sf AGENTS.md .cursorrules
|
|
80
|
-
ln -sf AGENTS.md .windsurfrules
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Step 7: Apply the Continuous Refinement Loop
|
|
84
|
-
1. Save the initial raw AI output draft.
|
|
85
|
-
2. Produce the human-adjusted gold standard version.
|
|
86
|
-
3. Diff the two versions to identify repeated flaws or stylistic divergence.
|
|
87
|
-
4. Update the skill's "What NOT to Do" section with concrete negative examples.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 3. Gotchas & What NOT to Do
|
|
92
|
-
|
|
93
|
-
- **DO NOT** guess what a skill should do. Run the Relentless Skill Architecture Inquiry first.
|
|
94
|
-
- **DO NOT** author architectural rules or skills without a YAGNI Gate (Simple Baseline, Anti-Triggers, Empirical Tipping Point).
|
|
95
|
-
- **DO NOT** confuse battle-tested open-source libraries (shadcn, Tailwind, Zod, Lombok) with speculative custom over-engineering.
|
|
96
|
-
- **DO NOT** let root `AGENTS.md` exceed 120–150 lines. Every extra token degrades LLM attention.
|
|
97
|
-
- **DO NOT** write passive skill descriptions like `"Tanstack query documentation"`. Use `"Use when implementing Tanstack Query caches..."`.
|
|
98
|
-
- **DO NOT** include human "Getting Started" guides. Agents already have the workspace open.
|
|
99
|
-
- **DO NOT** hardcode individual file paths that change frequently. Reference architectural layers instead.
|
|
100
|
-
- **DO NOT** duplicate content across `CLAUDE.md` and `AGENTS.md`. Always use symbolic links.
|
|
101
|
-
- **DO NOT** add preemptive rules before the agent has actually made the mistake. Ground additions in real experience.
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## 4. Verification Checklist
|
|
106
|
-
|
|
107
|
-
Before finalizing any agent configuration update, verify:
|
|
108
|
-
- [ ] Relentless Skill Architecture Inquiry completed for all 7 branches.
|
|
109
|
-
- [ ] Architectural pattern rules and skills enforce the YAGNI Gate Triad (Baseline, Anti-Triggers, Tipping Point).
|
|
110
|
-
- [ ] Root `AGENTS.md` is under 120 lines and loads within minimal tokens.
|
|
111
|
-
- [ ] Specialized domain instructions are decoupled into `docs/rules/`.
|
|
112
|
-
- [ ] Progressive disclosure table in `AGENTS.md` contains valid, clickable markdown links.
|
|
113
|
-
- [ ] All skills have front matter with `name` and imperative `description` starting with `Use when...`.
|
|
114
|
-
- [ ] All skills are under 500 lines or offload sub-content to `references/`.
|
|
115
|
-
- [ ] Every skill contains a "Gotchas & What NOT to Do" section.
|
|
116
|
-
- [ ] Symlinks (`CLAUDE.md`, `agents.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`) resolve to `AGENTS.md`.
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## 5. Subdirectories & Progressive Resources
|
|
121
|
-
- [references/skill_architecture_inquiry.md](./references/skill_architecture_inquiry.md): The interactive 7-branch relentless questioning guide for skills.
|
|
122
|
-
- [references/agents_md_template.md](./references/agents_md_template.md): Boilerplate template for lean root and nested `AGENTS.md` files.
|
|
123
|
-
- [references/skill_template.md](./references/skill_template.md): Boilerplate template for authoring production-grade `SKILL.md` files.
|
|
124
|
-
- [references/refinement_workflow.md](./references/refinement_workflow.md): Step-by-step guide for capturing AI draft diffs against human edits to update skills.
|
|
125
|
-
- [scripts/validate_agentic_configs.sh](./scripts/validate_agentic_configs.sh): Deterministic Bash script validating front matter, line ceilings, link health, and symlink parity.
|
|
1
|
+
---
|
|
2
|
+
name: agentic-architect
|
|
3
|
+
description: Use when creating, modularizing, auditing, or updating agentic configuration files, including AGENTS.md, CLAUDE.md, rule documentation files, or skills under .agents/skills/ following the progressive disclosure architecture. Do not use for writing application business logic.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agentic Architect Skill
|
|
7
|
+
|
|
8
|
+
> **Core Philosophy:** Eliminate context bloat and model degradation through progressive disclosure, lean entrypoints, strict skill front matter, automated symlink parity, and relentless questioning during skill architecture.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. When to Use This Skill
|
|
13
|
+
- Auditing existing `AGENTS.md` or `CLAUDE.md` files for token bloat or giant bullet lists.
|
|
14
|
+
- Decoupling large domain sections (testing, database, auth, UI) into modular rule files.
|
|
15
|
+
- Authoring new specialized skills under `.agents/skills/` using relentless questioning.
|
|
16
|
+
- Establishing harness parity across different AI coding environments via symlinks.
|
|
17
|
+
- Implementing the continuous refinement loop to update skills based on AI mistakes.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. Step-by-Step Execution Workflow
|
|
22
|
+
|
|
23
|
+
### Step 1: Relentless Skill Architecture Inquiry (Question Everything)
|
|
24
|
+
Before writing a single line of a skill or rule, execute the **7 Core Inquiry Branches**:
|
|
25
|
+
1. **Placement & Scope:** Does this belong in root `AGENTS.md` (all prompts), nested `AGENTS.md` (one package), a continuous rule in `docs/rules/`, or an on-demand skill in `.agents/skills/`?
|
|
26
|
+
2. **Trigger Boundaries & YAGNI Gate:** What is the explicit imperative trigger (`Use when...`), the anti-triggers (`Do NOT use for...`), and the empirical tipping points that justify unlocking this capability?
|
|
27
|
+
3. **Domain Ground Truth:** Have all generic textbook tutorials been purged? Is this grounded in verified codebase evidence?
|
|
28
|
+
4. **Gotchas & Anti-Patterns:** What exact mistakes has the AI repeatedly made in this domain that must be forbidden?
|
|
29
|
+
5. **Determinism vs. LLM:** Can brittle tasks be converted into deterministic scripts under `scripts/`?
|
|
30
|
+
6. **Progressive Bloat:** Is `SKILL.md` strictly under 500 lines, offloading deep manuals to `references/` and templates to `resources/`?
|
|
31
|
+
7. **Verification & Proof:** What structured response template and self-validation checklist will prove success?
|
|
32
|
+
*Rule:* If any branch is unanswered or ambiguous, **STOP and ask the user** (or inspect workspace files). Never fill gaps with assumptions.
|
|
33
|
+
|
|
34
|
+
### Step 2: Audit Existing Agent Configuration
|
|
35
|
+
Inspect current agent files and measure their token and line footprint:
|
|
36
|
+
- File length > 120–150 lines in root `AGENTS.md`.
|
|
37
|
+
- Giant bullet lists accumulated from past one-off bugs.
|
|
38
|
+
- Human onboarding guides (cloning instructions, dev machine setup).
|
|
39
|
+
- Framework-specific deep tutorials that only apply to a minority of tasks.
|
|
40
|
+
- Deep, fragile file paths that rot over time.
|
|
41
|
+
|
|
42
|
+
### Step 3: Decouple Domain Directives into Modular Rules
|
|
43
|
+
Extract continuous technical requirements into dedicated markdown files under `docs/rules/`:
|
|
44
|
+
- `docs/rules/clean_code.md` (Clean Code, Pragmatic Programmer, CQS, SLAP)
|
|
45
|
+
- `docs/rules/cloud_native.md` (12-Factor 2026, OpenTelemetry, API-first)
|
|
46
|
+
- `docs/rules/security_compliance.md` (SOC 2 Type II, ISO 27001, GDPR)
|
|
47
|
+
- `docs/rules/devops_ci_cd.md` (Shift-left pipelines, trunk-based CI, OCI distroless)
|
|
48
|
+
- `docs/rules/requirements_engineering.md` (INVEST user stories, Gherkin criteria)
|
|
49
|
+
|
|
50
|
+
### Step 4: Streamline Root AGENTS.md
|
|
51
|
+
Refactor root `AGENTS.md` to be strictly bounded:
|
|
52
|
+
1. **Mission Statement & Open-Source Mandate:** 1–2 sentences defining project domain, purpose, and 100% open-source requirement.
|
|
53
|
+
2. **Runtime & Scripts:** Declared package manager (Node >=18, recommended 24 / npm >=10) and core scripts.
|
|
54
|
+
3. **Core Operating Framework:** Zero-Assumption Rule, Relentless Questioning Loop, 5-stage lifecycle, action boundaries.
|
|
55
|
+
4. **Progressive Disclosure Index:** Markdown table mapping each domain to its `docs/rules/*.md` file.
|
|
56
|
+
|
|
57
|
+
### Step 5: Author Specialized Skills via Progressive Disclosure
|
|
58
|
+
When a task is complex, multi-step, or specialized, encapsulate it into `.agents/skills/<skill-name>/`:
|
|
59
|
+
1. **Front Matter:**
|
|
60
|
+
- `name`: kebab-case identifier.
|
|
61
|
+
- `description`: < 1024 characters. Must start with imperative `Use when...` defining exact trigger conditions and when NOT to use.
|
|
62
|
+
2. **Body:**
|
|
63
|
+
- Keep under 500 lines.
|
|
64
|
+
- Ground in verified project experience, not general documentation the AI already knows.
|
|
65
|
+
- Include a mandatory **"Gotchas & What NOT to Do"** section.
|
|
66
|
+
- Provide structured output templates.
|
|
67
|
+
3. **Progressive Subdirectories:**
|
|
68
|
+
- `references/`: Reference manuals loaded only on demand.
|
|
69
|
+
- `scripts/`: Deterministic code (bash/node) to prevent stochastic AI divergence.
|
|
70
|
+
- `resources/`: Static templates, lookup tables, and schemas.
|
|
71
|
+
- `examples/`: Reference implementations and code patterns.
|
|
72
|
+
|
|
73
|
+
### Step 6: Enforce Harness Parity via Symlinks
|
|
74
|
+
Prevent divergence across Claude Code, Google Antigravity, Cursor, Windsurf, and standard AGENTS.md:
|
|
75
|
+
```bash
|
|
76
|
+
ln -sf AGENTS.md CLAUDE.md
|
|
77
|
+
ln -sf AGENTS.md agents.md
|
|
78
|
+
ln -sf AGENTS.md GEMINI.md
|
|
79
|
+
ln -sf AGENTS.md .cursorrules
|
|
80
|
+
ln -sf AGENTS.md .windsurfrules
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 7: Apply the Continuous Refinement Loop
|
|
84
|
+
1. Save the initial raw AI output draft.
|
|
85
|
+
2. Produce the human-adjusted gold standard version.
|
|
86
|
+
3. Diff the two versions to identify repeated flaws or stylistic divergence.
|
|
87
|
+
4. Update the skill's "What NOT to Do" section with concrete negative examples.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 3. Gotchas & What NOT to Do
|
|
92
|
+
|
|
93
|
+
- **DO NOT** guess what a skill should do. Run the Relentless Skill Architecture Inquiry first.
|
|
94
|
+
- **DO NOT** author architectural rules or skills without a YAGNI Gate (Simple Baseline, Anti-Triggers, Empirical Tipping Point).
|
|
95
|
+
- **DO NOT** confuse battle-tested open-source libraries (shadcn, Tailwind, Zod, Lombok) with speculative custom over-engineering.
|
|
96
|
+
- **DO NOT** let root `AGENTS.md` exceed 120–150 lines. Every extra token degrades LLM attention.
|
|
97
|
+
- **DO NOT** write passive skill descriptions like `"Tanstack query documentation"`. Use `"Use when implementing Tanstack Query caches..."`.
|
|
98
|
+
- **DO NOT** include human "Getting Started" guides. Agents already have the workspace open.
|
|
99
|
+
- **DO NOT** hardcode individual file paths that change frequently. Reference architectural layers instead.
|
|
100
|
+
- **DO NOT** duplicate content across `CLAUDE.md` and `AGENTS.md`. Always use symbolic links.
|
|
101
|
+
- **DO NOT** add preemptive rules before the agent has actually made the mistake. Ground additions in real experience.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 4. Verification Checklist
|
|
106
|
+
|
|
107
|
+
Before finalizing any agent configuration update, verify:
|
|
108
|
+
- [ ] Relentless Skill Architecture Inquiry completed for all 7 branches.
|
|
109
|
+
- [ ] Architectural pattern rules and skills enforce the YAGNI Gate Triad (Baseline, Anti-Triggers, Tipping Point).
|
|
110
|
+
- [ ] Root `AGENTS.md` is under 120 lines and loads within minimal tokens.
|
|
111
|
+
- [ ] Specialized domain instructions are decoupled into `docs/rules/`.
|
|
112
|
+
- [ ] Progressive disclosure table in `AGENTS.md` contains valid, clickable markdown links.
|
|
113
|
+
- [ ] All skills have front matter with `name` and imperative `description` starting with `Use when...`.
|
|
114
|
+
- [ ] All skills are under 500 lines or offload sub-content to `references/`.
|
|
115
|
+
- [ ] Every skill contains a "Gotchas & What NOT to Do" section.
|
|
116
|
+
- [ ] Symlinks (`CLAUDE.md`, `agents.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`) resolve to `AGENTS.md`.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 5. Subdirectories & Progressive Resources
|
|
121
|
+
- [references/skill_architecture_inquiry.md](./references/skill_architecture_inquiry.md): The interactive 7-branch relentless questioning guide for skills.
|
|
122
|
+
- [references/agents_md_template.md](./references/agents_md_template.md): Boilerplate template for lean root and nested `AGENTS.md` files.
|
|
123
|
+
- [references/skill_template.md](./references/skill_template.md): Boilerplate template for authoring production-grade `SKILL.md` files.
|
|
124
|
+
- [references/refinement_workflow.md](./references/refinement_workflow.md): Step-by-step guide for capturing AI draft diffs against human edits to update skills.
|
|
125
|
+
- [scripts/validate_agentic_configs.sh](./scripts/validate_agentic_configs.sh): Deterministic Bash script validating front matter, line ceilings, link health, and symlink parity.
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
# Root & Nested AGENTS.md Template
|
|
2
|
-
|
|
3
|
-
Use this template when bootstrapping or restructuring an `AGENTS.md` file according to the progressive disclosure architecture.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
```markdown
|
|
8
|
-
# AGENTS.md
|
|
9
|
-
|
|
10
|
-
> **[Workspace / Package Name] Directives**
|
|
11
|
-
> **Rule Zero:** Assume nothing. Every action must be grounded in verified evidence from this workspace or direct instructions from the user.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 1. Project Overview & Environment
|
|
16
|
-
- **Purpose:** [1–2 sentences explaining what this project does and its core domain].
|
|
17
|
-
- **Runtime & Tools:** [e.g. Node 24 / npm 11, package manager, key global scripts].
|
|
18
|
-
- **High-Level Layout:**
|
|
19
|
-
- `apps/` — [High-level package boundaries].
|
|
20
|
-
- `packages/` — [Shared libraries/utilities].
|
|
21
|
-
- `docs/rules/` — [Modular progressive disclosure rules].
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 2. Core Operating Framework
|
|
26
|
-
- **Ground Truth Only:** A statement is only true if proven by a file, command output, or direct user instruction.
|
|
27
|
-
- **Relentless Questioning Loop:** Before acting, answer:
|
|
28
|
-
1. What is current state?
|
|
29
|
-
2. What is exact goal?
|
|
30
|
-
3. What tools are available?
|
|
31
|
-
4. What could break?
|
|
32
|
-
5. How will we prove it works?
|
|
33
|
-
- **Execution Stages:** `DISCOVER` ➔ `INTERROGATE` ➔ `PLAN` ➔ `EXECUTE` ➔ `VERIFY`.
|
|
34
|
-
- **Action Boundaries:**
|
|
35
|
-
- **ALWAYS:** Read before editing; verify commands before running; verify results with evidence.
|
|
36
|
-
- **ASK FIRST:** Adding dependencies, deleting files, modifying DB schemas or existing tests.
|
|
37
|
-
- **NEVER:** Guess paths or flags; silently ignore errors; import external assumptions.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## 3. Progressive Disclosure Rules
|
|
42
|
-
|
|
43
|
-
Read these specialized rule files on demand when performing relevant tasks:
|
|
44
|
-
|
|
45
|
-
| Domain | Rule Reference File | When to Consult |
|
|
46
|
-
|---|---|---|
|
|
47
|
-
| **Testing** | [docs/rules/test_driven_development.md](../../../../docs/rules/test_driven_development.md) | Writing acceptance/unit tests, coverage checks. |
|
|
48
|
-
| **Multi-Tenancy** | [docs/rules/multitenancy_architecture.md](../../../../docs/rules/multitenancy_architecture.md) | Tenant context resolution, PostgreSQL RLS. |
|
|
49
|
-
| **Database** | [docs/rules/database_design.md](../../../../docs/rules/database_design.md) | Relational integrity, ACID transactions, outbox pattern. |
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## 4. Harness Parity
|
|
54
|
-
Keep `AGENTS.md`, `CLAUDE.md`, `agents.md`, `GEMINI.md`, `.cursorrules`, and `.windsurfrules` in sync via filesystem symlinks:
|
|
55
|
-
```bash
|
|
56
|
-
ln -sf AGENTS.md CLAUDE.md
|
|
57
|
-
ln -sf AGENTS.md agents.md
|
|
58
|
-
ln -sf AGENTS.md GEMINI.md
|
|
59
|
-
ln -sf AGENTS.md .cursorrules
|
|
60
|
-
ln -sf AGENTS.md .windsurfrules
|
|
61
|
-
```
|
|
62
|
-
```
|
|
1
|
+
# Root & Nested AGENTS.md Template
|
|
2
|
+
|
|
3
|
+
Use this template when bootstrapping or restructuring an `AGENTS.md` file according to the progressive disclosure architecture.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# AGENTS.md
|
|
9
|
+
|
|
10
|
+
> **[Workspace / Package Name] Directives**
|
|
11
|
+
> **Rule Zero:** Assume nothing. Every action must be grounded in verified evidence from this workspace or direct instructions from the user.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Project Overview & Environment
|
|
16
|
+
- **Purpose:** [1–2 sentences explaining what this project does and its core domain].
|
|
17
|
+
- **Runtime & Tools:** [e.g. Node 24 / npm 11, package manager, key global scripts].
|
|
18
|
+
- **High-Level Layout:**
|
|
19
|
+
- `apps/` — [High-level package boundaries].
|
|
20
|
+
- `packages/` — [Shared libraries/utilities].
|
|
21
|
+
- `docs/rules/` — [Modular progressive disclosure rules].
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Core Operating Framework
|
|
26
|
+
- **Ground Truth Only:** A statement is only true if proven by a file, command output, or direct user instruction.
|
|
27
|
+
- **Relentless Questioning Loop:** Before acting, answer:
|
|
28
|
+
1. What is current state?
|
|
29
|
+
2. What is exact goal?
|
|
30
|
+
3. What tools are available?
|
|
31
|
+
4. What could break?
|
|
32
|
+
5. How will we prove it works?
|
|
33
|
+
- **Execution Stages:** `DISCOVER` ➔ `INTERROGATE` ➔ `PLAN` ➔ `EXECUTE` ➔ `VERIFY`.
|
|
34
|
+
- **Action Boundaries:**
|
|
35
|
+
- **ALWAYS:** Read before editing; verify commands before running; verify results with evidence.
|
|
36
|
+
- **ASK FIRST:** Adding dependencies, deleting files, modifying DB schemas or existing tests.
|
|
37
|
+
- **NEVER:** Guess paths or flags; silently ignore errors; import external assumptions.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 3. Progressive Disclosure Rules
|
|
42
|
+
|
|
43
|
+
Read these specialized rule files on demand when performing relevant tasks:
|
|
44
|
+
|
|
45
|
+
| Domain | Rule Reference File | When to Consult |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| **Testing** | [docs/rules/test_driven_development.md](../../../../docs/rules/test_driven_development.md) | Writing acceptance/unit tests, coverage checks. |
|
|
48
|
+
| **Multi-Tenancy** | [docs/rules/multitenancy_architecture.md](../../../../docs/rules/multitenancy_architecture.md) | Tenant context resolution, PostgreSQL RLS. |
|
|
49
|
+
| **Database** | [docs/rules/database_design.md](../../../../docs/rules/database_design.md) | Relational integrity, ACID transactions, outbox pattern. |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 4. Harness Parity
|
|
54
|
+
Keep `AGENTS.md`, `CLAUDE.md`, `agents.md`, `GEMINI.md`, `.cursorrules`, and `.windsurfrules` in sync via filesystem symlinks:
|
|
55
|
+
```bash
|
|
56
|
+
ln -sf AGENTS.md CLAUDE.md
|
|
57
|
+
ln -sf AGENTS.md agents.md
|
|
58
|
+
ln -sf AGENTS.md GEMINI.md
|
|
59
|
+
ln -sf AGENTS.md .cursorrules
|
|
60
|
+
ln -sf AGENTS.md .windsurfrules
|
|
61
|
+
```
|
|
62
|
+
```
|