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
10 changes: 5 additions & 5 deletions plugins/ansible/commands/ansible-scaffold.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Create the following structure:

### Step 3: Generate Configuration Files

1. **ansible.cfg** - Copy from `skills/infra/ansible-automation/examples/project-layout/ansible.cfg`
2. **requirements.yml** - Copy from `skills/infra/ansible-automation/examples/project-layout/requirements.yml`
1. **ansible.cfg** - Copy from `plugins/ansible/skills/ansible/examples/project-layout/ansible.cfg`
2. **requirements.yml** - Copy from `plugins/ansible/skills/ansible/examples/project-layout/requirements.yml`

3. **.ansible-lint**:
```yaml
Expand Down Expand Up @@ -99,17 +99,17 @@ For each environment, create:
1. **hosts.yml** - Basic inventory structure
2. **group_vars/all.yml** - Environment-specific variables

Use `skills/infra/ansible-automation/examples/project-layout/inventories/` as templates.
Use `plugins/ansible/skills/ansible/examples/project-layout/inventories/` as templates.

### Step 5: Create Main Playbook

Create `playbooks/site.yml` from `skills/infra/ansible-automation/examples/playbooks/site.yml`.
Create `playbooks/site.yml` from `plugins/ansible/skills/ansible/examples/playbooks/site.yml`.

### Step 6: Add Baseline Role (if requested)

If user selected baseline role:

1. Copy entire `skills/infra/ansible-automation/examples/baseline-role/` to `roles/baseline/`
1. Copy entire `plugins/ansible/skills/ansible/examples/baseline-role/` to `roles/baseline/`
2. Update variable prefix if project has specific naming

### Step 7: Add CI Pipeline (if requested)
Expand Down
6 changes: 3 additions & 3 deletions plugins/flux/commands/flux-refactor.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Use AskUserQuestion to confirm:
Execute the analysis script:

```bash
python plugins/skillbox/skills/k8s/flux-gitops-refactor/scripts/analyze-structure.py /path/to/repo --format=markdown
python ${CLAUDE_PLUGIN_ROOT}/skills/refactor/scripts/analyze-structure.py /path/to/repo --format=markdown
```

Present analysis results to user showing:
Expand Down Expand Up @@ -125,5 +125,5 @@ configMapGenerator:

## References

- Load `skills/k8s/flux-gitops-refactor/references/refactoring-patterns.md` for detailed patterns
- Load `skills/k8s/flux-gitops-scaffold/references/project-structure.md` for target structure
- See `skills/refactor/references/refactoring-patterns.md` for detailed patterns
- See `skills/scaffold/references/project-structure.md` for target structure
30 changes: 20 additions & 10 deletions plugins/flux/skills/scaffold/references/version-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,41 @@
1. SessionStart hook — reminds about Context7 for k8s projects
2. PreToolUse hook — checks versions in HelmRelease files

## Using Context7 for Latest Versions (REQUIRED)
## Getting Chart Versions

**Mandatory workflow** — fetch latest versions via Context7 before scaffolding:
**Recommended workflow** — verify versions before scaffolding:

### Step 1: Resolve Library ID
### Option 1: Context7 (Documentation)

```
Tool: resolve-library-id
Parameter: libraryName="cert-manager"
```

### Step 2: Query Documentation for Version

```
Tool: query-docs
Parameters:
libraryId: "/jetstack/cert-manager"
topic: "helm chart installation version"
libraryId: "/cert-manager/website"
topic: "helm chart install version"
```

**Note:** Context7 returns documentation examples which may contain older versions.
Use as reference but verify current release.

### Option 2: Helm Repo (Authoritative)

```bash
helm repo add jetstack https://charts.jetstack.io
helm search repo jetstack/cert-manager --versions | head -5
```

### Option 3: GitHub Releases

Check the project's GitHub releases page for latest stable version.

## Component Library IDs

| Component | Library Name | Context7 ID |
|-----------|--------------|-------------|
| cert-manager | cert-manager | /jetstack/cert-manager |
| cert-manager | cert-manager | /cert-manager/website |
| ingress-nginx | ingress-nginx | /kubernetes/ingress-nginx |
| external-secrets | external-secrets | /external-secrets/external-secrets |
| external-dns | external-dns | /kubernetes-sigs/external-dns |
Expand Down
2 changes: 1 addition & 1 deletion plugins/go-dev/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "go-dev",
"description": "Go development toolkit: project structure, services, repositories, handlers, OpenAPI code generation",
"version": "1.0.0",
"version": "1.1.1",
"author": {
"name": "11me"
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/go-dev/agents/project-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ This agent uses patterns from `go-development` skill:
- **Errors**: Typed errors (EntityNotFound, ValidationFailed, StateConflict)
- **Logging**: slog (default) or zap (for large projects)

See skill: `plugins/skillbox/skills/go/go-development/SKILL.md`
See skill: `plugins/go-dev/skills/go-development/SKILL.md`

## Scaffolding Process

Expand Down
39 changes: 39 additions & 0 deletions plugins/go-dev/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"hooks": {
"SessionStart": [
{
"once": true,
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session_context.py"
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pretool-go-get-check.py"
}
]
},
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/golangci-guard.py"
},
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pretool-serializable-check.py"
}
]
}
]
}
}
29 changes: 23 additions & 6 deletions .../workflow/scripts/hooks/golangci-guard.py → ...ns/go-dev/scripts/hooks/golangci-guard.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,32 @@
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parent))
from lib.response import allow, ask
# Import response utilities from workflow plugin (avoid duplication)
_workflow_lib = Path(__file__).parent.parent.parent.parent / "workflow/scripts/hooks/lib"
if _workflow_lib.exists():
sys.path.insert(0, str(_workflow_lib))
from response import allow, ask
else:
# Minimal fallback
def allow(event: str | None = None) -> None:
if event:
print(json.dumps({"hookSpecificOutput": {"hookEventName": event}}))

def ask(reason: str, event: str = "PreToolUse", context: str | None = None) -> None:
output: dict = {
"hookSpecificOutput": {
"hookEventName": event,
"permissionDecision": "ask",
"permissionDecisionReason": reason,
}
}
if context:
output["hookSpecificOutput"]["additionalContext"] = context
print(json.dumps(output))


def is_inside_plugin_dir(file_path: str) -> bool:
"""Check if file is inside the skillbox plugin directory.

Uses CLAUDE_PLUGIN_ROOT env var provided by Claude Code.
"""
"""Check if file is inside the skillbox plugin directory."""
plugin_root = os.environ.get("CLAUDE_PLUGIN_ROOT", "")
if not plugin_root:
return False
Expand Down
57 changes: 57 additions & 0 deletions plugins/go-dev/scripts/hooks/session_context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env python3
"""SessionStart hook: inject Go-specific guidelines.

Only activates if go.mod exists in current directory.
"""

import json
from pathlib import Path


def main() -> None:
cwd = Path.cwd()

# Only activate for Go projects
if not (cwd / "go.mod").exists():
return

output_lines: list[str] = []

# Try to load GO-GUIDELINES.md from plugin
guidelines_path = Path(__file__).parent.parent.parent / "skills/go-development/GO-GUIDELINES.md"
if guidelines_path.exists():
guidelines = guidelines_path.read_text().strip()
output_lines.append("## Go Guidelines")
output_lines.append("")
output_lines.append(guidelines)
output_lines.append("")
else:
# Fallback
output_lines.append("**Go Linter enforces:**")
output_lines.append("- `userID` not `userId` (var-naming)")
output_lines.append("- `any` not `interface{}` (use-any)")
output_lines.append("- No `common/helpers/utils/shared/misc` packages")
output_lines.append("")
output_lines.append("→ Run `golangci-lint run` after completing Go tasks")
output_lines.append("")

output_lines.append("- Dependencies: always use `@latest` (hook enforces)")
output_lines.append(
"- Repository queries: use Filter pattern (`XxxFilter` + `getXxxCondition()`)"
)

if output_lines:
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "\n".join(output_lines),
}
}
)
)


if __name__ == "__main__":
main()
5 changes: 4 additions & 1 deletion plugins/harness/commands/harness-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ Ask user for features to track. For each feature:
Instead of using Write tool (blocked by guard hook), call initialization script:

```bash
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/harness_init.py \
# Find harness_init.py in workflow plugin
# CLAUDE_PLUGIN_ROOT points to current plugin (harness), workflow is sibling
PLUGIN_BASE=$(dirname ${CLAUDE_PLUGIN_ROOT})
python3 ${PLUGIN_BASE}/workflow/scripts/hooks/harness_init.py \
--project-dir "$(pwd)" \
--features '[
{"id": "auth-login", "description": "User login with JWT"},
Expand Down
2 changes: 1 addition & 1 deletion plugins/harness/commands/harness-supervisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ This ensures:

## See Also

- `skills/core/agent-harness/SKILL.md` — Full documentation
- `agent-harness` skill — Full documentation
- Anthropic article: "Effective Harnesses for Long-Running Agents"
3 changes: 1 addition & 2 deletions plugins/harness/skills/agent-harness/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,10 @@ Send a SINGLE message with MULTIPLE Task tool calls - they execute in parallel.

## Related Skills

- **workflow-orchestration** — Task-to-code traceability
- **unified-workflow** — Complete workflow from task to delivery
- **beads-workflow** — Task tracking details
- **tdd-enforcer** — Code-level testing
- **context-engineering** — Context management
- **reliable-execution** — Persistence patterns

## Version History

Expand Down
2 changes: 1 addition & 1 deletion plugins/tdd/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdd",
"description": "Test-Driven Development: TDD workflow enforcement, test analysis, coaching for Go, TypeScript, Python, Rust",
"version": "1.0.0",
"version": "1.1.1",
"author": {
"name": "11me"
}
Expand Down
15 changes: 15 additions & 0 deletions plugins/tdd/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hooks": {
"SessionStart": [
{
"once": true,
"hooks": [
{
"type": "command",
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session_context.py"
}
]
}
]
}
}
77 changes: 77 additions & 0 deletions plugins/tdd/scripts/hooks/session_context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env python3
"""SessionStart hook: inject TDD guidelines when TDD mode is enabled.

TDD mode is detected via:
1. Explicit config in .claude/tdd-enforcer.local.md
2. Auto-detect by presence of test files
"""

import json
import sys
from pathlib import Path

# Import shared detection utilities from workflow plugin
# This avoids code duplication between plugins
_workflow_lib = Path(__file__).parent.parent.parent.parent / "workflow/scripts/hooks/lib"
if _workflow_lib.exists():
sys.path.insert(0, str(_workflow_lib))
from detector import detect_tdd_mode
else:
# Fallback if workflow plugin not available
def detect_tdd_mode(cwd: Path) -> dict[str, bool]:
"""Minimal fallback detection."""
result = {"enabled": False, "strict": False}
config_path = cwd / ".claude" / "tdd-enforcer.local.md"
if config_path.exists():
try:
content = config_path.read_text(errors="ignore")
if "enabled: true" in content:
result["enabled"] = True
if "strictMode: true" in content:
result["strict"] = True
except OSError:
pass
return result


def main() -> None:
cwd = Path.cwd()
output_lines: list[str] = []

tdd_status = detect_tdd_mode(cwd)
if not tdd_status["enabled"]:
return

# Try to load TDD-GUIDELINES.md from plugin
guidelines_path = Path(__file__).parent.parent.parent / "skills/tdd-enforcer/TDD-GUIDELINES.md"

mode_label = "STRICT" if tdd_status["strict"] else "ACTIVE"
output_lines.append(f"## TDD Mode ({mode_label})")
output_lines.append("")

if guidelines_path.exists():
guidelines = guidelines_path.read_text().strip()
output_lines.append(guidelines)
else:
output_lines.append("**Cycle:** RED -> GREEN -> REFACTOR")
output_lines.append("1. Write failing test FIRST")
output_lines.append("2. Minimal implementation to pass")
output_lines.append("3. Refactor with tests passing")

output_lines.append("")

if output_lines:
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "\n".join(output_lines),
}
}
)
)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion plugins/tdd/skills/tdd-enforcer/TDD-GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
- Run tests after EVERY change
- One test = one behavior

→ Full reference: `skills/core/tdd-enforcer/SKILL.md`
→ Full reference: tdd-enforcer skill
Loading