@qazuor/claude-code-config 0.1.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/LICENSE +21 -0
- package/README.md +1248 -0
- package/dist/bin.cjs +11886 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +11869 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.cjs +3887 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1325 -0
- package/dist/index.d.ts +1325 -0
- package/dist/index.js +3835 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -0
- package/templates/.log/notifications.log +1775 -0
- package/templates/agents/README.md +164 -0
- package/templates/agents/_registry.json +443 -0
- package/templates/agents/design/content-writer.md +353 -0
- package/templates/agents/design/ux-ui-designer.md +382 -0
- package/templates/agents/engineering/astro-engineer.md +293 -0
- package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
- package/templates/agents/engineering/express-engineer.md +316 -0
- package/templates/agents/engineering/fastify-engineer.md +399 -0
- package/templates/agents/engineering/hono-engineer.md +263 -0
- package/templates/agents/engineering/mongoose-engineer.md +473 -0
- package/templates/agents/engineering/nestjs-engineer.md +429 -0
- package/templates/agents/engineering/nextjs-engineer.md +451 -0
- package/templates/agents/engineering/node-typescript-engineer.md +347 -0
- package/templates/agents/engineering/prisma-engineer.md +432 -0
- package/templates/agents/engineering/react-senior-dev.md +394 -0
- package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
- package/templates/agents/engineering/tech-lead.md +269 -0
- package/templates/agents/product/product-functional.md +329 -0
- package/templates/agents/product/product-technical.md +578 -0
- package/templates/agents/quality/debugger.md +514 -0
- package/templates/agents/quality/qa-engineer.md +390 -0
- package/templates/agents/specialized/enrichment-agent.md +277 -0
- package/templates/agents/specialized/i18n-specialist.md +322 -0
- package/templates/agents/specialized/seo-ai-specialist.md +387 -0
- package/templates/agents/specialized/tech-writer.md +300 -0
- package/templates/code-style/.editorconfig +27 -0
- package/templates/code-style/.prettierignore +25 -0
- package/templates/code-style/.prettierrc +12 -0
- package/templates/code-style/biome.json +78 -0
- package/templates/code-style/commitlint.config.js +44 -0
- package/templates/commands/README.md +175 -0
- package/templates/commands/_registry.json +420 -0
- package/templates/commands/add-new-entity.md +211 -0
- package/templates/commands/audit/accessibility-audit.md +360 -0
- package/templates/commands/audit/performance-audit.md +290 -0
- package/templates/commands/audit/security-audit.md +231 -0
- package/templates/commands/code-check.md +127 -0
- package/templates/commands/five-why.md +225 -0
- package/templates/commands/formatting/format-markdown.md +197 -0
- package/templates/commands/git/commit.md +247 -0
- package/templates/commands/meta/create-agent.md +257 -0
- package/templates/commands/meta/create-command.md +312 -0
- package/templates/commands/meta/create-skill.md +321 -0
- package/templates/commands/meta/help.md +318 -0
- package/templates/commands/planning/check-completed-tasks.md +224 -0
- package/templates/commands/planning/cleanup-issues.md +248 -0
- package/templates/commands/planning/planning-cleanup.md +251 -0
- package/templates/commands/planning/sync-planning-github.md +133 -0
- package/templates/commands/planning/sync-todos-github.md +203 -0
- package/templates/commands/quality-check.md +211 -0
- package/templates/commands/run-tests.md +159 -0
- package/templates/commands/start-feature-plan.md +232 -0
- package/templates/commands/start-refactor-plan.md +244 -0
- package/templates/commands/sync-planning.md +176 -0
- package/templates/commands/update-docs.md +242 -0
- package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
- package/templates/docs/INDEX.md +677 -0
- package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
- package/templates/docs/_registry.json +329 -0
- package/templates/docs/diagrams/README.md +220 -0
- package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
- package/templates/docs/diagrams/documentation-map.mmd +61 -0
- package/templates/docs/diagrams/tools-relationship.mmd +55 -0
- package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
- package/templates/docs/doc-sync.md +533 -0
- package/templates/docs/examples/end-to-end-workflow.md +1505 -0
- package/templates/docs/glossary.md +495 -0
- package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
- package/templates/docs/guides/mockup-setup.md +737 -0
- package/templates/docs/learnings/README.md +250 -0
- package/templates/docs/learnings/common-architectural-patterns.md +123 -0
- package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
- package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
- package/templates/docs/learnings/monorepo-command-execution.md +64 -0
- package/templates/docs/learnings/optimization-tips.md +146 -0
- package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
- package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
- package/templates/docs/learnings/test-organization-structure.md +68 -0
- package/templates/docs/mcp-installation.md +613 -0
- package/templates/docs/mcp-servers.md +989 -0
- package/templates/docs/notification-installation.md +570 -0
- package/templates/docs/quick-start.md +354 -0
- package/templates/docs/standards/architecture-patterns.md +1064 -0
- package/templates/docs/standards/atomic-commits.md +513 -0
- package/templates/docs/standards/code-standards.md +993 -0
- package/templates/docs/standards/design-standards.md +656 -0
- package/templates/docs/standards/documentation-standards.md +1160 -0
- package/templates/docs/standards/testing-standards.md +969 -0
- package/templates/docs/system-maintenance.md +604 -0
- package/templates/docs/templates/PDR-template.md +561 -0
- package/templates/docs/templates/TODOs-template.md +534 -0
- package/templates/docs/templates/tech-analysis-template.md +800 -0
- package/templates/docs/workflows/README.md +519 -0
- package/templates/docs/workflows/atomic-task-protocol.md +955 -0
- package/templates/docs/workflows/decision-tree.md +482 -0
- package/templates/docs/workflows/edge-cases.md +856 -0
- package/templates/docs/workflows/phase-1-planning.md +957 -0
- package/templates/docs/workflows/phase-2-implementation.md +896 -0
- package/templates/docs/workflows/phase-3-validation.md +792 -0
- package/templates/docs/workflows/phase-4-finalization.md +927 -0
- package/templates/docs/workflows/quick-fix-protocol.md +505 -0
- package/templates/docs/workflows/task-atomization.md +537 -0
- package/templates/docs/workflows/task-completion-protocol.md +448 -0
- package/templates/hooks/on-notification.sh +28 -0
- package/templates/schemas/checkpoint.schema.json +97 -0
- package/templates/schemas/code-registry.schema.json +84 -0
- package/templates/schemas/pdr.schema.json +314 -0
- package/templates/schemas/problems.schema.json +55 -0
- package/templates/schemas/tech-analysis.schema.json +404 -0
- package/templates/schemas/telemetry.schema.json +298 -0
- package/templates/schemas/todos.schema.json +234 -0
- package/templates/schemas/workflows.schema.json +69 -0
- package/templates/scripts/add-changelogs.sh +105 -0
- package/templates/scripts/generate-code-registry.ts +270 -0
- package/templates/scripts/health-check.sh +343 -0
- package/templates/scripts/sync-registry.sh +40 -0
- package/templates/scripts/telemetry-report.ts +36 -0
- package/templates/scripts/validate-docs.sh +224 -0
- package/templates/scripts/validate-registry.sh +225 -0
- package/templates/scripts/validate-schemas.ts +283 -0
- package/templates/scripts/validate-structure.sh +165 -0
- package/templates/scripts/worktree-cleanup.sh +81 -0
- package/templates/scripts/worktree-create.sh +63 -0
- package/templates/sessions/planning/.gitkeep +0 -0
- package/templates/sessions/planning/archived/.gitkeep +0 -0
- package/templates/settings.json +202 -0
- package/templates/settings.local.json +138 -0
- package/templates/skills/README.md +197 -0
- package/templates/skills/_registry.json +473 -0
- package/templates/skills/audit/accessibility-audit.md +309 -0
- package/templates/skills/audit/performance-audit.md +257 -0
- package/templates/skills/audit/security-audit.md +217 -0
- package/templates/skills/auth/nextauth-patterns.md +308 -0
- package/templates/skills/brand-guidelines.md +240 -0
- package/templates/skills/documentation/markdown-formatter.md +302 -0
- package/templates/skills/git/git-commit-helper.md +321 -0
- package/templates/skills/i18n/i18n-patterns.md +251 -0
- package/templates/skills/patterns/error-handling-patterns.md +242 -0
- package/templates/skills/patterns/tdd-methodology.md +342 -0
- package/templates/skills/qa/qa-criteria-validator.md +383 -0
- package/templates/skills/qa/web-app-testing.md +398 -0
- package/templates/skills/react/react-hook-form-patterns.md +359 -0
- package/templates/skills/state/redux-toolkit-patterns.md +272 -0
- package/templates/skills/state/tanstack-query-patterns.md +299 -0
- package/templates/skills/state/zustand-patterns.md +301 -0
- package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
- package/templates/skills/tech/shadcn-specialist.md +252 -0
- package/templates/skills/tech/vercel-specialist.md +297 -0
- package/templates/skills/testing/api-app-testing.md +254 -0
- package/templates/skills/testing/performance-testing.md +275 -0
- package/templates/skills/testing/security-testing.md +348 -0
- package/templates/skills/utils/add-memory.md +295 -0
- package/templates/skills/utils/json-data-auditor.md +283 -0
- package/templates/skills/utils/pdf-creator-editor.md +342 -0
- package/templates/tools/format-markdown.sh +185 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
%%{init: {'theme':'base', 'themeVariables': {'primaryColor':'#3B82F6','primaryTextColor':'#fff','primaryBorderColor':'#2563EB','lineColor':'#6B7280','secondaryColor':'#10B981','tertiaryColor':'#F59E0B'}}}%%
|
|
2
|
+
flowchart LR
|
|
3
|
+
%% Commands Layer
|
|
4
|
+
subgraph Commands ["/commands (16)"]
|
|
5
|
+
direction TB
|
|
6
|
+
QualityCmd["/quality-check<br/>/code-check"]
|
|
7
|
+
PlanningCmd["/start-feature-plan<br/>/start-refactor-plan"]
|
|
8
|
+
AuditCmd["/security-audit<br/>/performance-audit<br/>/accessibility-audit"]
|
|
9
|
+
MetaCmd["/create-agent<br/>/create-command<br/>/create-skill<br/>/help"]
|
|
10
|
+
DevCmd["/add-new-entity<br/>/update-docs<br/>/commit"]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
%% Agents Layer
|
|
14
|
+
subgraph Agents ["Agents (14)"]
|
|
15
|
+
direction TB
|
|
16
|
+
LeadAgents[tech-lead<br/>product-functional<br/>product-technical]
|
|
17
|
+
BackendAgents[hono-engineer<br/>db-engineer<br/>node-typescript-engineer]
|
|
18
|
+
FrontendAgents[astro-engineer<br/>tanstack-start-engineer<br/>react-senior-dev]
|
|
19
|
+
DesignAgents[ux-ui-designer<br/>content-writer]
|
|
20
|
+
QualityAgents[qa-engineer<br/>debugger]
|
|
21
|
+
SupportAgents[tech-writer<br/>i18n-specialist<br/>seo-ai-specialist<br/>enrichment-agent]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
%% Skills Layer
|
|
25
|
+
subgraph Skills ["Skills (16)"]
|
|
26
|
+
direction TB
|
|
27
|
+
TestingSkills[Testing & Quality 6:<br/>web-app-testing<br/>api-app-testing<br/>performance-testing<br/>security-testing<br/>tdd-methodology<br/>qa-criteria-validator]
|
|
28
|
+
DevSkills[Development Tools 5:<br/>git-commit-helper<br/>vercel-specialist<br/>shadcn-specialist<br/>mermaid-diagram-specialist<br/>add-memory]
|
|
29
|
+
DesignSkills[Design & Patterns 3:<br/>brand-guidelines<br/>error-handling-patterns<br/>markdown-formatter]
|
|
30
|
+
UtilSkills[Documentation & Utils 2:<br/>pdf-creator-editor<br/>json-data-auditor]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
%% Relationships
|
|
34
|
+
Commands -->|invoke| Agents
|
|
35
|
+
Agents -->|use| Skills
|
|
36
|
+
|
|
37
|
+
QualityCmd -.->|uses| QualityAgents
|
|
38
|
+
PlanningCmd -.->|uses| LeadAgents
|
|
39
|
+
AuditCmd -.->|tech-lead coordinates| TestingSkills
|
|
40
|
+
DevCmd -.->|uses| BackendAgents
|
|
41
|
+
DevCmd -.->|uses| FrontendAgents
|
|
42
|
+
|
|
43
|
+
LeadAgents -.->|invokes| DevSkills
|
|
44
|
+
BackendAgents -.->|invokes| TestingSkills
|
|
45
|
+
FrontendAgents -.->|invokes| DesignSkills
|
|
46
|
+
QualityAgents -.->|invokes| TestingSkills
|
|
47
|
+
SupportAgents -.->|invokes| UtilSkills
|
|
48
|
+
|
|
49
|
+
classDef commandClass fill:#8B5CF6,stroke:#7C3AED,color:#fff
|
|
50
|
+
classDef agentClass fill:#3B82F6,stroke:#2563EB,color:#fff
|
|
51
|
+
classDef skillClass fill:#10B981,stroke:#059669,color:#fff
|
|
52
|
+
|
|
53
|
+
class Commands,QualityCmd,PlanningCmd,AuditCmd,MetaCmd,DevCmd commandClass
|
|
54
|
+
class Agents,LeadAgents,BackendAgents,FrontendAgents,QualityAgents,SupportAgents agentClass
|
|
55
|
+
class Skills,TestingSkills,DevSkills,DesignSkills,UtilSkills skillClass
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
%%{init: {'theme':'base', 'themeVariables': {'primaryColor':'#3B82F6','primaryTextColor':'#fff','primaryBorderColor':'#2563EB','lineColor':'#6B7280','secondaryColor':'#10B981','tertiaryColor':'#F59E0B'}}}%%
|
|
2
|
+
flowchart TD
|
|
3
|
+
Start([New Task/Issue]) --> Assess{Assess<br/>Task}
|
|
4
|
+
|
|
5
|
+
%% Quick Fix Path
|
|
6
|
+
Assess --> QuickCheck{< 30 min<br/>1-2 files<br/>Very low risk?}
|
|
7
|
+
QuickCheck -->|Yes| QuickFix[Level 1: Quick Fix]
|
|
8
|
+
QuickFix --> QuickSteps[6 Steps:<br/>1. Verify<br/>2. Change<br/>3. Validate<br/>4. Commit<br/>5. Push<br/>6. Done]
|
|
9
|
+
QuickSteps --> QuickEnd([Complete!])
|
|
10
|
+
|
|
11
|
+
%% Atomic Task Path
|
|
12
|
+
QuickCheck -->|No| AtomicCheck{30min-3h<br/>2-10 files<br/>Low-med risk?}
|
|
13
|
+
AtomicCheck -->|Yes| Atomic[Level 2: Atomic Task]
|
|
14
|
+
Atomic --> AtomicSteps[11 Steps:<br/>1. Create PB-XXX<br/>2. Tech Analysis<br/>3. Review<br/>4. Tests RED<br/>5. Implement GREEN<br/>6. Refactor<br/>7. Docs<br/>8. Coverage<br/>9. Quality<br/>10. Commit<br/>11. Registry]
|
|
15
|
+
AtomicSteps --> AtomicEnd([Complete!])
|
|
16
|
+
|
|
17
|
+
%% Feature Planning Path
|
|
18
|
+
AtomicCheck -->|No| FeatureCheck{Multi-day<br/>Architecture<br/>DB changes?}
|
|
19
|
+
FeatureCheck -->|Yes| Feature[Level 3: Feature Planning]
|
|
20
|
+
Feature --> FeatureSteps[4 Phases:<br/>Phase 1: Planning<br/>Phase 2: Implementation<br/>Phase 3: Validation<br/>Phase 4: Finalization]
|
|
21
|
+
FeatureSteps --> FeatureEnd([Complete!])
|
|
22
|
+
|
|
23
|
+
%% Error handling
|
|
24
|
+
FeatureCheck -->|Unclear| Clarify{Need more<br/>information?}
|
|
25
|
+
Clarify -->|Yes| Gather[Gather Requirements]
|
|
26
|
+
Gather --> Assess
|
|
27
|
+
Clarify -->|No| DefaultPath[Use Level 2<br/>when uncertain]
|
|
28
|
+
DefaultPath --> Atomic
|
|
29
|
+
|
|
30
|
+
classDef quickClass fill:#10B981,stroke:#059669,color:#fff
|
|
31
|
+
classDef atomicClass fill:#F59E0B,stroke:#D97706,color:#fff
|
|
32
|
+
classDef featureClass fill:#3B82F6,stroke:#2563EB,color:#fff
|
|
33
|
+
classDef decisionClass fill:#8B5CF6,stroke:#7C3AED,color:#fff
|
|
34
|
+
|
|
35
|
+
class QuickFix,QuickSteps,QuickEnd quickClass
|
|
36
|
+
class Atomic,AtomicSteps,AtomicEnd atomicClass
|
|
37
|
+
class Feature,FeatureSteps,FeatureEnd featureClass
|
|
38
|
+
class QuickCheck,AtomicCheck,FeatureCheck,Clarify decisionClass
|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
# Documentation Sync Process
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This guide explains how to keep documentation synchronized across the system, validate consistency, and maintain quality standards. It covers the validation process, sync scripts, and a comprehensive checklist for documentation updates.
|
|
6
|
+
|
|
7
|
+
**Purpose**: Ensure all documentation is accurate, up-to-date, and properly cross-referenced.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Table of Contents
|
|
12
|
+
|
|
13
|
+
<!-- markdownlint-disable MD051 -->
|
|
14
|
+
|
|
15
|
+
1. [Documentation Structure](#documentation-structure)
|
|
16
|
+
2. [Validation Process](#validation-process)
|
|
17
|
+
3. [Sync Scripts](#sync-scripts)
|
|
18
|
+
4. [Update Checklist](#update-checklist)
|
|
19
|
+
5. [Common Sync Issues](#common-sync-issues)
|
|
20
|
+
6. [Automation](#automation)
|
|
21
|
+
|
|
22
|
+
<!-- markdownlint-enable MD051 -->
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Documentation Structure
|
|
27
|
+
|
|
28
|
+
### Documentation Hierarchy
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
.claude/
|
|
32
|
+
├── agents/ # 14 agent definitions
|
|
33
|
+
│ ├── engineering/
|
|
34
|
+
│ ├── specialized/
|
|
35
|
+
│ ├── management/
|
|
36
|
+
│ └── README.md
|
|
37
|
+
├── commands/ # 16 command definitions
|
|
38
|
+
│ ├── audit/
|
|
39
|
+
│ ├── formatting/
|
|
40
|
+
│ ├── git/
|
|
41
|
+
│ ├── meta/
|
|
42
|
+
│ └── README.md
|
|
43
|
+
├── skills/ # 16 skill definitions
|
|
44
|
+
│ ├── brand/
|
|
45
|
+
│ ├── git/
|
|
46
|
+
│ ├── patterns/
|
|
47
|
+
│ ├── tech/
|
|
48
|
+
│ ├── testing/
|
|
49
|
+
│ ├── utils/
|
|
50
|
+
│ └── README.md
|
|
51
|
+
├── docs/ # Core documentation
|
|
52
|
+
│ ├── INDEX.md # Master index
|
|
53
|
+
│ ├── quick-start.md
|
|
54
|
+
│ ├── glossary.md
|
|
55
|
+
│ ├── RECOMMENDED-HOOKS.md
|
|
56
|
+
│ ├── CHECKPOINT-SYSTEM.md
|
|
57
|
+
│ ├── system-maintenance.md
|
|
58
|
+
│ ├── doc-sync.md # This file
|
|
59
|
+
│ ├── learnings/ # 8 learning documents
|
|
60
|
+
│ ├── workflows/ # 9 workflow documents
|
|
61
|
+
│ ├── diagrams/ # 4 mermaid diagrams
|
|
62
|
+
│ └── standards/ # Standards & guidelines
|
|
63
|
+
├── schemas/ # JSON schemas (9 files)
|
|
64
|
+
└── sessions/ # Planning sessions
|
|
65
|
+
└── planning/
|
|
66
|
+
```text
|
|
67
|
+
|
|
68
|
+
### Master Documents
|
|
69
|
+
|
|
70
|
+
Files that must stay synchronized:
|
|
71
|
+
|
|
72
|
+
| File | Sync With | Update Frequency |
|
|
73
|
+
|------|-----------|------------------|
|
|
74
|
+
| `CLAUDE.md` | All sections | On major changes |
|
|
75
|
+
| `.claude/docs/INDEX.md` | All documentation | When new docs added |
|
|
76
|
+
| `README.md` | Project changes | As needed |
|
|
77
|
+
| `.claude/agents/README.md` | Agent files | When agents change |
|
|
78
|
+
| `.claude/commands/README.md` | Command files | When commands change |
|
|
79
|
+
| `.claude/skills/README.md` | Skill files | When skills change |
|
|
80
|
+
| `.claude/docs/learnings/README.md` | Learning files | When learnings added |
|
|
81
|
+
| `.claude/docs/workflows/README.md` | Workflow files | When workflows change |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Validation Process
|
|
86
|
+
|
|
87
|
+
### 1. File Count Validation
|
|
88
|
+
|
|
89
|
+
Verify all file counts match expected values:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Run health check
|
|
93
|
+
pnpm health-check
|
|
94
|
+
```text
|
|
95
|
+
|
|
96
|
+
**Expected counts:**
|
|
97
|
+
|
|
98
|
+
- Agents: 14
|
|
99
|
+
- Commands: 16
|
|
100
|
+
- Skills: 16
|
|
101
|
+
- Learnings: 8
|
|
102
|
+
- Workflows: 9
|
|
103
|
+
- Diagrams: 4
|
|
104
|
+
|
|
105
|
+
**If counts don't match:**
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Find actual counts
|
|
109
|
+
echo "Agents: $(find .claude/agents -name "*.md" ! -name "README.md" | wc -l)"
|
|
110
|
+
echo "Commands: $(find .claude/commands -name "*.md" ! -name "README.md" | wc -l)"
|
|
111
|
+
echo "Skills: $(find .claude/skills -name "*.md" ! -name "README.md" | wc -l)"
|
|
112
|
+
echo "Learnings: $(find .claude/docs/learnings -name "*.md" ! -name "README.md" | wc -l)"
|
|
113
|
+
echo "Workflows: $(find .claude/docs/workflows -name "*.md" ! -name "README.md" | wc -l)"
|
|
114
|
+
echo "Diagrams: $(find .claude/docs/diagrams -name "*.mmd" | wc -l)"
|
|
115
|
+
|
|
116
|
+
# Update health-check.sh with correct counts
|
|
117
|
+
vim .claude/scripts/health-check.sh
|
|
118
|
+
```text
|
|
119
|
+
|
|
120
|
+
### 2. Link Validation
|
|
121
|
+
|
|
122
|
+
Check for broken links across all documentation:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Method 1: Via health check
|
|
126
|
+
pnpm health-check
|
|
127
|
+
|
|
128
|
+
# Method 2: Manual grep
|
|
129
|
+
for file in $(find .claude -name "*.md" -type f); do
|
|
130
|
+
echo "Checking: $file"
|
|
131
|
+
grep -oP '\]\(\K[^)]+' "$file" 2>/dev/null | while read -r link; do
|
|
132
|
+
# Skip URLs and anchors
|
|
133
|
+
if ! echo "$link" | grep -qE '^(https?:|#)'; then
|
|
134
|
+
# Convert relative path to absolute
|
|
135
|
+
link_dir=$(dirname "$file")
|
|
136
|
+
link_path="$link_dir/$link"
|
|
137
|
+
if [ ! -f "$link_path" ] && [ ! -d "$link_path" ]; then
|
|
138
|
+
echo " ⚠️ Broken: $link"
|
|
139
|
+
fi
|
|
140
|
+
fi
|
|
141
|
+
done
|
|
142
|
+
done
|
|
143
|
+
```text
|
|
144
|
+
|
|
145
|
+
### 3. Cross-Reference Validation
|
|
146
|
+
|
|
147
|
+
Verify all cross-references are correct:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Check CLAUDE.md references
|
|
151
|
+
grep -n "\[.*\](.claude/" CLAUDE.md
|
|
152
|
+
|
|
153
|
+
# Check INDEX.md references
|
|
154
|
+
grep -n "\[.*\](./" .claude/docs/INDEX.md
|
|
155
|
+
|
|
156
|
+
# Check workflow references
|
|
157
|
+
grep -rn "\[.*\](./" .claude/docs/workflows/
|
|
158
|
+
```text
|
|
159
|
+
|
|
160
|
+
### 4. Schema Validation
|
|
161
|
+
|
|
162
|
+
Validate JSON files against schemas:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Validate code registry
|
|
166
|
+
jq empty .claude/sessions/planning/.code-registry.json
|
|
167
|
+
|
|
168
|
+
# Validate checkpoints
|
|
169
|
+
find .claude/sessions/planning -name ".checkpoint.json" -exec jq empty {} \;
|
|
170
|
+
|
|
171
|
+
# Run schema validation script (if exists)
|
|
172
|
+
pnpm claude:validate:schemas
|
|
173
|
+
```text
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Sync Scripts
|
|
178
|
+
|
|
179
|
+
### Available Scripts
|
|
180
|
+
|
|
181
|
+
| Script | Command | Purpose |
|
|
182
|
+
|--------|---------|---------|
|
|
183
|
+
| **Health Check** | `pnpm health-check` | Validate entire system |
|
|
184
|
+
| **Format Markdown** | `pnpm format:md:claude` | Auto-format .claude/ docs |
|
|
185
|
+
| **Lint Markdown** | `pnpm lint:md` | Check markdown quality |
|
|
186
|
+
| **Validate Docs** | `pnpm claude:validate:docs` | Run doc validation |
|
|
187
|
+
| **Validate Schemas** | `pnpm claude:validate:schemas` | Validate JSON schemas |
|
|
188
|
+
| **Planning Sync** | `pnpm planning:sync <path>` | Sync planning to GitHub |
|
|
189
|
+
|
|
190
|
+
### Manual Sync Process
|
|
191
|
+
|
|
192
|
+
When adding/modifying documentation:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# 1. Make changes
|
|
196
|
+
vim .claude/docs/new-doc.md
|
|
197
|
+
|
|
198
|
+
# 2. Format markdown
|
|
199
|
+
pnpm format:md:claude
|
|
200
|
+
|
|
201
|
+
# 3. Validate changes
|
|
202
|
+
pnpm health-check
|
|
203
|
+
|
|
204
|
+
# 4. Update INDEX.md
|
|
205
|
+
vim .claude/docs/INDEX.md
|
|
206
|
+
# Add: - [New Doc](./new-doc.md) - Description
|
|
207
|
+
|
|
208
|
+
# 5. Update relevant README
|
|
209
|
+
# If it's a learning:
|
|
210
|
+
vim .claude/docs/learnings/README.md
|
|
211
|
+
|
|
212
|
+
# 6. Commit with proper message
|
|
213
|
+
git add .
|
|
214
|
+
git commit -m "docs: add new-doc documentation"
|
|
215
|
+
|
|
216
|
+
# 7. Push and verify CI
|
|
217
|
+
git push origin main
|
|
218
|
+
# Check: https://github.com/qazuor/your-repo/actions
|
|
219
|
+
```text
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Update Checklist
|
|
224
|
+
|
|
225
|
+
### When Adding a New Agent
|
|
226
|
+
|
|
227
|
+
- [ ] Create agent file in `.claude/agents/{category}/`
|
|
228
|
+
- [ ] Update `.claude/agents/README.md`
|
|
229
|
+
- [ ] Add to category list
|
|
230
|
+
- [ ] Update count (14 → 15)
|
|
231
|
+
- [ ] Update `CLAUDE.md`
|
|
232
|
+
- [ ] Add to Subagents section
|
|
233
|
+
- [ ] Update Quick Reference count
|
|
234
|
+
- [ ] Update `.claude/docs/INDEX.md`
|
|
235
|
+
- [ ] Add to Agents section
|
|
236
|
+
- [ ] Run `pnpm health-check` (verify count)
|
|
237
|
+
- [ ] Commit: `feat(agents): add {name} agent`
|
|
238
|
+
- [ ] Push and verify CI
|
|
239
|
+
|
|
240
|
+
### When Adding a New Command
|
|
241
|
+
|
|
242
|
+
- [ ] Create command file in `.claude/commands/{category}/`
|
|
243
|
+
- [ ] Update `.claude/commands/README.md`
|
|
244
|
+
- [ ] Add to category list
|
|
245
|
+
- [ ] Update count (16 → 17)
|
|
246
|
+
- [ ] Update `CLAUDE.md`
|
|
247
|
+
- [ ] Add to Commands section
|
|
248
|
+
- [ ] Update Quick Reference count
|
|
249
|
+
- [ ] Update `.claude/docs/INDEX.md`
|
|
250
|
+
- [ ] Add to Commands section
|
|
251
|
+
- [ ] Test command in Claude Code
|
|
252
|
+
- [ ] Run `pnpm health-check`
|
|
253
|
+
- [ ] Commit: `feat(commands): add /{name} command`
|
|
254
|
+
- [ ] Push and verify CI
|
|
255
|
+
|
|
256
|
+
### When Adding a New Skill
|
|
257
|
+
|
|
258
|
+
- [ ] Create skill file in `.claude/skills/{category}/`
|
|
259
|
+
- [ ] Update `.claude/skills/README.md`
|
|
260
|
+
- [ ] Add to category list
|
|
261
|
+
- [ ] Update count (16 → 17)
|
|
262
|
+
- [ ] Update `CLAUDE.md`
|
|
263
|
+
- [ ] Add to Skills section (if major)
|
|
264
|
+
- [ ] Update Quick Reference count
|
|
265
|
+
- [ ] Update `.claude/docs/INDEX.md`
|
|
266
|
+
- [ ] Add to Skills section
|
|
267
|
+
- [ ] Run `pnpm health-check`
|
|
268
|
+
- [ ] Commit: `feat(skills): add {name} skill`
|
|
269
|
+
- [ ] Push and verify CI
|
|
270
|
+
|
|
271
|
+
### When Adding a New Learning
|
|
272
|
+
|
|
273
|
+
- [ ] Create learning file in `.claude/docs/learnings/`
|
|
274
|
+
- [ ] Use proper template (Date, Category, Problem, Solution, Impact, Related)
|
|
275
|
+
- [ ] Update `.claude/docs/learnings/README.md`
|
|
276
|
+
- [ ] Add to appropriate category
|
|
277
|
+
- [ ] Update category count
|
|
278
|
+
- [ ] Update `CLAUDE.md`
|
|
279
|
+
- [ ] Add to "Archived Learnings" section
|
|
280
|
+
- [ ] Update `.claude/docs/INDEX.md`
|
|
281
|
+
- [ ] Verify Learnings section is correct
|
|
282
|
+
- [ ] Run `pnpm health-check`
|
|
283
|
+
- [ ] Commit: `docs(learnings): add {name} learning`
|
|
284
|
+
- [ ] Push and verify CI
|
|
285
|
+
|
|
286
|
+
### When Adding a New Workflow
|
|
287
|
+
|
|
288
|
+
- [ ] Create workflow file in `.claude/docs/workflows/`
|
|
289
|
+
- [ ] Update `.claude/docs/workflows/README.md`
|
|
290
|
+
- [ ] Add to workflow list
|
|
291
|
+
- [ ] Update count (9 → 10)
|
|
292
|
+
- [ ] Update `.claude/docs/INDEX.md`
|
|
293
|
+
- [ ] Add to Workflows section
|
|
294
|
+
- [ ] Create/update related diagram (if needed)
|
|
295
|
+
- [ ] Update `CLAUDE.md` workflow references
|
|
296
|
+
- [ ] Run `pnpm health-check`
|
|
297
|
+
- [ ] Commit: `docs(workflows): add {name} workflow`
|
|
298
|
+
- [ ] Push and verify CI
|
|
299
|
+
|
|
300
|
+
### When Updating Core Documents
|
|
301
|
+
|
|
302
|
+
**CLAUDE.md:**
|
|
303
|
+
|
|
304
|
+
- [ ] Update relevant sections
|
|
305
|
+
- [ ] Verify all links work
|
|
306
|
+
- [ ] Keep within recommended size (≤ 600 lines)
|
|
307
|
+
- [ ] Update "Last updated" date
|
|
308
|
+
- [ ] Run `pnpm format:md`
|
|
309
|
+
- [ ] Commit: `docs: update CLAUDE.md - {what changed}`
|
|
310
|
+
|
|
311
|
+
**INDEX.md:**
|
|
312
|
+
|
|
313
|
+
- [ ] Add new sections as needed
|
|
314
|
+
- [ ] Verify all links point to correct locations
|
|
315
|
+
- [ ] Keep structure organized
|
|
316
|
+
- [ ] Update counts if changed
|
|
317
|
+
- [ ] Run `pnpm health-check`
|
|
318
|
+
- [ ] Commit: `docs: update documentation index`
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Common Sync Issues
|
|
323
|
+
|
|
324
|
+
### Issue 1: File Count Mismatch
|
|
325
|
+
|
|
326
|
+
**Symptom**: Health check shows incorrect counts
|
|
327
|
+
|
|
328
|
+
**Causes:**
|
|
329
|
+
|
|
330
|
+
- Added file but forgot to update README
|
|
331
|
+
- Deleted file but count not updated
|
|
332
|
+
- Duplicate files exist
|
|
333
|
+
|
|
334
|
+
**Fix:**
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Find actual count
|
|
338
|
+
find .claude/agents -name "*.md" ! -name "README.md" | wc -l
|
|
339
|
+
|
|
340
|
+
# Update README count
|
|
341
|
+
vim .claude/agents/README.md
|
|
342
|
+
|
|
343
|
+
# Update health-check.sh expected count
|
|
344
|
+
vim .claude/scripts/health-check.sh
|
|
345
|
+
```text
|
|
346
|
+
|
|
347
|
+
### Issue 2: Broken Links
|
|
348
|
+
|
|
349
|
+
**Symptom**: 404s or link validation errors
|
|
350
|
+
|
|
351
|
+
**Causes:**
|
|
352
|
+
|
|
353
|
+
- File moved but links not updated
|
|
354
|
+
- Incorrect relative path
|
|
355
|
+
- File renamed
|
|
356
|
+
|
|
357
|
+
**Fix:**
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
# Find file
|
|
361
|
+
find .claude -name "target-file.md"
|
|
362
|
+
|
|
363
|
+
# Update all references
|
|
364
|
+
grep -rl "broken-link.md" .claude/ | xargs sed -i 's|broken-link.md|correct-link.md|g'
|
|
365
|
+
|
|
366
|
+
# Validate
|
|
367
|
+
pnpm health-check
|
|
368
|
+
```text
|
|
369
|
+
|
|
370
|
+
### Issue 3: Markdown Formatting Errors
|
|
371
|
+
|
|
372
|
+
**Symptom**: Lint errors in CI
|
|
373
|
+
|
|
374
|
+
**Causes:**
|
|
375
|
+
|
|
376
|
+
- Missing blank lines
|
|
377
|
+
- Incorrect list indentation
|
|
378
|
+
- Missing language in code blocks
|
|
379
|
+
|
|
380
|
+
**Fix:**
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
# Auto-fix
|
|
384
|
+
pnpm format:md:claude
|
|
385
|
+
|
|
386
|
+
# Manual check specific file
|
|
387
|
+
pnpm markdownlint-cli2 file.md --fix
|
|
388
|
+
```text
|
|
389
|
+
|
|
390
|
+
### Issue 4: Out-of-Sync README
|
|
391
|
+
|
|
392
|
+
**Symptom**: README lists wrong count or missing items
|
|
393
|
+
|
|
394
|
+
**Causes:**
|
|
395
|
+
|
|
396
|
+
- Forgot to update README when adding file
|
|
397
|
+
- Manual edit error
|
|
398
|
+
|
|
399
|
+
**Fix:**
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
# Regenerate list
|
|
403
|
+
for file in .claude/agents/*/*.md; do
|
|
404
|
+
echo "- [$(basename $file .md)]($(realpath --relative-to=.claude/agents $file))"
|
|
405
|
+
done
|
|
406
|
+
|
|
407
|
+
# Update README manually
|
|
408
|
+
vim .claude/agents/README.md
|
|
409
|
+
```text
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Automation
|
|
414
|
+
|
|
415
|
+
### Git Hooks
|
|
416
|
+
|
|
417
|
+
Documentation sync is partially automated via Git hooks:
|
|
418
|
+
|
|
419
|
+
**Pre-commit hook** (`.husky/pre-commit`):
|
|
420
|
+
|
|
421
|
+
- Auto-formats markdown files
|
|
422
|
+
- Validates .claude documentation
|
|
423
|
+
- Checks for broken links (warning)
|
|
424
|
+
|
|
425
|
+
**Post-checkout hook** (`.husky/post-checkout`):
|
|
426
|
+
|
|
427
|
+
- Validates code registry
|
|
428
|
+
- Checks for stale registry (> 7 days)
|
|
429
|
+
|
|
430
|
+
### CI/CD Pipeline
|
|
431
|
+
|
|
432
|
+
GitHub Actions validates documentation on push:
|
|
433
|
+
|
|
434
|
+
**Workflow**: `.github/workflows/validate-docs.yml`
|
|
435
|
+
|
|
436
|
+
**Checks:**
|
|
437
|
+
|
|
438
|
+
1. Documentation structure
|
|
439
|
+
2. JSON schemas
|
|
440
|
+
3. System health
|
|
441
|
+
4. Markdown linting
|
|
442
|
+
5. Broken links
|
|
443
|
+
6. File counts
|
|
444
|
+
|
|
445
|
+
**Badge**: [](https://github.com/qazuor/your-repo/actions/workflows/validate-docs.yml)
|
|
446
|
+
|
|
447
|
+
### Scheduled Tasks
|
|
448
|
+
|
|
449
|
+
**Future automation** (not yet implemented):
|
|
450
|
+
|
|
451
|
+
- Weekly: Auto-archive learnings > 30 days
|
|
452
|
+
- Monthly: Generate documentation metrics
|
|
453
|
+
- Quarterly: Suggest outdated documentation for review
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
## Best Practices
|
|
458
|
+
|
|
459
|
+
### DO ✅
|
|
460
|
+
|
|
461
|
+
- **Always update README** when adding files
|
|
462
|
+
- **Run health check** before committing
|
|
463
|
+
- **Format markdown** before committing
|
|
464
|
+
- **Validate links** after moving files
|
|
465
|
+
- **Use conventional commits** for doc changes
|
|
466
|
+
- **Keep counts updated** in all locations
|
|
467
|
+
- **Test commands** before documenting
|
|
468
|
+
- **Cross-reference** related documents
|
|
469
|
+
|
|
470
|
+
### DON'T ❌
|
|
471
|
+
|
|
472
|
+
- **Skip validation** before pushing
|
|
473
|
+
- **Leave broken links** unresolved
|
|
474
|
+
- **Forget to update INDEX.md** for new docs
|
|
475
|
+
- **Commit without formatting** markdown
|
|
476
|
+
- **Use absolute paths** (use relative)
|
|
477
|
+
- **Duplicate information** across files (link instead)
|
|
478
|
+
- **Ignore CI failures** on documentation
|
|
479
|
+
- **Manually edit counts** without verifying actual number
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## Quick Reference
|
|
484
|
+
|
|
485
|
+
### Common Commands
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
# Full validation
|
|
489
|
+
pnpm health-check
|
|
490
|
+
|
|
491
|
+
# Format all .claude markdown
|
|
492
|
+
pnpm format:md:claude
|
|
493
|
+
|
|
494
|
+
# Lint markdown
|
|
495
|
+
pnpm lint:md .claude/**/*.md
|
|
496
|
+
|
|
497
|
+
# Validate schemas
|
|
498
|
+
pnpm claude:validate:schemas
|
|
499
|
+
|
|
500
|
+
# Count files
|
|
501
|
+
find .claude/agents -name "*.md" ! -name "README.md" | wc -l
|
|
502
|
+
|
|
503
|
+
# Find broken links
|
|
504
|
+
grep -r "](./" .claude/docs/ | grep -v "http"
|
|
505
|
+
|
|
506
|
+
# Check file size
|
|
507
|
+
du -sh .claude/docs/*.md
|
|
508
|
+
```text
|
|
509
|
+
|
|
510
|
+
### File Locations
|
|
511
|
+
|
|
512
|
+
```text
|
|
513
|
+
Documentation sync checklist: .claude/docs/doc-sync.md (this file)
|
|
514
|
+
System maintenance guide: .claude/docs/system-maintenance.md
|
|
515
|
+
Health check script: .claude/scripts/health-check.sh
|
|
516
|
+
Validation workflow: .github/workflows/validate-docs.yml
|
|
517
|
+
Pre-commit hook: .husky/pre-commit
|
|
518
|
+
```text
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
## Related Documentation
|
|
523
|
+
|
|
524
|
+
- **System Maintenance**: `.claude/docs/system-maintenance.md`
|
|
525
|
+
- **Health Check System**: `.claude/scripts/health-check.sh`
|
|
526
|
+
- **Git Hooks**: `.claude/docs/RECOMMENDED-HOOKS.md`
|
|
527
|
+
- **Documentation Index**: `.claude/docs/INDEX.md`
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
**Last updated**: 2025-10-31
|
|
532
|
+
**Version**: 1.0.0
|
|
533
|
+
**Maintained by**: Documentation team
|