Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ai-workspace/scripts/align-workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ def render_agents_md_content(config: AIWorkspaceConfig, base_dir: Path) -> str:

def render_agents_md(config: AIWorkspaceConfig, base_dir: Path) -> None:
"""Render and write AGENTS.md."""
template_path = base_dir / ".ai-workspace/templates/AGENTS.md.j2"
if not template_path.exists():
print("Skipped AGENTS.md (no template found)")
return
rendered = render_agents_md_content(config, base_dir)
agents_md_path = base_dir / "AGENTS.md"
agents_md_path.write_text(rendered, encoding="utf-8")
Expand All @@ -280,6 +284,10 @@ def render_agents_md(config: AIWorkspaceConfig, base_dir: Path) -> None:

def check_agents_md(config: AIWorkspaceConfig, base_dir: Path) -> list[str]:
"""Check if AGENTS.md is up to date. Returns list of issues."""
template_path = base_dir / ".ai-workspace/templates/AGENTS.md.j2"
if not template_path.exists():
return []

rendered = render_agents_md_content(config, base_dir)
agents_md_path = base_dir / "AGENTS.md"

Expand Down
31 changes: 31 additions & 0 deletions .ai-workspace/scripts/commit-size-guard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# PreToolUse hook: warn when a git commit has a large staged diff.
# Advisory only — always exits 0.

THRESHOLD=500

CMD=$(echo "$CLAUDE_TOOL_INPUT" | grep -oP '"command"\s*:\s*"\K[^"]+' 2>/dev/null)
[ -z "$CMD" ] && exit 0

# Only care about git commit commands
echo "$CMD" | grep -qiE "git commit" || exit 0

# Skip amend commits (reworking existing commits, not adding new bulk)
echo "$CMD" | grep -qiE "\-\-amend" && exit 0

# Count staged diff lines (additions + deletions)
STAT=$(git diff --cached --stat 2>/dev/null | tail -1)
[ -z "$STAT" ] && exit 0

INSERTIONS=$(echo "$STAT" | grep -oP '\d+(?= insertion)' || echo 0)
DELETIONS=$(echo "$STAT" | grep -oP '\d+(?= deletion)' || echo 0)
TOTAL=$((${INSERTIONS:-0} + ${DELETIONS:-0}))

if [ "$TOTAL" -gt "$THRESHOLD" ]; then
echo "Large commit: $TOTAL changed lines (threshold: $THRESHOLD)."
echo "Consider splitting into smaller, focused commits:"
echo " - Use 'git add -p' to stage related changes separately"
echo " - Group by logical unit: one commit per feature, fix, or refactor"
fi

exit 0
1 change: 1 addition & 0 deletions .claude/commands/changelog.md
1 change: 1 addition & 0 deletions .claude/commands/dep-check.md
1 change: 1 addition & 0 deletions .claude/commands/update-docs.md
11 changes: 11 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
],
"matcher": "Bash"
},
{
"hooks": [
{
"command": "bash \"$CLAUDE_PROJECT_DIR/.ai-workspace/scripts/commit-size-guard.sh\"",
"statusMessage": "Checking commit size...",
"timeout": 5,
"type": "command"
}
],
"matcher": "Bash"
},
{
"hooks": [
{
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ evaluation-results/
# Paper / blog drafts (local only, not published via repo)
paper/

# Local project directories (user-specific, not part of the workspace)
UnifAI/
ai-initiatives-observer/
skills/redhat-writing/

# Archived workspace components
archive/

# Loose PDF / image artifacts
*.pdf

# Temporary files and directories used by AI agents.
# Ignore all content in .tmp/, but keep the directory itself.
.tmp/*
Expand Down
7 changes: 5 additions & 2 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Everything this workspace gives you — skills, commands, hooks, and how they wo

1. **Clone the workspace**, install dependencies, and run setup:
```bash
git clone https://github.com/redhat-community-ai-tools/claude-code-setup-evaluator.git
cd claude-code-setup-evaluator
git clone https://github.com/redhat-community-ai-tools/claude-code-basecamp.git
cd claude-code-basecamp
uv sync
uv run .ai-workspace/scripts/setup.py
```
Expand Down Expand Up @@ -94,6 +94,8 @@ Type the command name in the chat to run it.
| `/ai-engineer-review` | Architecture check | Brutally honest architecture and code review |
| `/architecture-docs` | Documentation | Generates architecture docs with diagrams (`--quick` for just a Mermaid diagram) |
| `/focus` | Switch repos mid-session | Re-presents the repo menu, replaces current focus |
| `/changelog` | Before a release | Generates a changelog grouped by intent from git history |
| `/dep-check` | Periodic audit | Checks for unused deps, outdated versions, vulnerabilities, license issues |
| `/toolkit` | First time / discovery | Shows everything available and recommends what to use |

---
Expand All @@ -106,6 +108,7 @@ Hooks fire on specific events — you don't trigger them manually.
|------|-------|-------------|
| Session start | When Claude starts | Reports git status of all repos in `repositories/` |
| Secret scan | Before `git commit` or `git push` | Blocks if API keys detected in tracked files (GitHub, AWS, Anthropic, Atlassian, HuggingFace patterns) |
| Commit size guard | Before `git commit` | Warns if staged diff exceeds 500 lines and suggests splitting |
| Skill suggestion | When you edit files | Reminds Claude which skills are relevant to the files you're working on |

The secret scan hook catches these patterns:
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Claude Code Setup Evaluator
# Claude Code Basecamp

A workspace for Claude Code users who work across multiple repositories. Clone your repos, get shared skills and commands out of the box, add your own.

Expand All @@ -7,7 +7,7 @@ A workspace for Claude Code users who work across multiple repositories. Clone y
This is a **meta-workspace**. You clone your project repositories into the `repositories/` folder and run Claude Code from the workspace root. Claude automatically gets access to all skills and commands. Your repos stay independent — they push to their own remotes, the workspace never touches them.

```
claude-code-setup-evaluator/
claude-code-basecamp/
repositories/ # Clone your repos here (gitignored — yours, not shared)
my-api/
frontend/
Expand All @@ -20,8 +20,8 @@ claude-code-setup-evaluator/
## Quick Start

```bash
git clone https://github.com/redhat-community-ai-tools/claude-code-setup-evaluator.git
cd claude-code-setup-evaluator
git clone https://github.com/redhat-community-ai-tools/claude-code-basecamp.git
cd claude-code-basecamp
uv sync
uv run .ai-workspace/scripts/setup.py

Expand Down Expand Up @@ -68,6 +68,8 @@ Skills are knowledge that Claude carries in the background. You don't trigger th
| `/env-check` | Something broke | Validate environment setup |
| `/recap` | End of session | Summarize for standup |
| `/focus` | Switch repos | Pick repos from a list |
| `/changelog` | Before a release | Generate changelog grouped by intent |
| `/dep-check` | Periodic audit | Check unused deps, outdated versions, vulnerabilities |
| `/toolkit` | Discovery | See everything available |

### Hooks (automatic safety nets)
Expand All @@ -76,6 +78,7 @@ Skills are knowledge that Claude carries in the background. You don't trigger th
|------|-------------|
| Session start | Reports git status of all your repos |
| Secret scan | Blocks `git commit`/`push` if API keys detected in tracked files |
| Commit size guard | Warns if staged diff exceeds 500 lines, suggests splitting |
| Skill suggestion | Reminds Claude which skills are relevant to files you're editing |

## Adding Your Own Skills and Commands
Expand Down
Loading
Loading