migrate mosaic home to xdg config path
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Authentication & Authorization Guide
|
||||
|
||||
## Before Starting
|
||||
1. Check assigned issue: `~/.mosaic/rails/git/issue-list.sh -a @me`
|
||||
1. Check assigned issue: `~/.config/mosaic/rails/git/issue-list.sh -a @me`
|
||||
2. Review existing auth implementation in codebase
|
||||
3. Review Vault secrets structure: `docs/vault-secrets-structure.md`
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Backend Development Guide
|
||||
|
||||
## Before Starting
|
||||
1. Check assigned issue: `~/.mosaic/rails/git/issue-list.sh -a @me`
|
||||
1. Check assigned issue: `~/.config/mosaic/rails/git/issue-list.sh -a @me`
|
||||
2. Create scratchpad: `docs/scratchpads/{issue-number}-{short-name}.md`
|
||||
3. Review API contracts and database schema
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
- Use project's established auth pattern
|
||||
- Validate tokens on every request
|
||||
- Check permissions before operations
|
||||
- See `~/.mosaic/guides/authentication.md` for details
|
||||
- See `~/.config/mosaic/guides/authentication.md` for details
|
||||
|
||||
## Testing Requirements (TDD)
|
||||
1. Write tests BEFORE implementation
|
||||
@@ -73,7 +73,7 @@ class TestResourceEndpoint:
|
||||
|
||||
## Code Style
|
||||
- Follow Google Style Guide for your language
|
||||
- **TypeScript: Follow `~/.mosaic/guides/typescript.md` — MANDATORY**
|
||||
- **TypeScript: Follow `~/.config/mosaic/guides/typescript.md` — MANDATORY**
|
||||
- Use linter/formatter from project configuration
|
||||
- Keep functions focused and small
|
||||
- Document complex business logic
|
||||
|
||||
@@ -15,7 +15,7 @@ This guide covers how to bootstrap a project so AI agents (Claude, Codex, etc.)
|
||||
|
||||
```bash
|
||||
# Automated bootstrap (recommended)
|
||||
~/.mosaic/rails/bootstrap/init-project.sh \
|
||||
~/.config/mosaic/rails/bootstrap/init-project.sh \
|
||||
--name "my-project" \
|
||||
--type "nestjs-nextjs" \
|
||||
--repo "https://git.mosaicstack.dev/owner/repo"
|
||||
@@ -24,8 +24,8 @@ This guide covers how to bootstrap a project so AI agents (Claude, Codex, etc.)
|
||||
export PROJECT_NAME="My Project"
|
||||
export PROJECT_DESCRIPTION="What this project does"
|
||||
export TASK_PREFIX="MP"
|
||||
envsubst < ~/.mosaic/templates/agent/CLAUDE.md.template > CLAUDE.md
|
||||
envsubst < ~/.mosaic/templates/agent/AGENTS.md.template > AGENTS.md
|
||||
envsubst < ~/.config/mosaic/templates/agent/CLAUDE.md.template > CLAUDE.md
|
||||
envsubst < ~/.config/mosaic/templates/agent/AGENTS.md.template > AGENTS.md
|
||||
```
|
||||
|
||||
---
|
||||
@@ -86,12 +86,12 @@ export TASK_PREFIX="MP"
|
||||
|
||||
# Use tech-stack-specific template if available
|
||||
TYPE=$(detect_project_type)
|
||||
TEMPLATE_DIR="$HOME/.mosaic/templates/agent/projects/$TYPE"
|
||||
TEMPLATE_DIR="$HOME/.config/mosaic/templates/agent/projects/$TYPE"
|
||||
|
||||
if [[ -d "$TEMPLATE_DIR" ]]; then
|
||||
envsubst < "$TEMPLATE_DIR/CLAUDE.md.template" > CLAUDE.md
|
||||
else
|
||||
envsubst < "$HOME/.mosaic/templates/agent/CLAUDE.md.template" > CLAUDE.md
|
||||
envsubst < "$HOME/.config/mosaic/templates/agent/CLAUDE.md.template" > CLAUDE.md
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -116,7 +116,7 @@ export LINT_COMMAND="ruff check ."
|
||||
export TYPECHECK_COMMAND="mypy ."
|
||||
export QUALITY_GATES="ruff check . && mypy . && pytest tests/"
|
||||
|
||||
envsubst < ~/.mosaic/templates/agent/CLAUDE.md.template > CLAUDE.md
|
||||
envsubst < ~/.config/mosaic/templates/agent/CLAUDE.md.template > CLAUDE.md
|
||||
```
|
||||
|
||||
### Required Sections
|
||||
@@ -141,12 +141,12 @@ The `AGENTS.md` file contains agent-specific patterns, gotchas, and orchestrator
|
||||
|
||||
```bash
|
||||
TYPE=$(detect_project_type)
|
||||
TEMPLATE_DIR="$HOME/.mosaic/templates/agent/projects/$TYPE"
|
||||
TEMPLATE_DIR="$HOME/.config/mosaic/templates/agent/projects/$TYPE"
|
||||
|
||||
if [[ -d "$TEMPLATE_DIR" ]]; then
|
||||
envsubst < "$TEMPLATE_DIR/AGENTS.md.template" > AGENTS.md
|
||||
else
|
||||
envsubst < "$HOME/.mosaic/templates/agent/AGENTS.md.template" > AGENTS.md
|
||||
envsubst < "$HOME/.config/mosaic/templates/agent/AGENTS.md.template" > AGENTS.md
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -175,10 +175,10 @@ mkdir -p docs/reports
|
||||
|
||||
```bash
|
||||
# Use the init script
|
||||
~/.mosaic/rails/bootstrap/init-repo-labels.sh
|
||||
~/.config/mosaic/rails/bootstrap/init-repo-labels.sh
|
||||
|
||||
# Or manually create standard labels
|
||||
~/.mosaic/rails/git/issue-create.sh # (labels are created on first use)
|
||||
~/.config/mosaic/rails/git/issue-create.sh # (labels are created on first use)
|
||||
```
|
||||
|
||||
### Standard Labels
|
||||
@@ -198,7 +198,7 @@ mkdir -p docs/reports
|
||||
Create the first milestone for MVP:
|
||||
|
||||
```bash
|
||||
~/.mosaic/rails/git/milestone-create.sh -t "0.1.0" -d "MVP - Minimum Viable Product"
|
||||
~/.config/mosaic/rails/git/milestone-create.sh -t "0.1.0" -d "MVP - Minimum Viable Product"
|
||||
```
|
||||
|
||||
---
|
||||
@@ -210,8 +210,8 @@ Create the first milestone for MVP:
|
||||
```bash
|
||||
# Copy Codex review pipeline
|
||||
mkdir -p .woodpecker/schemas
|
||||
cp ~/.mosaic/rails/codex/woodpecker/codex-review.yml .woodpecker/
|
||||
cp ~/.mosaic/rails/codex/schemas/*.json .woodpecker/schemas/
|
||||
cp ~/.config/mosaic/rails/codex/woodpecker/codex-review.yml .woodpecker/
|
||||
cp ~/.config/mosaic/rails/codex/schemas/*.json .woodpecker/schemas/
|
||||
|
||||
# Add codex_api_key secret to Woodpecker CI dashboard
|
||||
```
|
||||
@@ -243,7 +243,7 @@ grep -c "Code Review" CLAUDE.md
|
||||
eval "$(grep -A1 'Quality Gates' CLAUDE.md | tail -1)"
|
||||
|
||||
# Test Codex review (if configured)
|
||||
~/.mosaic/rails/codex/codex-code-review.sh --help
|
||||
~/.config/mosaic/rails/codex/codex-code-review.sh --help
|
||||
```
|
||||
|
||||
---
|
||||
@@ -254,15 +254,15 @@ eval "$(grep -A1 'Quality Gates' CLAUDE.md | tail -1)"
|
||||
|
||||
| Template | Path | Purpose |
|
||||
|----------|------|---------|
|
||||
| `CLAUDE.md.template` | `~/.mosaic/templates/agent/` | Generic project CLAUDE.md |
|
||||
| `AGENTS.md.template` | `~/.mosaic/templates/agent/` | Generic agent context |
|
||||
| `CLAUDE.md.template` | `~/.config/mosaic/templates/agent/` | Generic project CLAUDE.md |
|
||||
| `AGENTS.md.template` | `~/.config/mosaic/templates/agent/` | Generic agent context |
|
||||
|
||||
### Tech-Stack Templates
|
||||
|
||||
| Stack | Path | Includes |
|
||||
|-------|------|----------|
|
||||
| NestJS + Next.js | `~/.mosaic/templates/agent/projects/nestjs-nextjs/` | CLAUDE.md, AGENTS.md |
|
||||
| Django | `~/.mosaic/templates/agent/projects/django/` | CLAUDE.md, AGENTS.md |
|
||||
| NestJS + Next.js | `~/.config/mosaic/templates/agent/projects/nestjs-nextjs/` | CLAUDE.md, AGENTS.md |
|
||||
| Django | `~/.config/mosaic/templates/agent/projects/django/` | CLAUDE.md, AGENTS.md |
|
||||
|
||||
### Orchestrator Templates
|
||||
|
||||
@@ -305,7 +305,7 @@ eval "$(grep -A1 'Quality Gates' CLAUDE.md | tail -1)"
|
||||
Full project bootstrap with interactive and flag-based modes:
|
||||
|
||||
```bash
|
||||
~/.mosaic/rails/bootstrap/init-project.sh \
|
||||
~/.config/mosaic/rails/bootstrap/init-project.sh \
|
||||
--name "My Project" \
|
||||
--type "nestjs-nextjs" \
|
||||
--repo "https://git.mosaicstack.dev/owner/repo" \
|
||||
@@ -318,7 +318,7 @@ Full project bootstrap with interactive and flag-based modes:
|
||||
Initialize standard labels and MVP milestone:
|
||||
|
||||
```bash
|
||||
~/.mosaic/rails/bootstrap/init-repo-labels.sh
|
||||
~/.config/mosaic/rails/bootstrap/init-repo-labels.sh
|
||||
```
|
||||
|
||||
---
|
||||
@@ -335,4 +335,4 @@ After bootstrapping, verify:
|
||||
- [ ] Quality gates run successfully
|
||||
- [ ] `.env.example` exists (if project uses env vars)
|
||||
- [ ] CI/CD pipeline configured (if using Woodpecker/GitHub Actions)
|
||||
- [ ] Codex review scripts accessible (`~/.mosaic/rails/codex/`)
|
||||
- [ ] Codex review scripts accessible (`~/.config/mosaic/rails/codex/`)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
### Getting Context
|
||||
```bash
|
||||
# List the issue being addressed
|
||||
~/.mosaic/rails/git/issue-list.sh -i {issue-number}
|
||||
~/.config/mosaic/rails/git/issue-list.sh -i {issue-number}
|
||||
|
||||
# View the changes
|
||||
git diff main...HEAD
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Frontend Development Guide
|
||||
|
||||
## Before Starting
|
||||
1. Check assigned issue in git repo: `~/.mosaic/rails/git/issue-list.sh -a @me`
|
||||
1. Check assigned issue in git repo: `~/.config/mosaic/rails/git/issue-list.sh -a @me`
|
||||
2. Create scratchpad: `docs/scratchpads/{issue-number}-{short-name}.md`
|
||||
3. Review existing components and patterns in the codebase
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('ComponentName', () => {
|
||||
|
||||
## Code Style
|
||||
- Follow Google JavaScript/TypeScript Style Guide
|
||||
- **TypeScript: Follow `~/.mosaic/guides/typescript.md` — MANDATORY**
|
||||
- **TypeScript: Follow `~/.config/mosaic/guides/typescript.md` — MANDATORY**
|
||||
- Use ESLint/Prettier configuration from project
|
||||
- Prefer functional components over class components (React)
|
||||
- TypeScript strict mode is REQUIRED, not optional
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Infrastructure & DevOps Guide
|
||||
|
||||
## Before Starting
|
||||
1. Check assigned issue: `~/.mosaic/rails/git/issue-list.sh -a @me`
|
||||
1. Check assigned issue: `~/.config/mosaic/rails/git/issue-list.sh -a @me`
|
||||
2. Create scratchpad: `docs/scratchpads/{issue-number}-{short-name}.md`
|
||||
3. Review existing infrastructure configuration
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ Choose one delegation mode at session start:
|
||||
Matrix rail mode commands:
|
||||
|
||||
```bash
|
||||
~/.mosaic/bin/mosaic-orchestrator-matrix-cycle
|
||||
~/.mosaic/bin/mosaic-orchestrator-run --poll-sec 10
|
||||
~/.config/mosaic/bin/mosaic-orchestrator-matrix-cycle
|
||||
~/.config/mosaic/bin/mosaic-orchestrator-run --poll-sec 10
|
||||
```
|
||||
|
||||
In Matrix rail mode, keep `docs/tasks.md` as canonical project tracking and use
|
||||
@@ -186,7 +186,7 @@ Use these heuristics based on task type:
|
||||
Create ONE issue per phase using git scripts:
|
||||
|
||||
```bash
|
||||
~/.mosaic/rails/git/issue-create.sh \
|
||||
~/.config/mosaic/rails/git/issue-create.sh \
|
||||
-t "Phase 1: Critical Security Fixes" \
|
||||
-b "$(cat <<'EOF'
|
||||
## Findings
|
||||
@@ -309,10 +309,10 @@ Run review when the worker's result includes code changes (commits). Skip for ta
|
||||
cd {project_path}
|
||||
|
||||
# Code quality review
|
||||
~/.mosaic/rails/codex/codex-code-review.sh -b {base_branch} -o /tmp/review-{task_id}.json
|
||||
~/.config/mosaic/rails/codex/codex-code-review.sh -b {base_branch} -o /tmp/review-{task_id}.json
|
||||
|
||||
# Security review
|
||||
~/.mosaic/rails/codex/codex-security-review.sh -b {base_branch} -o /tmp/security-{task_id}.json
|
||||
~/.config/mosaic/rails/codex/codex-security-review.sh -b {base_branch} -o /tmp/security-{task_id}.json
|
||||
```
|
||||
|
||||
### Step 2: Parse Review Results
|
||||
@@ -373,7 +373,7 @@ Review the code changes on branch {branch} against {base_branch}.
|
||||
- Security (OWASP Top 10, secrets, injection)
|
||||
- Testing (coverage, quality)
|
||||
- Code quality (complexity, duplication)
|
||||
3. Reference: ~/.mosaic/guides/code-review.md
|
||||
3. Reference: ~/.config/mosaic/guides/code-review.md
|
||||
|
||||
Report findings as JSON:
|
||||
```json
|
||||
@@ -448,8 +448,8 @@ Construct this from the task row and pass to worker via Task tool:
|
||||
## Git Scripts
|
||||
|
||||
For issue/PR/milestone operations, use scripts (NOT raw tea/gh):
|
||||
- `~/.mosaic/rails/git/issue-view.sh -i {N}`
|
||||
- `~/.mosaic/rails/git/pr-create.sh -t "Title" -b "Desc" -B develop`
|
||||
- `~/.config/mosaic/rails/git/issue-view.sh -i {N}`
|
||||
- `~/.config/mosaic/rails/git/pr-create.sh -t "Title" -b "Desc" -B develop`
|
||||
|
||||
Standard git commands (pull, commit, push, checkout) are fine.
|
||||
|
||||
@@ -706,7 +706,7 @@ Next: MS-SEC-004
|
||||
|
||||
### Cross-Project Learnings
|
||||
|
||||
Universal heuristics are maintained in `~/.mosaic/guides/orchestrator-learnings.md`.
|
||||
Universal heuristics are maintained in `~/.config/mosaic/guides/orchestrator-learnings.md`.
|
||||
After completing a milestone, review variance patterns and propose updates to the universal guide.
|
||||
|
||||
---
|
||||
@@ -858,7 +858,7 @@ Remediate findings from the codebase review.
|
||||
- Task prefix: {PREFIX} (e.g., MS, UC)
|
||||
|
||||
## Protocol
|
||||
Read ~/.mosaic/guides/orchestrator.md for full instructions.
|
||||
Read ~/.config/mosaic/guides/orchestrator.md for full instructions.
|
||||
|
||||
## Start
|
||||
Bootstrap from the review report, then execute until complete.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# QA & Testing Guide
|
||||
|
||||
## Before Starting
|
||||
1. Check assigned issue: `~/.mosaic/rails/git/issue-list.sh -a @me`
|
||||
1. Check assigned issue: `~/.config/mosaic/rails/git/issue-list.sh -a @me`
|
||||
2. Create scratchpad: `docs/scratchpads/{issue-number}-{short-name}.md`
|
||||
3. Review existing test structure and patterns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user