Add Visual Output sections to all projman files: - 4 agent files with phase-specific headers (PLANNING, EXECUTION, CLOSING) - 16 command files with appropriate headers Headers use double-line box characters for projman branding: - Planning phase: TARGET PLANNING - Execution phase: LIGHTNING EXECUTION (+ progress block for orchestrator) - Closing phase: FLAG CLOSING - Setup commands: GEAR SETUP Closes #273, #274 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.4 KiB
description
| description |
|---|
| Quick project setup - configures only project-level settings (assumes system setup is complete) |
Project Initialization
Fast setup for a new project when system-level configuration is already complete.
Use this when:
- You've already run
/initial-setupon this machine - You're starting work on a new project/repository
- You just need to create the project
.envfile
Use /initial-setup instead if:
- This is your first time using the plugin
- MCP tools aren't working (might need system setup)
Pre-Flight Check
Step 1: Verify System Configuration Exists
Quickly verify system setup is complete:
cat ~/.config/claude/gitea.env 2>/dev/null | grep -v "^#" | grep -v "PASTE_YOUR" | grep "GITEA_API_TOKEN=" && echo "SYSTEM_OK" || echo "SYSTEM_MISSING"
If SYSTEM_MISSING:
Display this message and stop:
System configuration not found or incomplete.
It looks like the system-level setup hasn't been completed yet. Please run:
/initial-setup
This will configure both system credentials and this project.
If SYSTEM_OK: Continue to project setup.
Project Setup
Step 2: Verify Current Directory
pwd && git rev-parse --show-toplevel 2>/dev/null || echo "NOT_A_GIT_REPO"
If not a git repo, ask:
Use AskUserQuestion:
- Question: "This doesn't appear to be a git repository. Continue anyway?"
- Header: "Directory"
- Options:
- "Yes, continue here"
- "No, I'll navigate to the correct directory"
Step 3: Check for Existing Configuration
cat .env 2>/dev/null | grep "GITEA_REPO=" || echo "NOT_CONFIGURED"
If already configured:
Use AskUserQuestion:
- Question: "This project already has GITEA_ORG and GITEA_REPO configured. What would you like to do?"
- Header: "Existing"
- Options:
- "Keep existing configuration"
- "Reconfigure (replace current settings)"
If "Keep": End with success message.
Step 4: Detect Organization and Repository
Try to auto-detect from git remote:
git remote get-url origin 2>/dev/null
Extract organization:
git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\)\/[^/]*$/\1/'
Extract repository:
git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\)\.git$/\1/' | sed 's/.*\/\([^/]*\)$/\1/'
Step 5: Validate Repository via Gitea API
Verify the repository exists and is accessible:
source ~/.config/claude/gitea.env
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_API_TOKEN" "$GITEA_API_URL/repos/<detected-org>/<detected-repo>"
| HTTP Code | Action |
|---|---|
| 200 | Auto-fill - display "Verified: / exists" and skip to Step 8 |
| 404 | Repository not found - proceed to Step 6 |
| 401/403 | Permission issue - warn and proceed to Step 6 |
Step 6: Confirm Organization (only if API validation failed)
Use AskUserQuestion:
- Question: "Repository not found. Is '' the correct organization?"
- Header: "Organization"
- Options:
- "Yes, that's correct"
- "No, let me specify"
If "No", ask user to type the correct organization name.
Step 7: Confirm Repository Name (only if API validation failed)
Use AskUserQuestion:
- Question: "Is '' the correct repository name?"
- Header: "Repository"
- Options:
- "Yes, that's correct"
- "No, let me specify"
If "No", ask user to type the correct name.
After corrections, re-validate via API (Step 5).
Step 8: Create/Update Project Configuration
If .env exists:
Check if it already has other content and append:
echo "" >> .env
echo "# Added by /project-init" >> .env
echo "GITEA_ORG=<ORG_NAME>" >> .env
echo "GITEA_REPO=<REPO_NAME>" >> .env
If .env doesn't exist:
cat > .env << 'EOF'
# Project Configuration for projman
# Generated by /project-init
GITEA_ORG=<ORG_NAME>
GITEA_REPO=<REPO_NAME>
EOF
Step 9: Check .gitignore
grep -q "^\.env$" .gitignore 2>/dev/null && echo "GITIGNORE_OK" || echo "GITIGNORE_MISSING"
If GITIGNORE_MISSING:
Use AskUserQuestion:
- Question: "
.envis not in.gitignore. Add it to prevent committing secrets?" - Header: "gitignore"
- Options:
- "Yes, add .env to .gitignore (Recommended)"
- "No, I'll handle it manually"
If yes:
echo ".env" >> .gitignore
Complete
Display success message:
╔══════════════════════════════════════════════════════════════╗
║ PROJECT CONFIGURED ║
╠══════════════════════════════════════════════════════════════╣
║ Organization: <ORG_NAME> ║
║ Repository: <REPO_NAME> ║
║ Config file: ./.env ║
╚══════════════════════════════════════════════════════════════╝
You're ready to use projman commands:
• /sprint-plan - Start sprint planning
• /sprint-status - Check progress
• /labels-sync - Sync label taxonomy
Visual Output
When executing this command, display the plugin header:
╔══════════════════════════════════════════════════════════════════╗
║ 📋 PROJMAN ║
║ ⚙️ SETUP ║
║ Project Initialization ║
╚══════════════════════════════════════════════════════════════════╝
Then proceed with the project setup workflow.
Troubleshooting
MCP tools not working?
- Run
/initial-setupfor full setup including MCP server - Restart your Claude Code session after setup
Wrong repository configured?
- Edit
.envdirectly:nano .env - Or run
/project-initagain and choose "Reconfigure"