Skip to content

Commit 9d56e16

Browse files
authored
chore: add dev tooling, CI/CD, and update examples (#1)
* chore: add dev tooling, CI/CD, and update examples - Add pre-commit hooks (markdownlint, cspell, trailing whitespace) - Add GitHub Actions CI (lint, spell check, link check, AISD validation) - Add semantic release workflow for automated versioning - Add commitlint for conventional commit enforcement - Add editorconfig for consistent formatting - Replace Star Trek examples with generic software project scenarios - Update README with badges and development setup instructions - Convert TODO.md to TaskMark format with semver milestones * fix: disable MD025 for multi-header TaskMark files * fix: add DDTHH to spell check dictionary
1 parent 0217778 commit 9d56e16

20 files changed

Lines changed: 629 additions & 494 deletions

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(pre-commit run:*)"
5+
],
6+
"deny": [],
7+
"ask": []
8+
}
9+
}

.commitlintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"type-enum": [
5+
2,
6+
"always",
7+
[
8+
"feat",
9+
"fix",
10+
"docs",
11+
"style",
12+
"refactor",
13+
"perf",
14+
"test",
15+
"build",
16+
"ci",
17+
"chore",
18+
"revert"
19+
]
20+
],
21+
"subject-case": [0],
22+
"body-max-line-length": [0]
23+
}
24+
}

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig helps maintain consistent coding styles
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.md]
15+
# Trailing whitespace in Markdown can be significant (line breaks)
16+
trim_trailing_whitespace = false
17+
18+
[Makefile]
19+
indent_style = tab

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint & Validate
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Lint Markdown files
19+
uses: DavidAnson/markdownlint-cli2-action@v14
20+
with:
21+
globs: "**/*.md"
22+
23+
- name: Check spelling
24+
uses: streetsidesoftware/cspell-action@v5
25+
with:
26+
files: "**/*.md"
27+
config: "./cspell.json"
28+
29+
- name: Check links
30+
uses: lycheeverse/lychee-action@v1
31+
with:
32+
args: --verbose --no-progress --exclude-mail './**/*.md'
33+
fail: true
34+
35+
- name: AISD forbidden words check
36+
run: |
37+
echo "Checking for forbidden words (should/might/could/typically/usually/often)..."
38+
# Exclude README.md, CHANGELOG.md, and AGENTS.md from this check
39+
if find . -name "*.md" ! -name "README.md" ! -name "CHANGELOG.md" ! -name "AGENTS.md" -exec grep -l -E "\b(should|might|could|typically|usually|often)\b" {} \; | grep -q .; then
40+
echo "❌ Found forbidden words in the following files:"
41+
find . -name "*.md" ! -name "README.md" ! -name "CHANGELOG.md" ! -name "AGENTS.md" -exec grep -Hn -E "\b(should|might|could|typically|usually|often)\b" {} \;
42+
echo ""
43+
echo "Use MUST/REQUIRED/FORBIDDEN instead per AISD style guide."
44+
exit 1
45+
fi
46+
echo "✅ No forbidden words found"
47+
48+
- name: AISD line count check
49+
run: |
50+
echo "Checking docs/ files for line count (max 600)..."
51+
failed=0
52+
for file in docs/*.md docs/**/*.md; do
53+
[ -f "$file" ] || continue
54+
lines=$(wc -l < "$file")
55+
if [ "$lines" -gt 600 ]; then
56+
echo "❌ $file has $lines lines (max 600)"
57+
failed=1
58+
fi
59+
done
60+
if [ "$failed" -eq 1 ]; then
61+
echo "Consider splitting large files."
62+
exit 1
63+
fi
64+
echo "✅ All docs files within line limit"
65+
66+
commitlint:
67+
name: Commit Messages
68+
runs-on: ubuntu-latest
69+
if: github.event_name == 'pull_request'
70+
71+
steps:
72+
- name: Checkout repository
73+
uses: actions/checkout@v4
74+
with:
75+
fetch-depth: 0
76+
77+
- name: Setup Node.js
78+
uses: actions/setup-node@v4
79+
with:
80+
node-version: "20"
81+
82+
- name: Install commitlint
83+
run: npm install -g @commitlint/cli @commitlint/config-conventional
84+
85+
- name: Validate PR commits
86+
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Semantic Release
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: "20"
26+
27+
- name: Install semantic-release
28+
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/git
29+
30+
- name: Run semantic-release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: npx semantic-release

.markdownlint.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD025": false,
5+
"MD033": false,
6+
"MD036": false,
7+
"MD040": false,
8+
"MD041": false,
9+
"MD024": {
10+
"siblings_only": true
11+
}
12+
}

.pre-commit-config.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# See https://pre-commit.com for more information
2+
# Install: pip install pre-commit && pre-commit install
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.5.0
7+
hooks:
8+
- id: trailing-whitespace
9+
args: [--markdown-linebreak-ext=md]
10+
- id: end-of-file-fixer
11+
- id: check-yaml
12+
- id: check-merge-conflict
13+
- id: check-added-large-files
14+
15+
- repo: https://github.com/igorshubovych/markdownlint-cli
16+
rev: v0.38.0
17+
hooks:
18+
- id: markdownlint
19+
args: ["--fix"]
20+
21+
- repo: https://github.com/streetsidesoftware/cspell-cli
22+
rev: v8.6.0
23+
hooks:
24+
- id: cspell
25+
args: ["--no-progress", "--no-summary"]
26+
27+
# Conventional commits for semver
28+
- repo: https://github.com/compilerla/conventional-pre-commit
29+
rev: v3.4.0
30+
hooks:
31+
- id: conventional-pre-commit
32+
stages: [commit-msg]
33+
34+
# Local AISD format validation
35+
- repo: local
36+
hooks:
37+
- id: aisd-forbidden-words
38+
name: AISD forbidden words check
39+
entry: bash -c 'if grep -rn -E "\b(should|might|could|typically|usually|often)\b" "$@" 2>/dev/null; then echo "❌ Found forbidden words. Use MUST/REQUIRED/FORBIDDEN instead."; exit 1; fi' --
40+
language: system
41+
files: \.(md)$
42+
exclude: ^(README\.md|CHANGELOG\.md|AGENTS\.md)$
43+
44+
- id: aisd-line-count
45+
name: AISD line count check (max 600)
46+
entry: bash -c 'for file in "$@"; do lines=$(wc -l < "$file"); if [ $lines -gt 600 ]; then echo "❌ $file has $lines lines (max 600). Consider splitting."; exit 1; fi; done' --
47+
language: system
48+
files: ^docs/.*\.md$

.releaserc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md"
10+
}
11+
],
12+
[
13+
"@semantic-release/git",
14+
{
15+
"assets": ["CHANGELOG.md"],
16+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
17+
}
18+
],
19+
"@semantic-release/github"
20+
]
21+
}

0 commit comments

Comments
 (0)