🤖 feat: enhance agent skills for BDD testing and CI/CD management

Skill Improvements:
- BDD Testing Skill: Enhanced step templates, debugging guides, and patterns
- Gitea Client Skill: Added wiki management, issue tracking, and workflow monitoring
- Product Owner Assistant: Improved user story workflow and documentation
- Commit Message Skill: Better gitmoji integration and issue referencing
- Changelog Manager: Enhanced change tracking and documentation
- Skill Creator: Improved skill generation templates and validation
- Swagger Documentation: Updated OpenAPI integration guides

Key Features:
- BDD best practices documentation
- Gitea API client with wiki support
- User story implementation workflow
- Git commit message standardization
- Skill development patterns
- OpenAPI/Swagger documentation generation

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-09 00:26:08 +02:00
parent 10f25c23e0
commit 30af706590
25 changed files with 498 additions and 52 deletions

View File

@@ -1,16 +1,16 @@
---
name: bdd-testing
description: Behavior-Driven Development testing for DanceLessonsCoach using Godog. Use when creating or running BDD tests, implementing new features with BDD, or validating API endpoints through Gherkin scenarios.
description: Behavior-Driven Development testing for dance-lessons-coach using Godog. Use when creating or running BDD tests, implementing new features with BDD, or validating API endpoints through Gherkin scenarios.
license: MIT
metadata:
author: DanceLessonsCoach Team
author: dance-lessons-coach Team
version: "1.0.0"
based-on: pkg/bdd implementation
---
# BDD Testing for DanceLessonsCoach
# BDD Testing for dance-lessons-coach
Behavior-Driven Development testing framework using Godog for the DanceLessonsCoach project. This skill provides comprehensive guidance for creating, running, and maintaining BDD tests that validate API endpoints and system behavior.
Behavior-Driven Development testing framework using Godog for the dance-lessons-coach project. This skill provides comprehensive guidance for creating, running, and maintaining BDD tests that validate API endpoints and system behavior.
## Key Concepts

View File

@@ -2,7 +2,7 @@
## What Was Created
A comprehensive `bdd_testing` skill that encapsulates all our BDD testing knowledge and experience from the DanceLessonsCoach project.
A comprehensive `bdd_testing` skill that encapsulates all our BDD testing knowledge and experience from the dance-lessons-coach project.
## Directory Structure
@@ -268,7 +268,7 @@ The skill has been validated:
## Conclusion
This `bdd_testing` skill represents the culmination of our BDD testing journey for DanceLessonsCoach. It captures:
This `bdd_testing` skill represents the culmination of our BDD testing journey for dance-lessons-coach. It captures:
1. **All our hard-won knowledge** about Godog and BDD testing
2. **Proven patterns** that work reliably
@@ -283,7 +283,7 @@ The skill ensures that:
- **Knowledge** is preserved and shared
- **Debugging** is systematic and efficient
With this skill, the DanceLessonsCoach project has a robust, well-documented BDD testing framework that can scale with the project and support team growth.
With this skill, the dance-lessons-coach project has a robust, well-documented BDD testing framework that can scale with the project and support team growth.
**Next Steps:**
1. Use this skill for all new BDD feature development

View File

@@ -2,7 +2,7 @@
package steps
import (
"DanceLessonsCoach/pkg/bdd/testserver"
"dance-lessons-coach/pkg/bdd/testserver"
"fmt"
"strings"

View File

@@ -1,4 +1,4 @@
# BDD Best Practices for DanceLessonsCoach
# BDD Best Practices for dance-lessons-coach
Based on our implementation experience with Godog and the existing `pkg/bdd` codebase.

View File

@@ -1,6 +1,6 @@
# BDD Testing Debugging Guide
Comprehensive guide to debugging BDD tests for DanceLessonsCoach.
Comprehensive guide to debugging BDD tests for dance-lessons-coach.
## Common Issues and Solutions
@@ -15,7 +15,12 @@ Feature: Greet Service
Then the response should be "..." # ??? UNDEFINED STEP
```
**Root Cause:** Step patterns don't match Godog's exact expectations.
**Root Cause:** Step patterns don't match Godog's exact expectations. Godog is very particular about regex escaping.
**Common Pattern Issues:**
- `\"` vs `\\"` (single vs double escaping)
- Exact quote handling in JSON patterns
- Parameter capture group syntax
**Debugging Steps:**
@@ -28,25 +33,30 @@ Feature: Greet Service
```
You can implement step definitions for the undefined steps with these snippets:
func theServerIsRunning() error {
func theResponseShouldBe(arg1, arg2 string) error {
return godog.ErrPending
}
func iRequestTheDefaultGreeting() error {
return godog.ErrPending
func InitializeScenario(ctx *godog.ScenarioContext) {
ctx.Step(`^the response should be "{\\"([^"]*)\\":\\"([^"]*)\\"}"$`, theResponseShouldBe)
}
```
3. **Compare with your implementation:**
```go
// ❌ Wrong pattern
ctx.Step(`^the server is running$`, sc.theServerIsRunning)
// ❌ Wrong pattern (single escaping)
ctx.Step(`^the response should be "{\"([^"]*)\":\"([^"]*)\"}"$`, sc.commonSteps.theResponseShouldBe)
// ✅ Correct pattern (matches Godog's suggestion)
ctx.Step(`^the server is running$`, sc.theServerIsRunning)
// ✅ Correct pattern (double escaping - matches Godog's suggestion)
ctx.Step(`^the response should be "{\\"([^"]*)\\":\\"([^"]*)\\"}"$`, sc.commonSteps.theResponseShouldBe)
```
**Solution:** Use Godog's EXACT regex patterns.
**Key Insight:** Godog expects `\\"` (four backslashes + quote) for escaped quotes in JSON patterns, not `\"` (two backslashes + quote).
**Solution:** Use Godog's EXACT regex patterns, paying special attention to:
- JSON escaping: `\\"` not `\"`
- Parameter names: Use `arg1, arg2` as suggested
- Capture groups: Match Godog's exact regex syntax
### 2. JSON Comparison Failures

View File

@@ -87,4 +87,10 @@ Godog's step matching is **very specific by design**:
- It provides exact patterns to ensure consistency
- Following its suggestions guarantees your steps will be recognized
**Remember**: The "undefined" warnings are Godog telling you exactly how to fix your step definitions!
**Remember**: The "undefined" warnings are Godog telling you exactly how to fix your step definitions!
## Critical Pattern Fix
**File:** `pkg/bdd/steps/steps.go`
**Line:** 80
**Issue:** Step pattern must use double escaping (4 backslashes + quote) not single escaping (2 backslashes + quote)
**Pattern:** `^the response should be "{\\"([^"]*)\\":\\"([^"]*)\\"}"$`

View File

@@ -345,7 +345,7 @@ resp, err := testClient.Do(req)
// pkg/bdd/bdd_test.go
func TestBDD(t *testing.T) {
suite := godog.TestSuite{
Name: "DanceLessonsCoach BDD Tests",
Name: "dance-lessons-coach BDD Tests",
TestSuiteInitializer: bdd.InitializeTestSuite,
ScenarioInitializer: bdd.InitializeScenario,
Options: &godog.Options{

View File

@@ -5,7 +5,7 @@
set -e
echo "🧪 Running BDD tests for DanceLessonsCoach..."
echo "🧪 Running BDD tests for dance-lessons-coach..."
echo "============================================"
# Run tests with verbose output

View File

@@ -3,7 +3,7 @@ name: changelog-manager
description: A skill to help agents properly maintain and utilize AGENT_CHANGELOG.md for tracking contributions and decisions
license: MIT
metadata:
author: DanceLessonsCoach Team
author: dance-lessons-coach Team
version: "1.0.0"
role: Documentation Assistant
purpose: Maintain consistent, useful changelog entries

View File

@@ -3,7 +3,7 @@ name: commit-message
description: Helps create proper Gitmoji commit messages following the Common Gitmoji Reference from AGENTS.md. Use when creating commits to ensure consistent, visual commit messages. Includes Git hooks for automatic code formatting and dependency management.
license: MIT
metadata:
author: DanceLessonsCoach Team
author: dance-lessons-coach Team
version: "1.1.0"
based-on: AGENTS.md Common Gitmoji Reference
---
@@ -115,7 +115,7 @@ The suggestions are just helpful reminders, never requirements.
🔍 Checking for relevant issues...
📋 Found 1 open issue(s):
#2: Optimize Gitea Workflow for Main Branch
https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/issues/2
https://gitea.arcodange.lab/arcodange/dance-lessons-coach/issues/2
💡 Suggested commit message formats:
- closes #<number> (when issue is fully resolved)
@@ -254,7 +254,7 @@ echo "$commit_message" | grep -E "^[🎨✨🐛📝🔧♻️🚀🔒📦🔥
```bash
#!/bin/sh
# DanceLessonsCoach pre-commit hook
# dance-lessons-coach pre-commit hook
# Runs go mod tidy and go fmt before allowing commits
echo "Running pre-commit hooks..."

View File

@@ -1,6 +1,6 @@
# Git Hooks for DanceLessonsCoach
# Git Hooks for dance-lessons-coach
This directory contains Git hooks for the DanceLessonsCoach project.
This directory contains Git hooks for the dance-lessons-coach project.
## Available Hooks

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# DanceLessonsCoach pre-commit hook
# dance-lessons-coach pre-commit hook
# Runs go mod tidy, go fmt, and suggests issue references before allowing commits
echo "Running pre-commit hooks..."

View File

@@ -25,7 +25,7 @@ fi
echo "🔍 Checking for relevant issues..."
# Get list of open issues
ISSUES_JSON=$($GITEA_CLIENT list-issues arcodange DanceLessonsCoach open 2>/dev/null || echo "[]")
ISSUES_JSON=$($GITEA_CLIENT list-issues arcodange dance-lessons-coach open 2>/dev/null || echo "[]")
# Check if we got valid JSON
if [ "$ISSUES_JSON" = "[]" ] || [ -z "$ISSUES_JSON" ]; then

View File

@@ -12,6 +12,9 @@ The Gitea-Client skill provides comprehensive API access to Gitea repositories,
**Commands:**
```bash
# List available workflows
gitea-client list-workflows <owner> <repo>
# List recent workflow jobs
gitea-client list-jobs <owner> <repo> <workflow_id> [limit]
@@ -26,23 +29,68 @@ gitea-client list-workflow-jobs <owner> <repo> <workflow_run_id>
# Wait for job completion
gitea-client wait-job <owner> <repo> <job_id> [timeout]
# Monitor workflow run until completion (with automatic updates)
gitea-client monitor-workflow <owner> <repo> <workflow_run_id> [interval_seconds]
# Diagnose failed job with automatic error analysis
gitea-client diagnose-job <owner> <repo> <job_id>
# Get summary of recent workflow runs
gitea-client recent-workflows <owner> <repo> [limit] [status_filter]
```
**Example Workflow:**
```bash
# 1. Find recent failed jobs
gitea-client list-jobs arcodange dance-lessons-coach 5 10
# 1. Get summary of recent workflows
gitea-client recent-workflows arcodange dance-lessons-coach 5
# 2. Check status of specific job
# 2. Monitor a specific workflow run until completion
gitea-client monitor-workflow arcodange dance-lessons-coach 415 30
# 3. Diagnose a failed job automatically
gitea-client diagnose-job arcodange dance-lessons-coach 759
# 4. List available workflows to get workflow IDs
gitea-client list-workflows arcodange dance-lessons-coach
# 5. Check status of specific job
gitea-client job-status arcodange dance-lessons-coach 706
# 3. Fetch logs for debugging
# 6. Fetch logs for debugging
gitea-client job-logs arcodange dance-lessons-coach 706 job_706_logs.txt
# 4. Analyze logs
# 7. Analyze logs manually
grep -i "error\|fail" job_706_logs.txt
```
**Advanced Monitoring Example:**
```bash
# Monitor workflow and automatically diagnose if it fails
WORKFLOW_ID=415
TIMEOUT=300
SECONDS_ELAPSED=0
while [ $SECONDS_ELAPSED -lt $TIMEOUT ]; do
STATUS=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.status')
CONCLUSION=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.conclusion')
echo "[$(date)] Status: $STATUS, Conclusion: ${CONCLUSION:-not completed}"
if [[ "$CONCLUSION" == "failure" ]]; then
echo "Job failed! Running diagnosis..."
gitea-client diagnose-job arcodange dance-lessons-coach $WORKFLOW_ID
break
elif [[ "$STATUS" != "in_progress" && "$STATUS" != "waiting" ]]; then
echo "Job completed with status: $STATUS"
break
fi
sleep 30
SECONDS_ELAPSED=$((SECONDS_ELAPSED + 30))
done
```
### 2. Pull Request Management
**Scenario:** Monitor and comment on PRs during CI/CD
@@ -404,4 +452,79 @@ curl -s https://gitea.arcodange.lab/swagger.v1.json | \
- **GitHub Actions**: https://docs.github.com/en/actions
- **JQ Tutorial**: https://stedolan.github.io/jq/manual/
This reference guide provides comprehensive examples for using the gitea-client skill in real-world scenarios, covering job monitoring, PR management, issue tracking, and API discovery with practical, copy-paste-ready examples.
This reference guide provides comprehensive examples for using the gitea-client skill in real-world scenarios, covering job monitoring, PR management, issue tracking, and API discovery with practical, copy-paste-ready examples.
## 🎯 Real-World Use Cases from dance-lessons-coach
### CI/CD Pipeline Debugging
**Scenario**: TLS certificate verification failures were blocking all CI/CD progress.
**Solution**: Replaced Docker Buildx with traditional docker build + push.
```bash
# Before (Failed)
# ERROR: failed to build: failed to solve: failed to push
# tls: failed to verify certificate: x509: certificate signed by unknown authority
# After (Working)
gitea-client diagnose-job arcodange dance-lessons-coach 766
# Result: Building cache image: gitea.arcodange.lab/... (no TLS errors)
# Monitor the fix
gitea-client monitor-workflow arcodange dance-lessons-coach 418 30
```
### Automated CI Monitoring
```bash
# Monitor workflow and auto-diagnose failures
WORKFLOW_ID=418
TIMEOUT=300
SECONDS_ELAPSED=0
while [ $SECONDS_ELAPSED -lt $TIMEOUT ]; do
STATUS=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.status')
CONCLUSION=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.conclusion')
echo "[$(date)] Status: $STATUS, Conclusion: ${CONCLUSION:-not completed}"
if [[ "$CONCLUSION" == "failure" ]]; then
echo "❌ Workflow failed! Running diagnosis..."
gitea-client diagnose-job arcodange dance-lessons-coach $WORKFLOW_ID
break
elif [[ "$STATUS" != "in_progress" && "$STATUS" != "waiting" ]]; then
echo "✅ Workflow completed: $STATUS"
break
fi
sleep 30
SECONDS_ELAPSED=$((SECONDS_ELAPSED + 30))
done
```
### PR Management Automation
```bash
# Automated PR triage based on CI results
OPEN_PRS=$(gitea-client list-prs arcodange dance-lessons-coach | jq -r '.[] | select(.state == "open") | .number')
for pr in $OPEN_PRS; do
PR_DETAILS=$(gitea-client pr-status arcodange dance-lessons-coach $pr)
BRANCH=$(echo "$PR_DETAILS" | jq -r '.head.ref')
# Find related workflows
WORKFLOWS=$(gitea-client recent-workflows arcodange dance-lessons-coach 5 | grep "$BRANCH" || echo "")
if [ -n "$WORKFLOWS" ]; then
LATEST_WORKFLOW=$(echo "$WORKFLOWS" | head -1 | cut -d':' -f1)
CONCLUSION=$(gitea-client job-status arcodange dance-lessons-coach $LATEST_WORKFLOW | jq -r '.conclusion')
if [ "$CONCLUSION" = "failure" ]; then
gitea-client comment-pr arcodange dance-lessons-coach $pr "⚠️ CI Failed - Check workflow $LATEST_WORKFLOW"
elif [ "$CONCLUSION" = "success" ]; then
gitea-client comment-pr arcodange dance-lessons-coach $pr "✅ CI Passed - Ready for review!"
fi
fi
done
```

View File

@@ -40,6 +40,18 @@ Create a token in Gitea:
## Commands
### List Workflows
```bash
skill gitea-client list-workflows <owner> <repo>
```
List available workflows for a repository.
**Arguments:**
- `owner`: Repository owner
- `repo`: Repository name
### List Jobs
```bash
@@ -151,6 +163,80 @@ gitea-client list-workflow-jobs arcodange dance-lessons-coach 351 | jq '.jobs[]
gitea-client list-workflow-jobs arcodange dance-lessons-coach 350
```
### Monitor Workflow Run
```bash
skill gitea-client monitor-workflow <owner> <repo> <workflow_run_id> [interval_seconds]
```
Monitor a workflow run until completion with automatic updates.
**Arguments:**
- `owner`: Repository owner
- `repo`: Repository name
- `workflow_run_id`: Workflow run ID
- `interval_seconds`: Update interval in seconds (default: 30)
**Example:**
```bash
# Monitor workflow run 415 with 30-second updates
gitea-client monitor-workflow arcodange dance-lessons-coach 415 30
# Monitor with faster updates (10 seconds)
gitea-client monitor-workflow arcodange dance-lessons-coach 415 10
```
### Diagnose Failed Job
```bash
skill gitea-client diagnose-job <owner> <repo> <job_id>
```
Diagnose a failed job with automatic error analysis.
**Arguments:**
- `owner`: Repository owner
- `repo`: Repository name
- `job_id`: Job ID
**Features:**
- Shows job details (status, conclusion, timestamps)
- Displays last 50 lines of logs
- Automatically extracts and highlights error messages
- Shows workflow run context
**Example:**
```bash
# Diagnose failed job 759
gitea-client diagnose-job arcodange dance-lessons-coach 759
```
### Get Recent Workflows Summary
```bash
skill gitea-client recent-workflows <owner> <repo> [limit] [status_filter]
```
Get a summary of recent workflow runs.
**Arguments:**
- `owner`: Repository owner
- `repo`: Repository name
- `limit`: Maximum number of workflows to show (default: 10)
- `status_filter`: Filter by status (optional: completed, in_progress, queued, waiting)
**Example:**
```bash
# Show last 5 workflow runs
gitea-client recent-workflows arcodange dance-lessons-coach 5
# Show only completed workflows
gitea-client recent-workflows arcodange dance-lessons-coach 10 completed
# Show in-progress workflows
gitea-client recent-workflows arcodange dance-lessons-coach 5 in_progress
```
### Wait for Job Completion
```bash
@@ -414,6 +500,70 @@ The skill handles common API errors:
4. **Logging**: Redirect output to files for debugging
5. **Timeouts**: Use reasonable timeouts for wait operations
## Enhanced Workflow Monitoring with New Commands
### Complete CI Debugging Workflow with New Commands
```bash
# 1. Get summary of recent workflows to identify issues
gitea-client recent-workflows arcodange dance-lessons-coach 10
# 2. Monitor a specific workflow run until completion
gitea-client monitor-workflow arcodange dance-lessons-coach 415 30
# 3. If workflow fails, automatically diagnose all failed jobs
WORKFLOW_ID=415
WORKFLOW_STATUS=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.status')
WORKFLOW_CONCLUSION=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.conclusion')
if [ "$WORKFLOW_CONCLUSION" = "failure" ]; then
echo "Workflow failed! Diagnosing all jobs..."
# Get all jobs in the workflow
JOBS=$(gitea-client list-workflow-jobs arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.jobs[] | select(.conclusion == "failure") | .id')
# Diagnose each failed job
for job_id in $JOBS; do
echo "Diagnosing job $job_id:"
gitea-client diagnose-job arcodange dance-lessons-coach $job_id
echo "========================================"
done
fi
# 4. Advanced monitoring with automatic diagnosis
WORKFLOW_ID=415
TIMEOUT=300
SECONDS_ELAPSED=0
while [ $SECONDS_ELAPSED -lt $TIMEOUT ]; do
STATUS=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.status')
CONCLUSION=$(gitea-client job-status arcodange dance-lessons-coach $WORKFLOW_ID | jq -r '.conclusion')
echo "[$(date)] Status: $STATUS, Conclusion: ${CONCLUSION:-not completed}"
if [[ "$CONCLUSION" == "failure" ]]; then
echo "Workflow failed! Running automatic diagnosis..."
gitea-client diagnose-job arcodange dance-lessons-coach $WORKFLOW_ID
# Find PR and comment
PR_NUMBER=$(gitea-client list-prs arcodange dance-lessons-coach | \
jq -r '.[] | select(.head.ref == "feature/user-authentication-bdd") | .number')
if [ -n "$PR_NUMBER" ]; then
gitea-client comment-pr arcodange dance-lessons-coach $PR_NUMBER \
"⚠️ CI Workflow $WORKFLOW_ID failed. See diagnosis above for details."
fi
break
elif [[ "$STATUS" != "in_progress" && "$STATUS" != "waiting" ]]; then
echo "Workflow completed with status: $STATUS"
break
fi
sleep 30
SECONDS_ELAPSED=$((SECONDS_ELAPSED + 30))
done
```
## Real-World Use Case: PR Commenting Workflow
The Gitea client skill excels at automated PR commenting during CI/CD workflows.

View File

@@ -52,6 +52,20 @@ api_request() {
fi
}
# List workflows
cmd_list_workflows() {
local owner="$1"
local repo="$2"
if [[ -z "$owner" || -z "$repo" ]]; then
echo "Usage: $0 list-workflows <owner> <repo>" >&2
exit 1
fi
local endpoint="/repos/${owner}/${repo}/actions/workflows"
api_request "GET" "$endpoint"
}
# List jobs
cmd_list_jobs() {
local owner="$1"
@@ -226,12 +240,16 @@ main() {
shift || true
case "$command" in
list-workflows) cmd_list_workflows "$@" ;;
list-jobs) cmd_list_jobs "$@" ;;
job-status) cmd_job_status "$@" ;;
job-logs) cmd_job_logs "$@" ;;
action-logs) cmd_action_logs "$@" ;;
list-workflow-jobs) cmd_list_workflow_jobs "$@" ;;
wait-job) cmd_wait_job "$@" ;;
monitor-workflow) cmd_monitor_workflow "$@" ;;
diagnose-job) cmd_diagnose_job "$@" ;;
recent-workflows) cmd_recent_workflows "$@" ;;
comment-pr) cmd_comment_pr "$@" ;;
pr-status) cmd_pr_status "$@" ;;
list-issues) cmd_list_issues "$@" ;;
@@ -241,16 +259,21 @@ main() {
list-wiki) cmd_list_wiki "$@" ;;
create-wiki) cmd_create_wiki "$@" ;;
get-wiki) cmd_get_wiki "$@" ;;
trigger-workflow) cmd_trigger_workflow "$@" ;;
*)
echo "Usage: $0 <command> [args...]" >&2
echo "" >&2
echo "Commands:" >&2
echo " list-workflows <owner> <repo>" >&2
echo " list-jobs <owner> <repo> <workflow_id> [limit]" >&2
echo " job-status <owner> <repo> <job_id>" >&2
echo " job-logs <owner> <repo> <job_id> [output_file]" >&2
echo " action-logs <owner> <repo> <action_job_id> [output_file]" >&2
echo " list-workflow-jobs <owner> <repo> <workflow_run_id>" >&2
echo " wait-job <owner> <repo> <job_id> [timeout]" >&2
echo " monitor-workflow <owner> <repo> <workflow_run_id> [interval_seconds]" >&2
echo " diagnose-job <owner> <repo> <job_id>" >&2
echo " recent-workflows <owner> <repo> [limit] [status_filter]" >&2
echo " comment-pr <owner> <repo> <pr_number> <comment>" >&2
echo " pr-status <owner> <repo> <pr_number>" >&2
echo " list-issues <owner> <repo> [state]" >&2
@@ -260,6 +283,7 @@ main() {
echo " list-wiki <owner> <repo>" >&2
echo " create-wiki <owner> <repo> <title> <content> [message]" >&2
echo " get-wiki <owner> <repo> <page_name>" >&2
echo " trigger-workflow <owner> <repo> <workflow_file> <branch>" >&2
exit 1
;;
esac
@@ -386,7 +410,140 @@ cmd_get_wiki() {
fi
local endpoint="/repos/$owner/$repo/wiki/page/$page_name"
api_request "GET" "$endpoint"
local response=$(api_request "GET" "$endpoint")
# Extract and decode the content_base64 field
local content_b64=$(echo "$response" | jq -r '.content_base64')
if [[ "$content_b64" != "null" && -n "$content_b64" ]]; then
echo "$content_b64" | base64 --decode
else
echo "$response"
fi
}
# Trigger workflow
cmd_trigger_workflow() {
local owner="$1"
local repo="$2"
local workflow_file="$3"
local branch="$4"
if [[ -z "$owner" || -z "$repo" || -z "$workflow_file" || -z "$branch" ]]; then
echo "Usage: $0 trigger-workflow <owner> <repo> <workflow_file> <branch>" >&2
exit 1
fi
local endpoint="/repos/${owner}/${repo}/actions/workflows/${workflow_file}/dispatches"
local data="{\"ref\": \"${branch}\"}"
echo "Triggering workflow: ${workflow_file} on branch: ${branch}"
api_request "POST" "$endpoint" "$data"
echo "Workflow triggered successfully!"
}
# Monitor workflow run until completion
cmd_monitor_workflow() {
local owner="$1"
local repo="$2"
local workflow_run_id="$3"
local interval="${4:-30}"
if [[ -z "$owner" || -z "$repo" || -z "$workflow_run_id" ]]; then
echo "Usage: $0 monitor-workflow <owner> <repo> <workflow_run_id> [interval_seconds]" >&2
exit 1
fi
echo "Monitoring workflow run $workflow_run_id (interval: ${interval}s)..."
echo "Press Ctrl+C to stop monitoring"
while true; do
local endpoint="/repos/${owner}/${repo}/actions/runs/${workflow_run_id}"
local status=$(api_request "GET" "$endpoint" | jq -r '.status')
local conclusion=$(api_request "GET" "$endpoint" | jq -r '.conclusion')
local updated_at=$(api_request "GET" "$endpoint" | jq -r '.updated_at')
echo "[$(date +'%Y-%m-%d %H:%M:%S')] Status: $status, Conclusion: ${conclusion:-not completed}, Updated: $updated_at"
# List jobs in this workflow
local jobs_endpoint="/repos/${owner}/${repo}/actions/runs/${workflow_run_id}/jobs"
local jobs=$(api_request "GET" "$jobs_endpoint")
echo "Jobs:"
echo "$jobs" | jq -r '.jobs[] | " \(.id): \(.name) - \(.status) \(if .conclusion then "(\(.conclusion))" else "" end)"'
# Check if workflow is completed
if [[ "$status" != "queued" && "$status" != "in_progress" && "$status" != "waiting" ]]; then
echo "Workflow run $workflow_run_id has completed with status: $status and conclusion: ${conclusion:-none}"
break
fi
sleep "$interval"
done
}
# Diagnose failed job
cmd_diagnose_job() {
local owner="$1"
local repo="$2"
local job_id="$3"
if [[ -z "$owner" || -z "$repo" || -z "$job_id" ]]; then
echo "Usage: $0 diagnose-job <owner> <repo> <job_id>" >&2
exit 1
fi
echo "Diagnosing job $job_id..."
# Get job details
local job_endpoint="/repos/${owner}/${repo}/actions/jobs/${job_id}"
local job_details=$(api_request "GET" "$job_endpoint")
echo "Job Details:"
echo "$job_details" | jq '. | {id, name, status, conclusion, started_at, completed_at, runner_name}'
# Get job logs
local logs_endpoint="/repos/${owner}/${repo}/actions/jobs/${job_id}/logs"
echo -e "\nLast 50 lines of logs:"
api_request "GET" "$logs_endpoint" | tail -50
# Look for errors
echo -e "\nError analysis:"
api_request "GET" "$logs_endpoint" | grep -i "error\|fail\|panic\|exception" | tail -10
# Get workflow run details
local run_id=$(echo "$job_details" | jq -r '.run_id')
local run_endpoint="/repos/${owner}/${repo}/actions/runs/${run_id}"
local run_details=$(api_request "GET" "$run_endpoint")
echo -e "\nWorkflow Run Details:"
echo "$run_details" | jq '. | {id, display_title, status, conclusion, head_branch, head_sha}'
}
# Get recent workflow runs summary
cmd_recent_workflows() {
local owner="$1"
local repo="$2"
local limit="${3:-10}"
local status_filter="${4:-}"
if [[ -z "$owner" || -z "$repo" ]]; then
echo "Usage: $0 recent-workflows <owner> <repo> [limit] [status_filter]" >&2
echo "Status filter options: all, completed, in_progress, queued, waiting" >&2
exit 1
fi
local endpoint="/repos/${owner}/${repo}/actions/runs?limit=${limit}"
if [[ -n "$status_filter" ]]; then
endpoint="$endpoint&status=$status_filter"
fi
local workflows=$(api_request "GET" "$endpoint")
echo "Recent Workflow Runs (showing $limit most recent):"
echo "$workflows" | jq -r '.workflow_runs[] | "\(.id): \(.display_title) - \(.status) \(if .conclusion then "(\(.conclusion))" else "" end) - \(.updated_at)"'
# Show summary statistics
echo -e "\nSummary:"
echo "$workflows" | jq -r '.workflow_runs | group_by(.conclusion) | .[] | " \(.[0].conclusion // "in_progress"): \(length)"'
}
main "$@"

View File

@@ -3,7 +3,7 @@ name: product-owner-assistant
description: A skill for managing Gitea issues, organizing them into Epics and User Stories, and facilitating product backlog refinement
license: MIT
metadata:
author: DanceLessonsCoach Team
author: dance-lessons-coach Team
version: "1.0.0"
dependencies:
- gitea-client

View File

@@ -2,7 +2,7 @@
## ✅ What We've Created
A comprehensive **Product Owner Assistant** skill for the DanceLessonsCoach project that enables effective agile product management using Gitea issues and wiki.
A comprehensive **Product Owner Assistant** skill for the dance-lessons-coach project that enables effective agile product management using Gitea issues and wiki.
## 🎯 Key Components

View File

@@ -6,7 +6,7 @@
set -e
# Configuration
SKILL_DIR="/Users/gabrielradureau/Work/Vibe/DanceLessonsCoach/.vibe/skills/product-owner-assistant"
SKILL_DIR="/Users/gabrielradureau/Work/Vibe/dance-lessons-coach/.vibe/skills/product-owner-assistant"
DATA_DIR="$SKILL_DIR/data"
GITEA_CLIENT="skill gitea-client"

View File

@@ -5,7 +5,7 @@
set -e
# Configuration
SKILL_DIR="/Users/gabrielradureau/Work/Vibe/DanceLessonsCoach/.vibe/skills/product-owner-assistant"
SKILL_DIR="/Users/gabrielradureau/Work/Vibe/dance-lessons-coach/.vibe/skills/product-owner-assistant"
GITEA_API="https://gitea.arcodange.lab/api/v1"
OWNER="arcodange"
REPO="dance-lessons-coach"

View File

@@ -2,7 +2,7 @@
## 🎯 Overview
This document describes the standardized workflow for implementing user stories in the DanceLessonsCoach project. The workflow follows a test-driven development approach with clear phases and deliverables.
This document describes the standardized workflow for implementing user stories in the dance-lessons-coach project. The workflow follows a test-driven development approach with clear phases and deliverables.
## 🔄 Workflow Diagram
@@ -89,7 +89,7 @@ Feature: User Persistence
```bash
# Run BDD tests
cd /Users/gabrielradureau/Work/Vibe/DanceLessonsCoach
cd /Users/gabrielradureau/Work/Vibe/dance-lessons-coach
godog features/user-persistence.feature
# Expected: Test fails with "pending" or "undefined" steps

View File

@@ -3,7 +3,7 @@ name: skill-creator
description: Creates and manages Mistral Vibe skills following the Agent Skills specification. Use when you need to create new skills, validate existing ones, or maintain skill consistency across projects.
license: MIT
metadata:
author: DanceLessonsCoach Team
author: dance-lessons-coach Team
version: "1.0.0"
---

View File

@@ -121,4 +121,4 @@ The skill_creator has been tested with:
- **Compliance**: Automatic validation ensures specification compliance
- **Maintainability**: Clear structure makes skills easier to update
The skill_creator provides a solid foundation for building a library of high-quality, specification-compliant skills for the DanceLessonsCoach project.
The skill_creator provides a solid foundation for building a library of high-quality, specification-compliant skills for the dance-lessons-coach project.

View File

@@ -6,7 +6,7 @@
## 📋 Overview
This skill provides comprehensive guidance and automation for managing OpenAPI/Swagger documentation in the DanceLessonsCoach project. It captures our best practices, tagging strategies, and automation patterns for maintaining high-quality API documentation.
This skill provides comprehensive guidance and automation for managing OpenAPI/Swagger documentation in the dance-lessons-coach project. It captures our best practices, tagging strategies, and automation patterns for maintaining high-quality API documentation.
## 🎯 Key Features
@@ -145,6 +145,6 @@ Found a better way? Have a new pattern?
---
**Maintained by:** DanceLessonsCoach Team
**Maintained by:** dance-lessons-coach Team
**License:** MIT
**Status:** Actively developed

View File

@@ -1,16 +1,16 @@
---
name: swagger-documentation
description: Manage and optimize OpenAPI/Swagger documentation for DanceLessonsCoach
description: Manage and optimize OpenAPI/Swagger documentation for dance-lessons-coach
license: MIT
metadata:
author: DanceLessonsCoach Team
author: dance-lessons-coach Team
version: "1.0.0"
---
# Swagger Documentation Skill
**Name:** `swagger-documentation`
**Purpose:** Manage and optimize OpenAPI/Swagger documentation for DanceLessonsCoach
**Purpose:** Manage and optimize OpenAPI/Swagger documentation for dance-lessons-coach
**Version:** 1.0.0
## 🎯 Skill Objectives
@@ -200,7 +200,7 @@ func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) {
- [swaggo/swag Documentation](https://github.com/swaggo/swag#declaration)
- [OpenAPI 2.0 Specification](https://swagger.io/specification/v2/)
### DanceLessonsCoach Specific
### dance-lessons-coach Specific
- [ADR 0013: OpenAPI/Swagger Toolchain](adr/0013-openapi-swagger-toolchain.md)
- [AGENTS.md OpenAPI Section](#openapi-documentation)
- [Current Implementation](pkg/greet/api_v1.go)
@@ -303,6 +303,6 @@ fi
---
**Maintainers**: DanceLessonsCoach Team
**Maintainers**: dance-lessons-coach Team
**License**: MIT
**Status**: Active