claude-code-orchestrator-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/.claude/agents/database/workers/api-builder.md +155 -0
- package/.claude/agents/database/workers/database-architect.md +193 -0
- package/.claude/agents/database/workers/supabase-auditor.md +1070 -0
- package/.claude/agents/development/workers/code-reviewer.md +968 -0
- package/.claude/agents/development/workers/cost-calculator-specialist.md +683 -0
- package/.claude/agents/development/workers/llm-service-specialist.md +999 -0
- package/.claude/agents/development/workers/skill-builder-v2.md +480 -0
- package/.claude/agents/development/workers/typescript-types-specialist.md +649 -0
- package/.claude/agents/development/workers/utility-builder.md +582 -0
- package/.claude/agents/documentation/workers/technical-writer.md +152 -0
- package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +206 -0
- package/.claude/agents/frontend/workers/visual-effects-creator.md +159 -0
- package/.claude/agents/health/orchestrators/bug-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/dependency-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/security-orchestrator.md +1045 -0
- package/.claude/agents/health/workers/bug-fixer.md +525 -0
- package/.claude/agents/health/workers/bug-hunter.md +649 -0
- package/.claude/agents/health/workers/dead-code-hunter.md +446 -0
- package/.claude/agents/health/workers/dead-code-remover.md +437 -0
- package/.claude/agents/health/workers/dependency-auditor.md +379 -0
- package/.claude/agents/health/workers/dependency-updater.md +436 -0
- package/.claude/agents/health/workers/security-scanner.md +700 -0
- package/.claude/agents/health/workers/vulnerability-fixer.md +524 -0
- package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +156 -0
- package/.claude/agents/infrastructure/workers/orchestration-logic-specialist.md +1260 -0
- package/.claude/agents/infrastructure/workers/qdrant-specialist.md +503 -0
- package/.claude/agents/infrastructure/workers/quality-validator-specialist.md +984 -0
- package/.claude/agents/meta/workers/meta-agent-v3.md +503 -0
- package/.claude/agents/research/workers/problem-investigator.md +507 -0
- package/.claude/agents/research/workers/research-specialist.md +423 -0
- package/.claude/agents/testing/workers/accessibility-tester.md +813 -0
- package/.claude/agents/testing/workers/integration-tester.md +188 -0
- package/.claude/agents/testing/workers/mobile-fixes-implementer.md +252 -0
- package/.claude/agents/testing/workers/mobile-responsiveness-tester.md +180 -0
- package/.claude/agents/testing/workers/performance-optimizer.md +262 -0
- package/.claude/agents/testing/workers/test-writer.md +800 -0
- package/.claude/commands/health-bugs.md +297 -0
- package/.claude/commands/health-cleanup.md +297 -0
- package/.claude/commands/health-deps.md +297 -0
- package/.claude/commands/health-metrics.md +747 -0
- package/.claude/commands/health-security.md +297 -0
- package/.claude/commands/push.md +21 -0
- package/.claude/commands/speckit.analyze.md +184 -0
- package/.claude/commands/speckit.checklist.md +294 -0
- package/.claude/commands/speckit.clarify.md +178 -0
- package/.claude/commands/speckit.constitution.md +78 -0
- package/.claude/commands/speckit.implement.md +182 -0
- package/.claude/commands/speckit.plan.md +87 -0
- package/.claude/commands/speckit.specify.md +250 -0
- package/.claude/commands/speckit.tasks.md +137 -0
- package/.claude/commands/translate-doc.md +95 -0
- package/.claude/commands/worktree-cleanup.md +382 -0
- package/.claude/commands/worktree-create.md +287 -0
- package/.claude/commands/worktree-list.md +239 -0
- package/.claude/commands/worktree-remove.md +339 -0
- package/.claude/schemas/base-plan.schema.json +82 -0
- package/.claude/schemas/bug-plan.schema.json +71 -0
- package/.claude/schemas/dead-code-plan.schema.json +71 -0
- package/.claude/schemas/dependency-plan.schema.json +74 -0
- package/.claude/schemas/security-plan.schema.json +71 -0
- package/.claude/scripts/gates/check-bundle-size.sh +47 -0
- package/.claude/scripts/gates/check-coverage.sh +67 -0
- package/.claude/scripts/gates/check-security.sh +46 -0
- package/.claude/scripts/release.sh +740 -0
- package/.claude/settings.local.json +21 -0
- package/.claude/settings.local.json.example +20 -0
- package/.claude/skills/calculate-priority-score/SKILL.md +229 -0
- package/.claude/skills/calculate-priority-score/scoring-matrix.json +83 -0
- package/.claude/skills/extract-version/SKILL.md +228 -0
- package/.claude/skills/format-commit-message/SKILL.md +189 -0
- package/.claude/skills/format-commit-message/template.md +64 -0
- package/.claude/skills/format-markdown-table/SKILL.md +202 -0
- package/.claude/skills/format-markdown-table/examples.md +84 -0
- package/.claude/skills/format-todo-list/SKILL.md +222 -0
- package/.claude/skills/format-todo-list/template.json +30 -0
- package/.claude/skills/generate-changelog/SKILL.md +258 -0
- package/.claude/skills/generate-changelog/commit-mapping.json +47 -0
- package/.claude/skills/generate-report-header/SKILL.md +228 -0
- package/.claude/skills/generate-report-header/template.md +66 -0
- package/.claude/skills/parse-error-logs/SKILL.md +286 -0
- package/.claude/skills/parse-error-logs/patterns.json +26 -0
- package/.claude/skills/parse-git-status/SKILL.md +164 -0
- package/.claude/skills/parse-package-json/SKILL.md +151 -0
- package/.claude/skills/parse-package-json/schema.json +43 -0
- package/.claude/skills/render-template/SKILL.md +245 -0
- package/.claude/skills/rollback-changes/SKILL.md +582 -0
- package/.claude/skills/rollback-changes/changes-log-schema.json +101 -0
- package/.claude/skills/run-quality-gate/SKILL.md +404 -0
- package/.claude/skills/run-quality-gate/gate-mappings.json +97 -0
- package/.claude/skills/validate-plan-file/SKILL.md +327 -0
- package/.claude/skills/validate-plan-file/schema.json +35 -0
- package/.claude/skills/validate-report-file/SKILL.md +256 -0
- package/.claude/skills/validate-report-file/schema.json +67 -0
- package/.env.example +49 -0
- package/.github/BRANCH_PROTECTION.md +137 -0
- package/.github/workflows/build.yml +70 -0
- package/.github/workflows/claude-code-review.yml +255 -0
- package/.github/workflows/claude.yml +79 -0
- package/.github/workflows/deploy-staging.yml +90 -0
- package/.github/workflows/test.yml +104 -0
- package/.gitignore +116 -0
- package/CLAUDE.md +137 -0
- package/LICENSE +72 -0
- package/README.md +1098 -0
- package/docs/ARCHITECTURE.md +746 -0
- package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +568 -0
- package/docs/Agents Ecosystem/AI-AGENT-ECOSYSTEM-README.md +658 -0
- package/docs/Agents Ecosystem/ARCHITECTURE.md +606 -0
- package/docs/Agents Ecosystem/QUALITY-GATES-SPECIFICATION.md +1315 -0
- package/docs/Agents Ecosystem/REPORT-TEMPLATE-STANDARD.md +1324 -0
- package/docs/Agents Ecosystem/spec-kit-comprehensive-updates.md +478 -0
- package/docs/FAQ.md +572 -0
- package/docs/MIGRATION-GUIDE.md +542 -0
- package/docs/PERFORMANCE-OPTIMIZATION.md +494 -0
- package/docs/ROADMAP.md +439 -0
- package/docs/TUTORIAL-CUSTOM-AGENTS.md +2041 -0
- package/docs/USE-CASES.md +706 -0
- package/index.js +96 -0
- package/mcp/.mcp.base.json +21 -0
- package/mcp/.mcp.frontend.json +29 -0
- package/mcp/.mcp.full.json +67 -0
- package/mcp/.mcp.local.example.json +7 -0
- package/mcp/.mcp.local.json +7 -0
- package/mcp/.mcp.n8n.json +45 -0
- package/mcp/.mcp.supabase-full.json +35 -0
- package/mcp/.mcp.supabase-only.json +28 -0
- package/package.json +78 -0
- package/postinstall.js +71 -0
- package/switch-mcp.sh +101 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: format-commit-message
|
|
3
|
+
description: Generate standardized conventional commit messages with Claude Code attribution. Use when creating automated commits, release commits, or any git commit requiring consistent formatting.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Format Commit Message
|
|
7
|
+
|
|
8
|
+
Generate conventional commit messages following project standards with proper attribution.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Release commits
|
|
13
|
+
- Automated version updates
|
|
14
|
+
- Refactoring commits
|
|
15
|
+
- Any commit requiring consistent formatting
|
|
16
|
+
- Documentation updates
|
|
17
|
+
|
|
18
|
+
## Instructions
|
|
19
|
+
|
|
20
|
+
### Step 1: Gather Commit Information
|
|
21
|
+
|
|
22
|
+
Collect required information for commit message.
|
|
23
|
+
|
|
24
|
+
**Expected Input**:
|
|
25
|
+
- `type`: String (feat|fix|chore|docs|refactor|test|style|perf)
|
|
26
|
+
- `scope`: String (optional, e.g., "auth", "api", "ui")
|
|
27
|
+
- `description`: String (brief description)
|
|
28
|
+
- `body`: String (optional, detailed explanation)
|
|
29
|
+
- `breaking`: Boolean (optional, is this a breaking change?)
|
|
30
|
+
|
|
31
|
+
### Step 2: Format Message
|
|
32
|
+
|
|
33
|
+
Apply conventional commit format with project standards.
|
|
34
|
+
|
|
35
|
+
**Format Structure**:
|
|
36
|
+
```
|
|
37
|
+
{type}({scope}): {description}
|
|
38
|
+
|
|
39
|
+
{body}
|
|
40
|
+
|
|
41
|
+
{footer}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Footer Template**:
|
|
45
|
+
```
|
|
46
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
47
|
+
|
|
48
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Breaking Changes**:
|
|
52
|
+
If `breaking: true`, prepend "BREAKING CHANGE: " to body or add as footer.
|
|
53
|
+
|
|
54
|
+
### Step 3: Validate Message
|
|
55
|
+
|
|
56
|
+
Ensure message follows guidelines.
|
|
57
|
+
|
|
58
|
+
**Validation Rules**:
|
|
59
|
+
- Type must be valid (feat|fix|chore|docs|refactor|test|style|perf)
|
|
60
|
+
- Description must be present and < 72 characters
|
|
61
|
+
- Description should be lowercase and no period at end
|
|
62
|
+
- Scope should be lowercase if present
|
|
63
|
+
- Body should be wrapped at 72 characters if present
|
|
64
|
+
|
|
65
|
+
### Step 4: Return Formatted Message
|
|
66
|
+
|
|
67
|
+
Return complete commit message ready for git commit.
|
|
68
|
+
|
|
69
|
+
**Expected Output**:
|
|
70
|
+
```
|
|
71
|
+
feat(auth): add OAuth2 authentication support
|
|
72
|
+
|
|
73
|
+
Implemented OAuth2 flow with token refresh and secure storage.
|
|
74
|
+
Supports Google and GitHub providers.
|
|
75
|
+
|
|
76
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
77
|
+
|
|
78
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Error Handling
|
|
82
|
+
|
|
83
|
+
- **Invalid Type**: Return error listing valid types
|
|
84
|
+
- **Missing Description**: Return error requesting description
|
|
85
|
+
- **Description Too Long**: Return error with character count
|
|
86
|
+
- **Invalid Format**: Describe format issue
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
|
|
90
|
+
### Example 1: Simple Feature Commit
|
|
91
|
+
|
|
92
|
+
**Input**:
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"type": "feat",
|
|
96
|
+
"description": "add dark mode toggle"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Output**:
|
|
101
|
+
```
|
|
102
|
+
feat: add dark mode toggle
|
|
103
|
+
|
|
104
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
105
|
+
|
|
106
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Example 2: Scoped Fix with Body
|
|
110
|
+
|
|
111
|
+
**Input**:
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"type": "fix",
|
|
115
|
+
"scope": "api",
|
|
116
|
+
"description": "resolve memory leak in connection pool",
|
|
117
|
+
"body": "Connection pooling was not properly releasing connections after timeout. Implemented automatic cleanup and connection recycling."
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Output**:
|
|
122
|
+
```
|
|
123
|
+
fix(api): resolve memory leak in connection pool
|
|
124
|
+
|
|
125
|
+
Connection pooling was not properly releasing connections after
|
|
126
|
+
timeout. Implemented automatic cleanup and connection recycling.
|
|
127
|
+
|
|
128
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
129
|
+
|
|
130
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Example 3: Breaking Change
|
|
134
|
+
|
|
135
|
+
**Input**:
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"type": "feat",
|
|
139
|
+
"scope": "api",
|
|
140
|
+
"description": "migrate to v2 authentication API",
|
|
141
|
+
"breaking": true,
|
|
142
|
+
"body": "Updated authentication to use new v2 endpoints with improved security."
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Output**:
|
|
147
|
+
```
|
|
148
|
+
feat(api): migrate to v2 authentication API
|
|
149
|
+
|
|
150
|
+
BREAKING CHANGE: Updated authentication to use new v2 endpoints with
|
|
151
|
+
improved security. All clients must update authentication tokens.
|
|
152
|
+
|
|
153
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
154
|
+
|
|
155
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Example 4: Release Commit
|
|
159
|
+
|
|
160
|
+
**Input**:
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"type": "chore",
|
|
164
|
+
"scope": "release",
|
|
165
|
+
"description": "bump version to 0.8.0"
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Output**:
|
|
170
|
+
```
|
|
171
|
+
chore(release): bump version to 0.8.0
|
|
172
|
+
|
|
173
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
174
|
+
|
|
175
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Validation
|
|
179
|
+
|
|
180
|
+
- [ ] Formats all conventional commit types correctly
|
|
181
|
+
- [ ] Handles optional scope properly
|
|
182
|
+
- [ ] Wraps long descriptions and bodies
|
|
183
|
+
- [ ] Includes Claude Code attribution
|
|
184
|
+
- [ ] Formats breaking changes correctly
|
|
185
|
+
- [ ] Validates input fields
|
|
186
|
+
|
|
187
|
+
## Supporting Files
|
|
188
|
+
|
|
189
|
+
- `template.md`: Commit message template reference (see Supporting Files section)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Commit Message Template
|
|
2
|
+
|
|
3
|
+
## Format
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{type}({scope}): {description}
|
|
7
|
+
|
|
8
|
+
{body}
|
|
9
|
+
|
|
10
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
11
|
+
|
|
12
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Valid Types
|
|
16
|
+
|
|
17
|
+
- **feat**: New feature
|
|
18
|
+
- **fix**: Bug fix
|
|
19
|
+
- **chore**: Maintenance tasks, dependency updates
|
|
20
|
+
- **docs**: Documentation changes
|
|
21
|
+
- **refactor**: Code refactoring without behavior change
|
|
22
|
+
- **test**: Adding or updating tests
|
|
23
|
+
- **style**: Code style changes (formatting, whitespace)
|
|
24
|
+
- **perf**: Performance improvements
|
|
25
|
+
|
|
26
|
+
## Guidelines
|
|
27
|
+
|
|
28
|
+
1. **Type** (required): Use lowercase
|
|
29
|
+
2. **Scope** (optional): Component or area affected (lowercase, no spaces)
|
|
30
|
+
3. **Description** (required): Brief summary (< 72 chars, lowercase, no period)
|
|
31
|
+
4. **Body** (optional): Detailed explanation, wrap at 72 characters
|
|
32
|
+
5. **Footer** (auto-added): Claude Code attribution
|
|
33
|
+
|
|
34
|
+
## Breaking Changes
|
|
35
|
+
|
|
36
|
+
Add "BREAKING CHANGE: " prefix to body or as separate footer section.
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
### Simple
|
|
41
|
+
```
|
|
42
|
+
feat: add user authentication
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### With Scope
|
|
46
|
+
```
|
|
47
|
+
fix(api): resolve CORS configuration error
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### With Body
|
|
51
|
+
```
|
|
52
|
+
refactor(database): optimize query performance
|
|
53
|
+
|
|
54
|
+
Replaced N+1 queries with batch loading strategy.
|
|
55
|
+
Reduced average query time by 60%.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Breaking Change
|
|
59
|
+
```
|
|
60
|
+
feat(api): migrate to REST API v2
|
|
61
|
+
|
|
62
|
+
BREAKING CHANGE: Authentication tokens from v1 are no longer valid.
|
|
63
|
+
All clients must obtain new tokens using the v2 /auth endpoint.
|
|
64
|
+
```
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: format-markdown-table
|
|
3
|
+
description: Generate well-formatted markdown tables from data with proper alignment and spacing. Use for report statistics, comparison tables, or summary data presentation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Format Markdown Table
|
|
7
|
+
|
|
8
|
+
Create properly formatted markdown tables with alignment and consistent spacing.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Report statistics tables
|
|
13
|
+
- Comparison tables
|
|
14
|
+
- Summary data presentation
|
|
15
|
+
- Metric dashboards in reports
|
|
16
|
+
|
|
17
|
+
## Instructions
|
|
18
|
+
|
|
19
|
+
### Step 1: Receive Table Data
|
|
20
|
+
|
|
21
|
+
Accept headers and rows as input.
|
|
22
|
+
|
|
23
|
+
**Expected Input**:
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"headers": ["Column 1", "Column 2", "Column 3"],
|
|
27
|
+
"rows": [
|
|
28
|
+
["Value 1", "Value 2", "Value 3"],
|
|
29
|
+
["Value 4", "Value 5", "Value 6"]
|
|
30
|
+
],
|
|
31
|
+
"alignment": ["left", "center", "right"]
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Alignment** (optional):
|
|
36
|
+
- `left`: Left-aligned (default)
|
|
37
|
+
- `center`: Center-aligned
|
|
38
|
+
- `right`: Right-aligned
|
|
39
|
+
|
|
40
|
+
### Step 2: Calculate Column Widths
|
|
41
|
+
|
|
42
|
+
Determine maximum width for each column.
|
|
43
|
+
|
|
44
|
+
**Width Calculation**:
|
|
45
|
+
- Include header width
|
|
46
|
+
- Include all row values
|
|
47
|
+
- Add padding (1 space on each side)
|
|
48
|
+
- Minimum width: 3 characters
|
|
49
|
+
|
|
50
|
+
### Step 3: Format Header Row
|
|
51
|
+
|
|
52
|
+
Create header row with proper spacing.
|
|
53
|
+
|
|
54
|
+
**Format**:
|
|
55
|
+
```
|
|
56
|
+
| Header 1 | Header 2 | Header 3 |
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 4: Format Separator Row
|
|
60
|
+
|
|
61
|
+
Create separator with alignment indicators.
|
|
62
|
+
|
|
63
|
+
**Alignment Indicators**:
|
|
64
|
+
- Left: `:---` or `---`
|
|
65
|
+
- Center: `:---:`
|
|
66
|
+
- Right: `---:`
|
|
67
|
+
|
|
68
|
+
**Format**:
|
|
69
|
+
```
|
|
70
|
+
|----------|:--------:|---------:|
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Step 5: Format Data Rows
|
|
74
|
+
|
|
75
|
+
Create data rows with consistent spacing.
|
|
76
|
+
|
|
77
|
+
**Format**:
|
|
78
|
+
```
|
|
79
|
+
| Value 1 | Value 2 | Value 3 |
|
|
80
|
+
| Value 4 | Value 5 | Value 6 |
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 6: Return Complete Table
|
|
84
|
+
|
|
85
|
+
Return formatted markdown table.
|
|
86
|
+
|
|
87
|
+
**Expected Output**:
|
|
88
|
+
```markdown
|
|
89
|
+
| Column 1 | Column 2 | Column 3 |
|
|
90
|
+
|----------|:--------:|---------:|
|
|
91
|
+
| Value 1 | Value 2 | Value 3 |
|
|
92
|
+
| Value 4 | Value 5 | Value 6 |
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Error Handling
|
|
96
|
+
|
|
97
|
+
- **Empty Headers**: Return error requesting headers
|
|
98
|
+
- **Empty Rows**: Return warning, create table with headers only
|
|
99
|
+
- **Mismatched Columns**: Pad short rows with empty cells
|
|
100
|
+
- **Invalid Alignment**: Use 'left' as default, warn
|
|
101
|
+
|
|
102
|
+
## Examples
|
|
103
|
+
|
|
104
|
+
### Example 1: Simple Statistics Table
|
|
105
|
+
|
|
106
|
+
**Input**:
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"headers": ["Metric", "Count", "Percentage"],
|
|
110
|
+
"rows": [
|
|
111
|
+
["Critical Bugs", "3", "13%"],
|
|
112
|
+
["High Bugs", "8", "35%"],
|
|
113
|
+
["Medium Bugs", "12", "52%"]
|
|
114
|
+
],
|
|
115
|
+
"alignment": ["left", "right", "right"]
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Output**:
|
|
120
|
+
```markdown
|
|
121
|
+
| Metric | Count | Percentage |
|
|
122
|
+
|---------------|------:|-----------:|
|
|
123
|
+
| Critical Bugs | 3 | 13% |
|
|
124
|
+
| High Bugs | 8 | 35% |
|
|
125
|
+
| Medium Bugs | 12 | 52% |
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Example 2: Comparison Table
|
|
129
|
+
|
|
130
|
+
**Input**:
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"headers": ["Feature", "Before", "After"],
|
|
134
|
+
"rows": [
|
|
135
|
+
["Build Time", "45s", "12s"],
|
|
136
|
+
["Test Time", "2m 30s", "1m 15s"],
|
|
137
|
+
["Bundle Size", "2.3 MB", "1.8 MB"]
|
|
138
|
+
],
|
|
139
|
+
"alignment": ["left", "center", "center"]
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Output**:
|
|
144
|
+
```markdown
|
|
145
|
+
| Feature | Before | After |
|
|
146
|
+
|-------------|:-------:|:-------:|
|
|
147
|
+
| Build Time | 45s | 12s |
|
|
148
|
+
| Test Time | 2m 30s | 1m 15s |
|
|
149
|
+
| Bundle Size | 2.3 MB | 1.8 MB |
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Example 3: Priority Distribution
|
|
153
|
+
|
|
154
|
+
**Input**:
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"headers": ["Priority", "Open", "Fixed", "Total"],
|
|
158
|
+
"rows": [
|
|
159
|
+
["P0", "2", "5", "7"],
|
|
160
|
+
["P1", "5", "3", "8"],
|
|
161
|
+
["P2", "12", "8", "20"]
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Output**:
|
|
167
|
+
```markdown
|
|
168
|
+
| Priority | Open | Fixed | Total |
|
|
169
|
+
|----------|------|-------|-------|
|
|
170
|
+
| P0 | 2 | 5 | 7 |
|
|
171
|
+
| P1 | 5 | 3 | 8 |
|
|
172
|
+
| P2 | 12 | 8 | 20 |
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Example 4: Empty Rows (Header Only)
|
|
176
|
+
|
|
177
|
+
**Input**:
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"headers": ["Name", "Value", "Status"],
|
|
181
|
+
"rows": []
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Output**:
|
|
186
|
+
```markdown
|
|
187
|
+
| Name | Value | Status |
|
|
188
|
+
|------|-------|--------|
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Validation
|
|
192
|
+
|
|
193
|
+
- [ ] Formats headers correctly
|
|
194
|
+
- [ ] Creates proper separators
|
|
195
|
+
- [ ] Aligns columns as specified
|
|
196
|
+
- [ ] Handles various data types (numbers, text)
|
|
197
|
+
- [ ] Pads columns for consistent width
|
|
198
|
+
- [ ] Handles empty rows gracefully
|
|
199
|
+
|
|
200
|
+
## Supporting Files
|
|
201
|
+
|
|
202
|
+
- `examples.md`: Table formatting examples (see Supporting Files section)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Markdown Table Formatting Examples
|
|
2
|
+
|
|
3
|
+
## Basic Table
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
| Header 1 | Header 2 | Header 3 |
|
|
7
|
+
|----------|----------|----------|
|
|
8
|
+
| Cell 1 | Cell 2 | Cell 3 |
|
|
9
|
+
| Cell 4 | Cell 5 | Cell 6 |
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Alignment Examples
|
|
13
|
+
|
|
14
|
+
### Left-aligned (default)
|
|
15
|
+
```markdown
|
|
16
|
+
| Name | Age | City |
|
|
17
|
+
|--------|-----|-----------|
|
|
18
|
+
| Alice | 30 | New York |
|
|
19
|
+
| Bob | 25 | Boston |
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Center-aligned
|
|
23
|
+
```markdown
|
|
24
|
+
| Name | Age | City |
|
|
25
|
+
|:------:|:---:|:---------:|
|
|
26
|
+
| Alice | 30 | New York |
|
|
27
|
+
| Bob | 25 | Boston |
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Right-aligned
|
|
31
|
+
```markdown
|
|
32
|
+
| Name | Age | City |
|
|
33
|
+
|-------:|----:|----------:|
|
|
34
|
+
| Alice | 30 | New York |
|
|
35
|
+
| Bob | 25 | Boston |
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Mixed alignment
|
|
39
|
+
```markdown
|
|
40
|
+
| Name | Age | City |
|
|
41
|
+
|--------|----:|:---------:|
|
|
42
|
+
| Alice | 30 | New York |
|
|
43
|
+
| Bob | 25 | Boston |
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Complex Tables
|
|
47
|
+
|
|
48
|
+
### With Numbers
|
|
49
|
+
```markdown
|
|
50
|
+
| Metric | Value | Change |
|
|
51
|
+
|------------------|------:|-------:|
|
|
52
|
+
| Revenue | $2.5M | +15% |
|
|
53
|
+
| Users | 50K | +23% |
|
|
54
|
+
| Retention | 85% | +3% |
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### With Code
|
|
58
|
+
```markdown
|
|
59
|
+
| Function | Returns | Description |
|
|
60
|
+
|------------------|---------|----------------------|
|
|
61
|
+
| `parse()` | Object | Parse JSON string |
|
|
62
|
+
| `stringify()` | String | Convert to JSON |
|
|
63
|
+
| `validate()` | Boolean | Check validity |
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### With Status Indicators
|
|
67
|
+
```markdown
|
|
68
|
+
| Task | Status | Priority |
|
|
69
|
+
|-------------------|:------:|:--------:|
|
|
70
|
+
| Fix bug #123 | ✅ | P0 |
|
|
71
|
+
| Update docs | 🔄 | P2 |
|
|
72
|
+
| Refactor API | ❌ | P1 |
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Tips
|
|
76
|
+
|
|
77
|
+
1. **Consistent Width**: Use spaces to align columns visually in source
|
|
78
|
+
2. **Minimum Width**: Each column should be at least 3 characters wide
|
|
79
|
+
3. **Padding**: Add 1 space on each side of cell content
|
|
80
|
+
4. **Headers**: Keep headers concise and clear
|
|
81
|
+
5. **Alignment**: Choose alignment based on content type:
|
|
82
|
+
- Text: left-aligned
|
|
83
|
+
- Numbers: right-aligned
|
|
84
|
+
- Status/Icons: center-aligned
|