-
Notifications
You must be signed in to change notification settings - Fork 117
feat(docs): add content linting — Vale, markdownlint, cspell #1324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Docs Lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'docs/**' | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint Documentation | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
|
Comment on lines
+15
to
+20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
for repo in checkout setup-node; do
echo "== actions/${repo} =="
for tag in v6 v5 v4; do
printf " %-3s -> " "$tag"
resp="$(curl -fsSL "https://api.github.com/repos/actions/${repo}/git/ref/tags/${tag}" || true)"
if echo "$resp" | jq -e '.ref and .object.sha' >/dev/null 2>&1; then
echo "$resp" | jq -r '"\(.ref) \(.object.sha)"'
else
echo "NOT_FOUND"
fi
done
doneRepository: ambient-code/platform Length of output: 478 Pin GitHub Actions to immutable commit SHAs. Lines 16 and 19 use mutable major version tags ( Obtain the commit SHAs from GitHub's releases page (e.g., Patch structure (replace SHA placeholders with actual commit hashes)- - name: Checkout
- uses: actions/checkout@v6
+ - name: Checkout
+ uses: actions/checkout@<commit-sha>
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Setup Node.js
+ uses: actions/setup-node@<commit-sha>Per guideline: ".github/workflows/**/*.{yml,yaml}: Pin action versions to SHA." 🤖 Prompt for AI Agents |
||
| node-version: '22' | ||
| cache: 'npm' | ||
| cache-dependency-path: docs/package-lock.json | ||
|
|
||
| - name: Install Vale | ||
| run: | | ||
| curl -sfL https://github.com/errata-ai/vale/releases/download/v3.12.1/vale_3.12.1_Linux_64-bit.tar.gz | tar xz -C /usr/local/bin vale | ||
|
|
||
| - name: Install npm tools | ||
| run: npm install -g markdownlint-cli2 cspell | ||
|
|
||
| - name: Run Vale | ||
| working-directory: docs | ||
| run: vale src/content/docs/ | ||
|
|
||
| - name: Run markdownlint | ||
| working-directory: docs | ||
| run: markdownlint-cli2 "src/content/docs/**/*.md" | ||
|
|
||
| - name: Run cspell | ||
| working-directory: docs | ||
| run: cspell lint --no-progress "src/content/docs/**/*.md" | ||
|
|
||
| - name: Build docs (structural validation) | ||
| working-directory: docs | ||
| run: | | ||
| npm ci | ||
| npx playwright install --with-deps chromium | ||
| npm run build | ||
|
Comment on lines
+10
to
+49
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| { | ||
| "version": "0.2", | ||
| "language": "en", | ||
| "ignorePaths": [ | ||
| "node_modules", | ||
| "dist", | ||
| ".astro", | ||
| "public/images" | ||
| ], | ||
| "ignoreRegExpList": [ | ||
| "/```[\\s\\S]*?```/g", | ||
| "/(https?://[^\\s)]+)/g", | ||
| "/`[^`]+`/g", | ||
| "/\\{[^}]+\\}/g" | ||
| ], | ||
| "words": [ | ||
| "acpctl", | ||
| "agentready", | ||
| "agenticsessions", | ||
| "Ambient", | ||
| "Amber", | ||
| "Anthropic", | ||
| "Archie", | ||
| "Astro", | ||
| "Atlassian", | ||
| "autoscaling", | ||
| "backoff", | ||
| "buildx", | ||
| "cadence", | ||
| "CORS", | ||
| "coderabbit", | ||
| "codeready", | ||
| "colocation", | ||
| "ConfigMap", | ||
| "ConfigMaps", | ||
| "CronJob", | ||
| "CronJobs", | ||
| "cspell", | ||
| "Cypress", | ||
| "frontmatter", | ||
| "gofmt", | ||
| "golangci", | ||
| "Grafana", | ||
| "Haiku", | ||
| "HTTPS", | ||
| "idempotency", | ||
| "integrations", | ||
| "Jira", | ||
| "Kustomize", | ||
| "Kubernetes", | ||
| "Langfuse", | ||
| "Langsmith", | ||
| "LangChain", | ||
| "langgraph", | ||
| "markdownlint", | ||
| "mcp", | ||
| "Milvus", | ||
| "MinIO", | ||
| "mkdir", | ||
| "monospace", | ||
| "namespace", | ||
| "namespaces", | ||
| "Netlify", | ||
| "NextJS", | ||
| "OAuth", | ||
| "Olivia", | ||
| "onboarding", | ||
| "OpenShift", | ||
| "Opus", | ||
| "parallelizable", | ||
| "projectsettings", | ||
| "Playwright", | ||
| "preconfigured", | ||
| "Prometheus", | ||
| "provisioning", | ||
| "quickstart", | ||
| "RBAC", | ||
| "readability", | ||
| "reachable", | ||
| "reconciler", | ||
| "reconcilers", | ||
| "reconciliation", | ||
| "rehype", | ||
| "remark", | ||
| "Rollback", | ||
| "rfes", | ||
| "rollout", | ||
| "RoleBinding", | ||
| "repo", | ||
| "repos", | ||
| "screenshot", | ||
| "screenshots", | ||
| "Shadcn", | ||
| "slugified", | ||
| "speedrun", | ||
| "Sonnet", | ||
| "Starlight", | ||
| "subagent", | ||
| "subagents", | ||
| "Tailscale", | ||
| "teardown", | ||
| "templated", | ||
| "TypeScript", | ||
| "unattended", | ||
| "automatable", | ||
| "uncomitted", | ||
| "unmount", | ||
| "viewport", | ||
| "worktree", | ||
| "worktrees", | ||
| "YAML" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "default": true, | ||
| "MD013": false, | ||
| "MD025": false, | ||
| "MD033": { | ||
| "allowed_elements": ["figure", "img", "br", "details", "summary", "Badge"] | ||
| }, | ||
| "MD036": false, | ||
| "MD040": false, | ||
| "MD041": false, | ||
| "MD024": { | ||
| "siblings_only": true | ||
| }, | ||
| "MD060": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| StylesPath = .vale/styles | ||
|
|
||
| MinAlertLevel = suggestion | ||
|
|
||
| Vocab = ACP | ||
|
|
||
| [*.md] | ||
| BasedOnStyles = ACP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| extends: existence | ||
| message: "Prefer active voice. '%s' is passive." | ||
| level: suggestion | ||
| ignorecase: true | ||
| tokens: | ||
| - 'is created by' | ||
| - 'is managed by' | ||
| - 'is handled by' | ||
| - 'is configured by' | ||
| - 'is controlled by' | ||
| - 'is provided by' | ||
| - 'is defined by' | ||
| - 'is required by' | ||
| - 'is supported by' | ||
| - 'is determined by' | ||
| - 'was created' | ||
| - 'was configured' | ||
| - 'was deleted' | ||
| - 'was removed' | ||
| - 'was updated' | ||
| - 'were created' | ||
| - 'were configured' | ||
| - 'were deleted' | ||
| - 'can be accessed by' | ||
| - 'should be configured by' | ||
| - 'must be set by' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| extends: existence | ||
| message: "Don't end headings with punctuation: '%s'." | ||
| level: error | ||
| scope: heading | ||
| nonword: true | ||
| tokens: | ||
| - '[.!?;:]$' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| extends: existence | ||
| message: "Consider explaining '%s' on first use or linking to a glossary." | ||
| level: suggestion | ||
| ignorecase: false | ||
| nonword: true | ||
| tokens: | ||
| - '\bCRDs?\b' | ||
| - '\bRBAC\b' | ||
| - '\bPATs?\b' | ||
| - '\bMCP\b' | ||
| - '\bAG-UI\b' | ||
| - '\bCR\b' | ||
| - '\bPVC\b' | ||
| - '\bHPA\b' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| extends: readability | ||
| message: "Reading level is grade %s. Aim for grade 12 or lower." | ||
| level: suggestion | ||
| metrics: | ||
| - Flesch-Kincaid | ||
| grade: 12 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| extends: occurrence | ||
| message: "Sentence has %s words. Try to keep sentences under 30 words." | ||
| level: warning | ||
| scope: sentence | ||
| max: 30 | ||
| token: '\b\w+\b' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| extends: substitution | ||
| message: "Use '%s' instead of '%s'." | ||
| level: error | ||
| ignorecase: true | ||
| swap: | ||
| vTeam: ACP | ||
| v-team: ACP | ||
| vteam platform: Ambient Code Platform | ||
| the vteam: ACP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| ACP | ||
| acpctl | ||
| Ambient | ||
| Amber | ||
| AgentReady | ||
| Anthropic | ||
| Archie | ||
| Astro | ||
| Atlassian | ||
| Bailey | ||
| Bitbucket | ||
| Casey | ||
| CLI | ||
| Claude | ||
| ConfigMap | ||
| CRD | ||
| CRC | ||
| Cypress | ||
| Dan | ||
| Diego | ||
| Docker | ||
| Emma | ||
| Felix | ||
| Gemini | ||
| GitHub | ||
| GitLab | ||
| Grafana | ||
| Haiku | ||
| Jira | ||
| Kustomize | ||
| Kubernetes | ||
| Langfuse | ||
| LangChain | ||
| Langsmith | ||
| Lee | ||
| LLM | ||
| MinIO | ||
| MCP | ||
| Morgan | ||
| Neil | ||
| Netlify | ||
| NextJS | ||
| OAuth | ||
| Olivia | ||
| OpenShift | ||
| Opus | ||
| PAT | ||
| Parker | ||
| Playwright | ||
| Prometheus | ||
| Quinn | ||
| RBAC | ||
| REST | ||
| RFE | ||
| Riley | ||
| Ryan | ||
| Shadcn | ||
| Sonnet | ||
| SSO | ||
| Starlight | ||
| Stella | ||
| Steve | ||
| Tailscale | ||
| Terry | ||
| Tessa | ||
| TypeScript | ||
| Uma |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| vTeam | ||
| v-team | ||
| vteam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scope workflow token permissions explicitly.
permissionsis not set, so token scope depends on repository defaults. For this lint-only job, set least privilege (e.g.,contents: read).Suggested patch
jobs: lint: name: Lint Documentation + permissions: + contents: read runs-on: ubuntu-latestAs per coding guidelines, ".github/workflows/**/*.{yml,yaml}: - Pin action versions to SHA. Verify secrets are not exposed and permissions are scoped."
📝 Committable suggestion
🤖 Prompt for AI Agents