@xaviele/ag-kit 1.0.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/README.md +20 -0
- package/bin/cli.js +63 -0
- package/package.json +27 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/template/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/template/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
- package/template/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- package/template/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
- package/template/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/template/.agent/.shared/ui-ux-pro-max/scripts/search.py +106 -0
- package/template/.agent/ARCHITECTURE.md +281 -0
- package/template/.agent/agents/backend-specialist.md +263 -0
- package/template/.agent/agents/code-archaeologist.md +106 -0
- package/template/.agent/agents/database-architect.md +226 -0
- package/template/.agent/agents/debugger.md +225 -0
- package/template/.agent/agents/devops-engineer.md +242 -0
- package/template/.agent/agents/documentation-writer.md +104 -0
- package/template/.agent/agents/explorer-agent.md +73 -0
- package/template/.agent/agents/frontend-specialist.md +593 -0
- package/template/.agent/agents/game-developer.md +162 -0
- package/template/.agent/agents/mobile-developer.md +377 -0
- package/template/.agent/agents/orchestrator.md +416 -0
- package/template/.agent/agents/penetration-tester.md +188 -0
- package/template/.agent/agents/performance-optimizer.md +187 -0
- package/template/.agent/agents/product-manager.md +112 -0
- package/template/.agent/agents/product-owner.md +95 -0
- package/template/.agent/agents/project-planner.md +406 -0
- package/template/.agent/agents/qa-automation-engineer.md +103 -0
- package/template/.agent/agents/security-auditor.md +170 -0
- package/template/.agent/agents/seo-specialist.md +111 -0
- package/template/.agent/agents/test-engineer.md +158 -0
- package/template/.agent/mcp_config.json +24 -0
- package/template/.agent/rules/GEMINI.md +273 -0
- package/template/.agent/scripts/auto_preview.py +148 -0
- package/template/.agent/scripts/checklist.py +217 -0
- package/template/.agent/scripts/session_manager.py +120 -0
- package/template/.agent/scripts/verify_all.py +327 -0
- package/template/.agent/skills/adr/SKILL.md +282 -0
- package/template/.agent/skills/alirezarezvani-code-to-prd/SKILL.md +499 -0
- package/template/.agent/skills/api-patterns/SKILL.md +81 -0
- package/template/.agent/skills/api-patterns/api-style.md +42 -0
- package/template/.agent/skills/api-patterns/auth.md +24 -0
- package/template/.agent/skills/api-patterns/documentation.md +26 -0
- package/template/.agent/skills/api-patterns/graphql.md +41 -0
- package/template/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/template/.agent/skills/api-patterns/response.md +37 -0
- package/template/.agent/skills/api-patterns/rest.md +40 -0
- package/template/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/template/.agent/skills/api-patterns/security-testing.md +122 -0
- package/template/.agent/skills/api-patterns/trpc.md +41 -0
- package/template/.agent/skills/api-patterns/versioning.md +22 -0
- package/template/.agent/skills/app-builder/SKILL.md +75 -0
- package/template/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/template/.agent/skills/app-builder/feature-building.md +53 -0
- package/template/.agent/skills/app-builder/project-detection.md +34 -0
- package/template/.agent/skills/app-builder/scaffolding.md +118 -0
- package/template/.agent/skills/app-builder/tech-stack.md +41 -0
- package/template/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/template/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/template/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/template/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/template/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/template/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/template/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/template/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/template/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/template/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/template/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/template/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/template/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/template/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/template/.agent/skills/architecture/SKILL.md +55 -0
- package/template/.agent/skills/architecture/context-discovery.md +43 -0
- package/template/.agent/skills/architecture/examples.md +94 -0
- package/template/.agent/skills/architecture/pattern-selection.md +68 -0
- package/template/.agent/skills/architecture/patterns-reference.md +50 -0
- package/template/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/template/.agent/skills/bash-linux/SKILL.md +199 -0
- package/template/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/template/.agent/skills/brainstorming/SKILL.md +163 -0
- package/template/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/template/.agent/skills/claudekit-ai-multimodal/SKILL.md +353 -0
- package/template/.agent/skills/clean-code/SKILL.md +201 -0
- package/template/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/template/.agent/skills/database-design/SKILL.md +52 -0
- package/template/.agent/skills/database-design/database-selection.md +43 -0
- package/template/.agent/skills/database-design/indexing.md +39 -0
- package/template/.agent/skills/database-design/migrations.md +48 -0
- package/template/.agent/skills/database-design/optimization.md +36 -0
- package/template/.agent/skills/database-design/orm-selection.md +30 -0
- package/template/.agent/skills/database-design/schema-design.md +56 -0
- package/template/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/template/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/template/.agent/skills/doc.md +177 -0
- package/template/.agent/skills/document/SKILL.md +250 -0
- package/template/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/template/.agent/skills/frontend-design/SKILL.md +452 -0
- package/template/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/template/.agent/skills/frontend-design/color-system.md +311 -0
- package/template/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/template/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/template/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/template/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/template/.agent/skills/frontend-design/typography-system.md +345 -0
- package/template/.agent/skills/frontend-design/ux-psychology.md +1116 -0
- package/template/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/template/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/template/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/template/.agent/skills/game-development/SKILL.md +167 -0
- package/template/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/template/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/template/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/template/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/template/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/template/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/template/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/template/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/template/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/template/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/template/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/template/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/template/.agent/skills/intelligent-routing/SKILL.md +335 -0
- package/template/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/template/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/template/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/template/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/template/.agent/skills/mindrally-meta-prompt/SKILL.md +129 -0
- package/template/.agent/skills/mobile-design/SKILL.md +394 -0
- package/template/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/template/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/template/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/template/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/template/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/template/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/template/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/template/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/template/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/template/.agent/skills/mobile-design/platform-android.md +666 -0
- package/template/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/template/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/template/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/template/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
- package/template/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/template/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/template/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/template/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/template/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/template/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/template/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/template/.agent/skills/nextjs-react-expert/9-cache-components.md +103 -0
- package/template/.agent/skills/nextjs-react-expert/SKILL.md +293 -0
- package/template/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/template/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/template/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/template/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/template/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/template/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/template/.agent/skills/plan-writing/SKILL.md +152 -0
- package/template/.agent/skills/pm-skills-create-prd/SKILL.md +88 -0
- package/template/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/template/.agent/skills/prompt-engineering/SKILL.md +566 -0
- package/template/.agent/skills/python-patterns/SKILL.md +441 -0
- package/template/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/template/.agent/skills/rust-pro/SKILL.md +176 -0
- package/template/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/template/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/template/.agent/skills/server-management/SKILL.md +161 -0
- package/template/.agent/skills/skills/adr/SKILL.md +282 -0
- package/template/.agent/skills/skills/alirezarezvani-code-to-prd/SKILL.md +499 -0
- package/template/.agent/skills/skills/claudekit-ai-multimodal/SKILL.md +353 -0
- package/template/.agent/skills/skills/document/SKILL.md +250 -0
- package/template/.agent/skills/skills/mindrally-meta-prompt/SKILL.md +129 -0
- package/template/.agent/skills/skills/pm-skills-create-prd/SKILL.md +88 -0
- package/template/.agent/skills/skills/prompt-engineering/SKILL.md +566 -0
- package/template/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/template/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/template/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/template/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/template/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/template/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/template/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/template/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/template/.agent/skills/web-design-guidelines/SKILL.md +57 -0
- package/template/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/template/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/template/.agent/skills/zalo-mini-app/SKILL.md +81 -0
- package/template/.agent/skills/zalo-mini-app/references/api-device.md +121 -0
- package/template/.agent/skills/zalo-mini-app/references/api-overview.md +88 -0
- package/template/.agent/skills/zalo-mini-app/references/api-storage.md +74 -0
- package/template/.agent/skills/zalo-mini-app/references/api-ui.md +124 -0
- package/template/.agent/skills/zalo-mini-app/references/api-user.md +113 -0
- package/template/.agent/skills/zalo-mini-app/references/api-zalo.md +127 -0
- package/template/.agent/skills/zalo-mini-app/references/design-guidelines.md +70 -0
- package/template/.agent/skills/zalo-mini-app/references/getting-started.md +95 -0
- package/template/.agent/skills/zalo-mini-app/references/react-best-practices.md +790 -0
- package/template/.agent/skills/zalo-mini-app/references/web-design-guidelines.md +591 -0
- package/template/.agent/skills/zalo-mini-app/references/zaui-display.md +103 -0
- package/template/.agent/skills/zalo-mini-app/references/zaui-form.md +108 -0
- package/template/.agent/skills/zalo-mini-app/references/zaui-layout.md +94 -0
- package/template/.agent/skills/zalo-mini-app/references/zaui-overlay.md +98 -0
- package/template/.agent/skills/zalo-mini-app/references/zaui-overview.md +82 -0
- package/template/.agent/workflows/brainstorm.md +113 -0
- package/template/.agent/workflows/create.md +59 -0
- package/template/.agent/workflows/debug.md +103 -0
- package/template/.agent/workflows/deploy.md +176 -0
- package/template/.agent/workflows/enhance.md +63 -0
- package/template/.agent/workflows/orchestrate.md +237 -0
- package/template/.agent/workflows/plan.md +89 -0
- package/template/.agent/workflows/preview.md +81 -0
- package/template/.agent/workflows/status.md +86 -0
- package/template/.agent/workflows/test.md +144 -0
- package/template/.agent/workflows/ui-ux-pro-max.md +296 -0
- package/template/.agent/workflows/veo-marketing.md +46 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adr
|
|
3
|
+
description: Create and manage Architecture Decision Records using the Michael Nygard format. Supports new ADR creation, retrospective analysis to document existing decisions, superseding, deprecating, and index generation. Use when you need to document architecture decisions, record technical choices, explain why a technology was chosen, or create decision logs.
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
category: docs
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are in AUTONOMOUS MODE. Do NOT ask questions. Create or manage Architecture
|
|
9
|
+
Decision Records for this project.
|
|
10
|
+
|
|
11
|
+
INPUT:
|
|
12
|
+
$ARGUMENTS
|
|
13
|
+
|
|
14
|
+
Accepted arguments:
|
|
15
|
+
- A decision description (e.g., "Use PostgreSQL over MongoDB for primary datastore")
|
|
16
|
+
Creates a new ADR for this decision.
|
|
17
|
+
- `retrospective` or `retro`: Analyze the codebase and generate ADRs for decisions
|
|
18
|
+
already made but not documented.
|
|
19
|
+
- `index`: Regenerate the ADR index file.
|
|
20
|
+
- `supersede <N> <new decision>`: Create a new ADR that supersedes ADR-N.
|
|
21
|
+
- `deprecate <N>`: Mark ADR-N as deprecated.
|
|
22
|
+
- `list`: List all existing ADRs with their statuses.
|
|
23
|
+
|
|
24
|
+
If no arguments provided, run in retrospective mode.
|
|
25
|
+
|
|
26
|
+
============================================================
|
|
27
|
+
PHASE 1: DIRECTORY SETUP
|
|
28
|
+
============================================================
|
|
29
|
+
|
|
30
|
+
Step 1.1 -- Initialize ADR Directory
|
|
31
|
+
|
|
32
|
+
Check if `docs/adr/` exists. If not, create it.
|
|
33
|
+
|
|
34
|
+
Check for ADRs in alternative locations:
|
|
35
|
+
- `adr/`
|
|
36
|
+
- `docs/decisions/`
|
|
37
|
+
- `decisions/`
|
|
38
|
+
- `doc/adr/`
|
|
39
|
+
|
|
40
|
+
If found in an alternative location, use that location instead of creating a new one.
|
|
41
|
+
|
|
42
|
+
Step 1.2 -- Determine Next ADR Number
|
|
43
|
+
|
|
44
|
+
Scan existing ADR files matching the pattern `NNNN-*.md` (e.g., `0001-use-postgresql.md`).
|
|
45
|
+
Find the highest number and increment by 1 for the next ADR.
|
|
46
|
+
If no ADRs exist, start at 0001.
|
|
47
|
+
|
|
48
|
+
Step 1.3 -- Read Existing ADRs
|
|
49
|
+
|
|
50
|
+
Read all existing ADR files to understand:
|
|
51
|
+
- What decisions have already been documented
|
|
52
|
+
- Current statuses (proposed, accepted, deprecated, superseded)
|
|
53
|
+
- Cross-references between ADRs
|
|
54
|
+
|
|
55
|
+
============================================================
|
|
56
|
+
PHASE 2: NEW ADR CREATION
|
|
57
|
+
============================================================
|
|
58
|
+
|
|
59
|
+
When creating a new ADR from a decision description:
|
|
60
|
+
|
|
61
|
+
Step 2.1 -- Research the Decision
|
|
62
|
+
|
|
63
|
+
Analyze the codebase to gather context for the decision:
|
|
64
|
+
- Read config files related to the technology choice
|
|
65
|
+
- Look for alternatives that were considered (comments, TODOs, removed code)
|
|
66
|
+
- Identify what the decision affects (which files, modules, services)
|
|
67
|
+
- Check git history for when the decision was implemented
|
|
68
|
+
|
|
69
|
+
Step 2.2 -- Write ADR
|
|
70
|
+
|
|
71
|
+
Use the Michael Nygard format:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
# [ADR-NNNN] [Title: Short Decision Statement]
|
|
75
|
+
|
|
76
|
+
**Date:** YYYY-MM-DD
|
|
77
|
+
|
|
78
|
+
**Status:** [proposed | accepted | deprecated | superseded by [ADR-XXXX](XXXX-title.md)]
|
|
79
|
+
|
|
80
|
+
## Context
|
|
81
|
+
|
|
82
|
+
[What is the issue that we're seeing that is motivating this decision or change?
|
|
83
|
+
Describe the forces at play: technical, political, social, project-specific.
|
|
84
|
+
These forces are likely in tension and should be called out as such.
|
|
85
|
+
State facts, not opinions. 2-4 paragraphs.]
|
|
86
|
+
|
|
87
|
+
## Decision
|
|
88
|
+
|
|
89
|
+
[What is the change that we're proposing and/or doing?
|
|
90
|
+
State the decision clearly and unambiguously.
|
|
91
|
+
Use active voice: "We will use X" not "X should be used."
|
|
92
|
+
1-2 paragraphs.]
|
|
93
|
+
|
|
94
|
+
## Consequences
|
|
95
|
+
|
|
96
|
+
[What becomes easier or more difficult to do because of this change?
|
|
97
|
+
Include both positive and negative consequences.
|
|
98
|
+
Be honest about trade-offs.
|
|
99
|
+
|
|
100
|
+
**Positive:**
|
|
101
|
+
- [consequence]
|
|
102
|
+
- [consequence]
|
|
103
|
+
|
|
104
|
+
**Negative:**
|
|
105
|
+
- [consequence]
|
|
106
|
+
- [consequence]
|
|
107
|
+
|
|
108
|
+
**Neutral:**
|
|
109
|
+
- [consequence]
|
|
110
|
+
]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Step 2.3 -- File Naming
|
|
114
|
+
|
|
115
|
+
Name the file: `NNNN-kebab-case-title.md`
|
|
116
|
+
- NNNN is zero-padded to 4 digits
|
|
117
|
+
- Title is derived from the decision, converted to kebab-case
|
|
118
|
+
- Keep filename under 60 characters
|
|
119
|
+
- Example: `0003-use-postgresql-for-primary-datastore.md`
|
|
120
|
+
|
|
121
|
+
============================================================
|
|
122
|
+
PHASE 3: RETROSPECTIVE MODE
|
|
123
|
+
============================================================
|
|
124
|
+
|
|
125
|
+
When running in retrospective mode, analyze the codebase to infer
|
|
126
|
+
architectural decisions that were made but never documented:
|
|
127
|
+
|
|
128
|
+
Step 3.1 -- Detect Decisions
|
|
129
|
+
|
|
130
|
+
Scan for these categories of decisions:
|
|
131
|
+
|
|
132
|
+
| Category | What to Look For |
|
|
133
|
+
|----------|-----------------|
|
|
134
|
+
| Language/Runtime | Primary language, runtime version constraints |
|
|
135
|
+
| Framework | Web framework, UI framework, CLI framework choice |
|
|
136
|
+
| Database | Database type, ORM/query builder choice |
|
|
137
|
+
| Auth | Authentication strategy, provider choice |
|
|
138
|
+
| State Management | State management library/pattern |
|
|
139
|
+
| API Style | REST vs GraphQL vs gRPC, API versioning strategy |
|
|
140
|
+
| Infrastructure | Docker, K8s, serverless, cloud provider |
|
|
141
|
+
| CI/CD | Pipeline tool, deployment strategy |
|
|
142
|
+
| Testing | Test framework, testing strategy (unit/integration/e2e) |
|
|
143
|
+
| Monorepo vs Polyrepo | Repository structure decision |
|
|
144
|
+
| Dependency Management | Package manager, lockfile strategy |
|
|
145
|
+
| Code Style | Linter, formatter, style guide |
|
|
146
|
+
| Error Handling | Error handling strategy, logging approach |
|
|
147
|
+
| Caching | Caching strategy, cache provider |
|
|
148
|
+
|
|
149
|
+
Step 3.2 -- Generate ADRs
|
|
150
|
+
|
|
151
|
+
For each detected decision:
|
|
152
|
+
1. Determine if an ADR already exists for this decision
|
|
153
|
+
2. If not, create one with status "accepted" and today's date
|
|
154
|
+
3. In the Context section, note that this is a retrospective ADR:
|
|
155
|
+
"This ADR was created retrospectively to document a decision already in effect."
|
|
156
|
+
4. Infer context from the codebase (why this choice likely was made)
|
|
157
|
+
5. Document consequences based on how the choice has played out
|
|
158
|
+
|
|
159
|
+
Step 3.3 -- Prioritize
|
|
160
|
+
|
|
161
|
+
Generate retrospective ADRs in priority order:
|
|
162
|
+
1. Framework and language choices (highest architectural impact)
|
|
163
|
+
2. Database and data layer decisions
|
|
164
|
+
3. Authentication and security patterns
|
|
165
|
+
4. Infrastructure and deployment choices
|
|
166
|
+
5. Testing and code quality decisions
|
|
167
|
+
|
|
168
|
+
============================================================
|
|
169
|
+
PHASE 4: INDEX GENERATION
|
|
170
|
+
============================================================
|
|
171
|
+
|
|
172
|
+
Generate or update `docs/adr/README.md` (or `docs/adr/index.md`):
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
# Architecture Decision Records
|
|
176
|
+
|
|
177
|
+
This directory contains Architecture Decision Records (ADRs) for [Project Name].
|
|
178
|
+
|
|
179
|
+
## What is an ADR?
|
|
180
|
+
|
|
181
|
+
An ADR is a short document that captures an important architectural decision
|
|
182
|
+
made along with its context and consequences.
|
|
183
|
+
|
|
184
|
+
## ADR Index
|
|
185
|
+
|
|
186
|
+
| # | Title | Status | Date |
|
|
187
|
+
|---|-------|--------|------|
|
|
188
|
+
| [0001](0001-title.md) | Title | Accepted | YYYY-MM-DD |
|
|
189
|
+
| [0002](0002-title.md) | Title | Superseded by [0003](0003-title.md) | YYYY-MM-DD |
|
|
190
|
+
| ... | ... | ... | ... |
|
|
191
|
+
|
|
192
|
+
## Statuses
|
|
193
|
+
|
|
194
|
+
- **Proposed** -- Under discussion, not yet decided
|
|
195
|
+
- **Accepted** -- Decision has been made and is in effect
|
|
196
|
+
- **Deprecated** -- Decision is no longer relevant
|
|
197
|
+
- **Superseded** -- Replaced by a newer decision (linked)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
============================================================
|
|
202
|
+
SELF-HEALING VALIDATION (max 2 iterations)
|
|
203
|
+
============================================================
|
|
204
|
+
|
|
205
|
+
After producing documentation, validate completeness:
|
|
206
|
+
|
|
207
|
+
1. Verify all required sections are present and non-empty.
|
|
208
|
+
2. Verify internal cross-references and links resolve correctly.
|
|
209
|
+
3. Verify no placeholder text remains ("{TODO}", "[TBD]", "...", "etc.").
|
|
210
|
+
4. Verify code examples are syntactically valid.
|
|
211
|
+
|
|
212
|
+
IF VALIDATION FAILS:
|
|
213
|
+
- Identify which sections are incomplete or contain placeholders
|
|
214
|
+
- Re-generate only the deficient sections
|
|
215
|
+
- Repeat up to 2 iterations
|
|
216
|
+
|
|
217
|
+
============================================================
|
|
218
|
+
OUTPUT
|
|
219
|
+
============================================================
|
|
220
|
+
|
|
221
|
+
## ADR Report
|
|
222
|
+
|
|
223
|
+
### Action Taken
|
|
224
|
+
- **Mode:** [New ADR / Retrospective / Index / Supersede / Deprecate]
|
|
225
|
+
- **ADRs Created:** N
|
|
226
|
+
- **ADRs Updated:** N
|
|
227
|
+
- **Total ADRs:** N
|
|
228
|
+
|
|
229
|
+
### ADR Summary
|
|
230
|
+
|
|
231
|
+
| # | Title | Status | Date |
|
|
232
|
+
|---|-------|--------|------|
|
|
233
|
+
| NNNN | Title | Status | Date |
|
|
234
|
+
| ... | ... | ... | ... |
|
|
235
|
+
|
|
236
|
+
### Files Written
|
|
237
|
+
- `docs/adr/NNNN-title.md` -- [description]
|
|
238
|
+
- `docs/adr/README.md` -- Updated index
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
============================================================
|
|
242
|
+
SELF-EVOLUTION TELEMETRY
|
|
243
|
+
============================================================
|
|
244
|
+
|
|
245
|
+
After producing output, record execution metadata for the /evolve pipeline.
|
|
246
|
+
|
|
247
|
+
Check if a project memory directory exists:
|
|
248
|
+
- Look for the project path in `~/.claude/projects/`
|
|
249
|
+
- If found, append to `skill-telemetry.md` in that memory directory
|
|
250
|
+
|
|
251
|
+
Entry format:
|
|
252
|
+
```
|
|
253
|
+
### /adr — {{YYYY-MM-DD}}
|
|
254
|
+
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
|
|
255
|
+
- Self-healed: {{yes — what was healed | no}}
|
|
256
|
+
- Iterations used: {{N}} / {{N max}}
|
|
257
|
+
- Bottleneck: {{phase that struggled or "none"}}
|
|
258
|
+
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Only log if the memory directory exists. Skip silently if not found.
|
|
262
|
+
Keep entries concise — /evolve will parse these for skill improvement signals.
|
|
263
|
+
|
|
264
|
+
============================================================
|
|
265
|
+
DO NOT
|
|
266
|
+
============================================================
|
|
267
|
+
|
|
268
|
+
- Do NOT fabricate technical context. Only document decisions that are
|
|
269
|
+
evident from the codebase.
|
|
270
|
+
- Do NOT create ADRs for trivial decisions (e.g., "use prettier for formatting"
|
|
271
|
+
is too small; "adopt Prettier + ESLint with specific rule overrides" is worth documenting).
|
|
272
|
+
- Do NOT create duplicate ADRs for decisions already documented.
|
|
273
|
+
- Do NOT change the status of existing ADRs unless explicitly asked.
|
|
274
|
+
- Do NOT use ADR numbers that are already taken.
|
|
275
|
+
- Do NOT include opinions in the Context section -- state facts and forces.
|
|
276
|
+
|
|
277
|
+
NEXT STEPS:
|
|
278
|
+
|
|
279
|
+
After creating ADRs:
|
|
280
|
+
- "Run `/document` to check overall documentation health."
|
|
281
|
+
- "Run `/diagram` to generate architecture diagrams that complement these ADRs."
|
|
282
|
+
- "Run `/arch-review` to review the architecture decisions for consistency."
|