Add repo-conventions skill and /create-repo command

Skill documents standard repo structure, naming conventions,
open vs proprietary guidance, and CI/CD patterns.

Command scaffolds new repos with vision.md, CLAUDE.md, Makefile,
CI workflow, and .gitignore - all linked to the architecture repo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-07 23:58:16 +01:00
parent 305e4b8927
commit 0e1a65f0e3
2 changed files with 391 additions and 0 deletions

195
commands/create-repo.md Normal file
View File

@@ -0,0 +1,195 @@
---
description: Create a new repository with standard structure. Scaffolds vision.md, CLAUDE.md, and CI configuration.
argument-hint: <repo-name>
---
# Create Repository
@~/.claude/skills/repo-conventions/SKILL.md
@~/.claude/skills/vision-management/SKILL.md
@~/.claude/skills/gitea/SKILL.md
Create a new repository with Flowmade's standard structure.
## Process
1. **Get repository name**: Use `$1` or ask the user
- Validate: lowercase, hyphens only, no `flowmade-` prefix
- Check it doesn't already exist: `tea repos flowmade-one/<name>`
2. **Determine visibility**:
- Ask: "Should this repo be public (open source) or private (proprietary)?"
- Refer to repo-conventions skill for guidance on open vs proprietary
3. **Gather vision context**:
- Read the organization manifesto: `../architecture/manifesto.md`
- Ask: "What does this product do? (one sentence)"
- Ask: "Which manifesto personas does it serve?"
- Ask: "What problem does it solve?"
4. **Create the repository on Gitea**:
```bash
tea repos create --name <repo-name> --private/--public --description "<description>"
```
5. **Clone and set up structure**:
```bash
# Clone the new repo
git clone ssh://git@git.flowmade.one/flowmade-one/<repo-name>.git
cd <repo-name>
```
6. **Create vision.md**:
- Use the vision structure template from vision-management skill
- Link to `../architecture/manifesto.md`
- Fill in based on user's answers
7. **Create CLAUDE.md**:
```markdown
# <Repo Name>
<One-line description from step 3>
## Setup
```bash
# TODO: Add setup instructions
```
## Project Structure
TODO: Document key directories once code exists.
## Development
```bash
make build # Build the project
make test # Run tests
make lint # Run linters
```
```
8. **Create Makefile** (basic template):
```makefile
.PHONY: build test lint
build:
@echo "TODO: Add build command"
test:
@echo "TODO: Add test command"
lint:
@echo "TODO: Add lint command"
```
9. **Create CI workflow**:
```bash
mkdir -p .gitea/workflows
```
Create `.gitea/workflows/ci.yaml`:
```yaml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: make build
- name: Test
run: make test
- name: Lint
run: make lint
```
10. **Create .gitignore** (basic, expand based on language):
```
# IDE
.idea/
.vscode/
*.swp
# OS
.DS_Store
Thumbs.db
# Build artifacts
/dist/
/build/
/bin/
# Dependencies (language-specific, add as needed)
/node_modules/
/vendor/
```
11. **Initial commit and push**:
```bash
git add .
git commit -m "Initial repository structure
- vision.md linking to organization manifesto
- CLAUDE.md with project instructions
- CI workflow template
- Basic Makefile
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push -u origin main
```
12. **Report success**:
```
Repository created: https://git.flowmade.one/flowmade-one/<repo-name>
Next steps:
1. cd ../<repo-name>
2. Update CLAUDE.md with actual setup instructions
3. Update Makefile with real build commands
4. Start building!
```
## Output Example
```
## Creating Repository: my-service
Visibility: Private (proprietary)
Description: Internal service for processing events
### Files Created
- vision.md (linked to manifesto)
- CLAUDE.md (project instructions)
- Makefile (build template)
- .gitea/workflows/ci.yaml (CI pipeline)
- .gitignore (standard ignores)
### Repository URL
https://git.flowmade.one/flowmade-one/my-service
### Next Steps
1. cd ../my-service
2. Update CLAUDE.md with setup instructions
3. Update Makefile with build commands
4. Start coding!
```
## Guidelines
- Always link vision.md to the sibling architecture repo
- Keep initial structure minimal - add complexity as needed
- CI should pass on empty repo (use placeholder commands)
- Default to private unless explicitly open-sourcing