Skip to content

Commit cd38ec6

Browse files
Merge branch 'development' into kk-pmp-install
2 parents e5d122e + 5b83d02 commit cd38ec6

5,262 files changed

Lines changed: 71451 additions & 94263 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/hooks/audit-log.sh

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ set -uo pipefail
1313
# ---------------------------------------------------------------------------
1414
INPUT="$(cat)"
1515

16-
TOOL_NAME="$(printf '%s' "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('tool_name','unknown'))" 2>/dev/null || echo "unknown")"
16+
TOOL_NAME="$(printf '%s' "$INPUT" | jq -r '.tool_name // "unknown"' 2>/dev/null || echo "unknown")"
1717

18-
COMMAND="$(printf '%s' "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('tool_input',{}).get('command',''))" 2>/dev/null || echo "")"
18+
COMMAND="$(printf '%s' "$INPUT" | jq -r '.tool_input.command // ""' 2>/dev/null || echo "")"
1919

2020
# ---------------------------------------------------------------------------
2121
# 2. Determine log file path (relative to project root)

.claude/hooks/validate-bash-command.sh

100755100644
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ set -euo pipefail
1414
# ---------------------------------------------------------------------------
1515
INPUT="$(cat)"
1616

17-
TOOL_NAME="$(printf '%s' "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('tool_name',''))" 2>/dev/null || true)"
17+
TOOL_NAME="$(printf '%s' "$INPUT" | jq -r '.tool_name // ""' 2>/dev/null || true)"
1818

19-
# Only validate Bash commands — allow everything else through
20-
if [[ "$TOOL_NAME" != "Bash" ]]; then
19+
# Only validate Bash commands — allow everything else through.
20+
# If TOOL_NAME is empty (parse failure), fall through to check the command anyway (fail closed).
21+
if [[ -n "$TOOL_NAME" && "$TOOL_NAME" != "Bash" ]]; then
2122
exit 0
2223
fi
2324

24-
COMMAND="$(printf '%s' "$INPUT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('tool_input',{}).get('command',''))" 2>/dev/null || true)"
25+
COMMAND="$(printf '%s' "$INPUT" | jq -r '.tool_input.command // ""' 2>/dev/null || true)"
2526

2627
if [[ -z "$COMMAND" ]]; then
2728
exit 0
@@ -136,20 +137,19 @@ BLOCKED_PATTERNS=(
136137
# ---------------------------------------------------------------------------
137138
check_command() {
138139
local cmd="$1"
139-
# Trim leading/trailing whitespace
140-
cmd="$(echo "$cmd" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
140+
# Trim leading/trailing whitespace using parameter expansion
141+
cmd="${cmd#"${cmd%%[![:space:]]*}"}"
142+
cmd="${cmd%"${cmd##*[![:space:]]}"}"
141143

142144
if [[ -z "$cmd" ]]; then
143145
return 0
144146
fi
145147

146-
# Convert to lowercase for case-insensitive matching
147-
local cmd_lower
148-
cmd_lower="$(echo "$cmd" | tr '[:upper:]' '[:lower:]')"
148+
# Convert to lowercase using parameter expansion
149+
local cmd_lower="${cmd,,}"
149150

150151
for pattern in "${BLOCKED_PATTERNS[@]}"; do
151-
local pattern_lower
152-
pattern_lower="$(echo "$pattern" | tr '[:upper:]' '[:lower:]')"
152+
local pattern_lower="${pattern,,}"
153153

154154
# shellcheck disable=SC2254
155155
if [[ "$cmd_lower" == $pattern_lower ]]; then
@@ -164,8 +164,12 @@ check_command() {
164164
# ---------------------------------------------------------------------------
165165
# 4. Split on pipes and command chains, then check each sub-command
166166
# ---------------------------------------------------------------------------
167-
# Replace common chain operators with a delimiter
168-
NORMALIZED="$(echo "$COMMAND" | sed 's/&&/\n/g; s/||/\n/g; s/;/\n/g; s/|/\n/g')"
167+
# Replace common chain operators with newlines using parameter expansion
168+
# Order matters: replace && and || before | to avoid double-splitting ||
169+
NORMALIZED="${COMMAND//&&/$'\n'}"
170+
NORMALIZED="${NORMALIZED//||/$'\n'}"
171+
NORMALIZED="${NORMALIZED//;/$'\n'}"
172+
NORMALIZED="${NORMALIZED//|/$'\n'}"
169173

170174
while IFS= read -r subcmd; do
171175
check_command "$subcmd"

.claude/scripts/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Claude Helper Scripts
2+
3+
Utility scripts to support Claude Code when working with this documentation repository.
4+
5+
## resolve-doc-url.sh
6+
7+
Resolves a documentation URL to its source markdown file.
8+
9+
### Usage
10+
11+
```bash
12+
.claude/scripts/resolve-doc-url.sh "/path/to/page/"
13+
```
14+
15+
### Examples
16+
17+
```bash
18+
# Find the file for a specific URL
19+
.claude/scripts/resolve-doc-url.sh "/community-tools/contribute-to-mendix-docs/"
20+
# Output: content/en/docs/community-tools/contribute-to-mendix-docs/_index.md
21+
22+
# Check if a URL exists
23+
.claude/scripts/resolve-doc-url.sh "/some/page/"
24+
# Exit code 0 if found, 1 if not found
25+
```
26+
27+
### Benefits
28+
29+
- **Fast**: Uses grep optimized for file-only output
30+
- **Token-efficient**: Returns only the file path, no surrounding context
31+
- **Reliable**: Matches exact URL in front matter using fixed-string search
32+
33+
### When to Use
34+
35+
- Following cross-references between documentation pages
36+
- Validating internal links
37+
- Finding files by their published URL
38+
- Checking if a URL is already in use

.claude/scripts/resolve-doc-url.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Resolve a documentation URL to its source markdown file
3+
# Usage: resolve-doc-url.sh "/url/path/"
4+
5+
if [ -z "$1" ]; then
6+
echo "Usage: resolve-doc-url.sh <url>"
7+
echo "Example: resolve-doc-url.sh '/community-tools/contribute-to-mendix-docs/'"
8+
exit 1
9+
fi
10+
11+
# Search for the URL in front matter
12+
# Using grep with -l (files only) and -F (fixed string) for speed
13+
grep -rl --include="*.md" "^url: $1$" content/en/docs/
14+
15+
# Exit code 0 if found, 1 if not found

.claude/settings.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2+
"_comment": "DO NOT EDIT THIS FILE. To override these settings, use .claude/settings.local.json instead.",
23
"env": {
34
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
45
"DISABLE_TELEMETRY": "1",
56
"OTEL_METRICS_EXPORTER": "otlp",
67
"AWS_PROFILE": "my-sandbox",
78
"AWS_REGION": "eu-central-1",
89
"CLAUDE_CODE_USE_BEDROCK": "1",
9-
"ANTHROPIC_MODEL": "eu.anthropic.claude-sonnet-4-5-20250929-v1:0",
10+
"ANTHROPIC_MODEL": "eu.anthropic.claude-sonnet-4-6",
1011
"ANTHROPIC_SMALL_FAST_MODEL": "eu.anthropic.claude-haiku-4-5-20251001-v1:0",
1112
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "eu.anthropic.claude-haiku-4-5-20251001-v1:0",
12-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "eu.anthropic.claude-opus-4-6-v1",
13-
"ANTHROPIC_DEFAULT_SONNET_MODEL": "eu.anthropic.claude-sonnet-4-5-20250929-v1:0",
13+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "eu.anthropic.claude-opus-4-8",
14+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "eu.anthropic.claude-sonnet-4-6",
1415
"DISABLE_PROMPT_CACHING": "0",
1516
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "10240",
1617
"MAX_THINKING_TOKENS": "1024"
@@ -173,18 +174,18 @@
173174
"PreToolUse": [
174175
{
175176
"matcher": "Bash",
176-
"hooks": [{"type": "command", "command": ".claude/hooks/validate-bash-command.sh"}]
177+
"hooks": [{"type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/validate-bash-command.sh"}]
177178
}
178179
],
179180
"PostToolUse": [
180181
{
181182
"matcher": "*",
182-
"hooks": [{"type": "command", "command": ".claude/hooks/audit-log.sh"}]
183+
"hooks": [{"type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/audit-log.sh"}]
183184
}
184185
]
185186
},
186187
"statusLine": {
187188
"type": "command",
188-
"command": ".claude/statusline.sh"
189+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/statusline.sh"
189190
}
190191
}

.claude/skills/add/SKILL.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.claude/skills/docs-add/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: docs-add
3+
description: Adds new content to a single documentation page while preserving the original structure and meaning. Integrates new sections, paragraphs, or information smoothly with appropriate transitions. Use when the user wants to add, insert, include, or append new content to existing pages without rewriting what's already there.
4+
user-invocable: true
5+
disable-model-invocation: true
6+
---
7+
8+
> **After adding content:** Consider running `/docs-polish` to improve clarity or `/docs-proofread` to check for errors in the final result.
9+
10+
Ask the user for the new content to add. Determine a suitable place to smoothly integrate the new content into the existing content, with appropriate transitions and formatting, while preserving the original meaning and structure of the page. Don't make changes to existing content unless necessary for clarity or coherence when adding the new content.
11+
12+
If the new content introduces redundancy or conflicts with existing content, flag these issues in the chat and suggest ways to resolve them without directly editing the existing content.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: docs-alt-text
3+
description: Generates W3C-compliant alt text for images in documentation pages. Analyzes each image's purpose and adds descriptive alt text for informative images or empty alt for decorative images, improving accessibility and SEO.
4+
user-invocable: true
5+
disable-model-invocation: false
6+
---
7+
8+
> **Accessibility skill:** Generates alt text following W3C/WCAG 2.1 guidelines. Analyzes actual image content plus context to create concise, meaningful descriptions.
9+
10+
## Workflow
11+
12+
Follow this order for each image:
13+
14+
1. **STEP 1 - View the image file** (REQUIRED)
15+
- Extract image src path from figure shortcode
16+
- Convert path: `src="/attachments/path/file.png"``static/attachments/path/file.png`
17+
- Use Read tool to view the actual image
18+
- Understand what the image shows BEFORE reading context
19+
20+
2. **STEP 2 - Read surrounding context**
21+
- Read the heading, preceding/following text, list item, or numbered step
22+
- Understand the image's purpose within the documentation
23+
- Consider if context + image together make the image informative or decorative
24+
25+
3. **STEP 3 - Determine if informative or decorative**
26+
- **Technical docs assumption:** Images are informative unless obviously decorative
27+
- **Informative:** Images that convey information → write descriptive alt text
28+
- **Decorative:** Images where the information is already given in adjacent text, or pure visual styling with no informational value → use `alt=""`
29+
30+
4. **STEP 4 - Generate alt text**
31+
- **If decorative, use `alt=""`.** Never omit the alt attribute entirely.
32+
- **If informative, generate descriptive alt text:**
33+
- Focus on the information the image communicates, not what it looks like
34+
- Give the most concise description possible
35+
- Maximum 30 words (flag complex images needing longer descriptions for body text)
36+
- Don't include "screenshot of", "image of", or "picture of" (screen readers already announce it's an image)
37+
- Use Mendix terminology
38+
- Avoid redundancy with nearby text
39+
- **Based on surrounding context:**
40+
- In a procedure: emphasize the action/element relevant to the step (e.g., "Download button in Registration dialog")
41+
- Showing UI elements: name the relevant elements (e.g., "Properties pane")
42+
- Showing structure or relationships: describe what entities/components are connected (e.g., "Domain model with Customer and Order entities connected by one-to-many association")
43+
- Showing logic or process flow: describe what the flow accomplishes (e.g., "Microflow that retrieves FileDocument list and updates encryption keys")
44+
45+
5. **STEP 5 - Edit the figure shortcode**
46+
- Use Edit tool to add/update only the `alt` attribute
47+
- Preserve all other attributes: `class`, `width`, `max-width`, `link`
48+
- Maintain exact indentation and spacing
49+
50+
## Special Cases
51+
52+
- **Images in numbered lists:** Common in procedures—describe the procedural step shown
53+
- **Before/after sequences:** Describe what changed or the state shown
54+
- **Existing alt text:** May update if it's empty, generic, or poor quality (e.g., `alt=""`, `alt="button"`, `alt="before"`)
55+
- **File format icons:** Use format name (e.g., "PDF", "ZIP", "Word document")
56+
- **Complex diagrams:** If needs >30 words, flag to user and suggest adding description to body text
57+
58+
## What NOT to do
59+
60+
- Don't modify `src` path or attributes other than `alt`
61+
- Don't change surrounding text or document structure
62+
- Don't process images outside the determined scope
63+
- Don't generate alt text based solely on filename—always view the image first
64+
65+
## After Processing
66+
67+
Report summary:
68+
- How many images processed
69+
- How many updated
70+
71+
**Always suggest user review:** Recommend that the user review the images themselves to confirm alt text accuracy, as AI-generated descriptions may miss important nuances or context-specific details.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: docs-enhance
3+
description: Comprehensively edits a single documentation page including reorganization, restructuring, and rephrasing while preserving original meaning and intent. Improves flow, strengthens weak phrasing, and enhances overall quality. Use when documentation needs significant structural improvements, better organization, or when the user mentions reorganize, restructure, rewrite, or enhance.
4+
user-invocable: true
5+
disable-model-invocation: true
6+
---
7+
8+
> **Skill progression:** This is the most intensive editing. If restructuring isn't needed, use `/docs-polish` for clarity improvements or `/docs-proofread` for basic fixes.
9+
10+
Perform holistic improvements, including reorganization and stronger phrasing, while preserving original intent. This goes beyond basic proofreading and polishing to enhance the overall quality and impact of the text. Consider restructuring sentences, paragraphs, or sections for better flow, replacing weak words with stronger alternatives, and improving clarity and consistency while maintaining the original meaning. However, avoid making changes just for the sake of change; every edit should serve a clear purpose in enhancing the text.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: docs-polish
3+
description: Applies style guide standards to a documentation page without changing meaning or reorganizing structure. This includes fixing grammar, improving clarity and readability, simplifying complex sentences, using active voice, and standardizing terminology and formatting. Use when the user wants to polish, check style guide compliance, improve language, or clean up documentation while preserving its structure.
4+
user-invocable: true
5+
disable-model-invocation: false
6+
---
7+
8+
> **Skill progression:** This does everything `/docs-proofread` does plus style guide enforcement including clarity improvements. If only grammar and spelling fixes are needed, use `/docs-proofread`. For deeper reorganization, suggest `/docs-enhance`. If missing alt text is found, suggest `/docs-alt-text`.
9+
10+
Improve clarity and readability without changing meaning, structure, or paragraph order:
11+
12+
**docs-polish should**:
13+
* Read Mendix style guides first (in parallel): `grammar-formatting.md`, `terminology.md`, and `product-naming-guide.md` from `/content/en/docs/community-tools/contribute-to-mendix-docs/style-guide/`
14+
* Fix all spelling, grammar, and punctuation errors
15+
* Check all figure shortcodes for missing alt text. If the alt text parameter is missing, insert `alt=""` as a placeholder.
16+
* Ensure required front matter fields are present (title, url, description) and make descriptions concise and action-oriented
17+
* Fix broken Markdown syntax
18+
* Fix capitalization and terminology inconsistencies
19+
* Break up long, complex sentences for better readability
20+
* Simplify wordy or awkward phrasing
21+
* Improve word choice (more precise or accessible terms)
22+
* Change passive voice to active voice where appropriate
23+
* Remove first-person plural (we, us, our, let's), except in release notes
24+
* Remove bold and italics used for emphasis (reword or use alert shortcodes if needed)
25+
* Apply Mendix style guide standards (overrides the Microsoft Writing Style Guide)
26+
* Apply Microsoft Writing Style Guide standards, unless they conflict with the Mendix style guide standards
27+
28+
**After completing edits**:
29+
* Report what was changed in a concise summary
30+
* If any images were found with missing or empty alt text, state "I found [N] image(s) with missing alt text. Consider running `/docs-alt-text` to generate alt text."
31+
32+
**docs-polish should NOT**:
33+
* Move paragraphs or restructure sections (that's `/docs-enhance`)
34+
* Change technical meaning or accuracy
35+
* Significantly increase document length
36+
* Generate alt text for images
37+
* Change command syntax, code identifiers, variable names, placeholders, or any other text that appears in code formatting (inline backticks or code blocks). Code-formatted text represents literal technical content that must remain unchanged. If you notice an issue with code-formatted text, flag it in the chat but don't edit it directly.
38+
39+
Every edit should serve a clear purpose in making the text easier to read, scan, and understand.
40+
41+
Priority order for determining scope:
42+
1. If the user has selected text in a file (check for `ide_selection` tags), only polish the selected text in that file. Don't polish the entire document.
43+
2. If there's one open file (check for `ide_opened_file` tags) and no selection, work on the entire file.
44+
3. If there are multiple open files, list them and ask which to process.
45+
4. If no files are open, ask for a file path.

0 commit comments

Comments
 (0)