@sugar-crash-studios/vibe-forge 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/clear-attention.md +63 -0
- package/.claude/commands/compact-context.md +52 -0
- package/.claude/commands/configure-vcs.md +102 -0
- package/.claude/commands/forge.md +171 -0
- package/.claude/commands/need-help.md +77 -0
- package/.claude/commands/update-status.md +64 -0
- package/.claude/commands/worker-loop.md +106 -0
- package/.claude/hooks/worker-loop.js +198 -0
- package/.claude/scripts/setup-worker-loop.sh +45 -0
- package/.claude/settings.local.json +46 -0
- package/LICENSE +21 -0
- package/README.md +238 -0
- package/agents/aegis/personality.md +294 -0
- package/agents/anvil/personality.md +276 -0
- package/agents/architect/personality.md +258 -0
- package/agents/crucible/personality.md +360 -0
- package/agents/ember/personality.md +291 -0
- package/agents/forge-master/capabilities.md +144 -0
- package/agents/forge-master/context-template.md +128 -0
- package/agents/forge-master/personality.md +138 -0
- package/agents/furnace/personality.md +340 -0
- package/agents/herald/personality.md +247 -0
- package/agents/loki/personality.md +108 -0
- package/agents/oracle/personality.md +283 -0
- package/agents/pixel/personality.md +113 -0
- package/agents/planning-hub/personality.md +320 -0
- package/agents/scribe/personality.md +251 -0
- package/agents/temper/personality.md +218 -0
- package/bin/cli.js +375 -0
- package/bin/dashboard/api/agents.js +333 -0
- package/bin/dashboard/api/dispatch.js +483 -0
- package/bin/dashboard/api/tasks.js +416 -0
- package/bin/dashboard/frontend/index.html +13 -0
- package/bin/dashboard/frontend/package.json +16 -0
- package/bin/dashboard/frontend/src/App.svelte +222 -0
- package/bin/dashboard/frontend/src/app.css +1777 -0
- package/bin/dashboard/frontend/src/lib/components/AgentCard.svelte +60 -0
- package/bin/dashboard/frontend/src/lib/components/AgentsPanel.svelte +57 -0
- package/bin/dashboard/frontend/src/lib/components/DispatchModal.svelte +180 -0
- package/bin/dashboard/frontend/src/lib/components/Footer.svelte +33 -0
- package/bin/dashboard/frontend/src/lib/components/Header.svelte +84 -0
- package/bin/dashboard/frontend/src/lib/components/IssueCard.svelte +33 -0
- package/bin/dashboard/frontend/src/lib/components/IssuesPanel.svelte +73 -0
- package/bin/dashboard/frontend/src/lib/components/KeyboardShortcutsModal.svelte +108 -0
- package/bin/dashboard/frontend/src/lib/components/MobileTabs.svelte +52 -0
- package/bin/dashboard/frontend/src/lib/components/NotificationCard.svelte +60 -0
- package/bin/dashboard/frontend/src/lib/components/NotificationsPanel.svelte +44 -0
- package/bin/dashboard/frontend/src/lib/components/TaskCard.svelte +63 -0
- package/bin/dashboard/frontend/src/lib/components/TasksPanel.svelte +82 -0
- package/bin/dashboard/frontend/src/lib/components/Toast.svelte +45 -0
- package/bin/dashboard/frontend/src/lib/stores/agents.js +34 -0
- package/bin/dashboard/frontend/src/lib/stores/issues.js +54 -0
- package/bin/dashboard/frontend/src/lib/stores/notifications.js +48 -0
- package/bin/dashboard/frontend/src/lib/stores/tasks.js +63 -0
- package/bin/dashboard/frontend/src/lib/stores/theme.js +33 -0
- package/bin/dashboard/frontend/src/lib/stores/toast.js +35 -0
- package/bin/dashboard/frontend/src/lib/stores/ui.js +25 -0
- package/bin/dashboard/frontend/src/lib/stores/voice.js +275 -0
- package/bin/dashboard/frontend/src/lib/stores/websocket.js +295 -0
- package/bin/dashboard/frontend/src/lib/utils/api.js +101 -0
- package/bin/dashboard/frontend/src/lib/utils/formatters.js +54 -0
- package/bin/dashboard/frontend/src/main.js +9 -0
- package/bin/dashboard/frontend/svelte.config.js +5 -0
- package/bin/dashboard/frontend/vite.config.js +20 -0
- package/bin/dashboard/public/assets/index-DnfVj9Ce.css +1 -0
- package/bin/dashboard/public/assets/index-Ze5h0kXQ.js +2 -0
- package/bin/dashboard/public/index.html +14 -0
- package/bin/dashboard/server.js +566 -0
- package/bin/forge-daemon.sh +463 -0
- package/bin/forge-setup.sh +645 -0
- package/bin/forge-spawn.sh +164 -0
- package/bin/forge.cmd +83 -0
- package/bin/forge.sh +533 -0
- package/bin/lib/agents.sh +177 -0
- package/bin/lib/colors.sh +44 -0
- package/bin/lib/config.sh +347 -0
- package/bin/lib/constants.sh +241 -0
- package/bin/lib/daemon/display.sh +128 -0
- package/bin/lib/daemon/notifications.sh +263 -0
- package/bin/lib/daemon/routing.sh +77 -0
- package/bin/lib/daemon/state.sh +115 -0
- package/bin/lib/daemon/sync.sh +95 -0
- package/bin/lib/database.sh +310 -0
- package/bin/lib/heimdall-setup.js +113 -0
- package/bin/lib/heimdall.js +265 -0
- package/bin/lib/json.sh +264 -0
- package/bin/lib/terminal.js +451 -0
- package/bin/lib/util.sh +126 -0
- package/bin/lib/vcs.js +349 -0
- package/config/agent-manifest.yaml +203 -0
- package/config/agents.json +168 -0
- package/config/task-template.md +159 -0
- package/config/task-types.yaml +106 -0
- package/context/agent-status/aegis.json +7 -0
- package/context/agent-status/anvil.json +7 -0
- package/context/agent-status/architect.json +7 -0
- package/context/agent-status/crucible.json +7 -0
- package/context/agent-status/ember.json +7 -0
- package/context/agent-status/furnace.json +7 -0
- package/context/agent-status/loki.json +7 -0
- package/context/agent-status/oracle.json +7 -0
- package/context/agent-status/pixel.json +7 -0
- package/context/agent-status/planning-hub.json +7 -0
- package/context/agent-status/scribe.json +7 -0
- package/context/agent-status/temper.json +7 -0
- package/context/feature-brainstorm.md +426 -0
- package/context/forge-state.yaml +19 -0
- package/context/modern-conventions.md +129 -0
- package/context/project-context-template.md +122 -0
- package/context/project-context.md +122 -0
- package/docs/TODO.md +150 -0
- package/docs/agents.md +409 -0
- package/docs/architecture/decisions/ADR-001-daemon-modularization.md +122 -0
- package/docs/architecture/vibe-lab-integration.md +684 -0
- package/docs/architecture.md +194 -0
- package/docs/bmad-gap-analysis-2026-03-31.md +444 -0
- package/docs/cleanup-workflow.md +329 -0
- package/docs/commands.md +451 -0
- package/docs/dashboard-mockup.html +989 -0
- package/docs/getting-started.md +261 -0
- package/docs/integration/forge-ownership-policy.md +112 -0
- package/docs/npm-publishing.md +132 -0
- package/docs/roadmap-2026.md +519 -0
- package/docs/security.md +144 -0
- package/docs/wireframes/dashboard-mvp.md +1164 -0
- package/docs/workflows/README.md +32 -0
- package/docs/workflows/azure-devops.md +108 -0
- package/docs/workflows/bitbucket.md +104 -0
- package/docs/workflows/git-only.md +130 -0
- package/docs/workflows/gitea.md +168 -0
- package/docs/workflows/github.md +103 -0
- package/docs/workflows/gitlab.md +105 -0
- package/docs/workflows.md +454 -0
- package/package.json +73 -0
- package/tasks/completed/ARCH-001-duplicate-agent-config.md +121 -0
- package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +88 -0
- package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +77 -0
- package/tasks/completed/ARCH-009-test-organization.md +78 -0
- package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +94 -0
- package/tasks/completed/ARCH-012-tmp-files-in-root.md +71 -0
- package/tasks/completed/ARCH-013-exit-code-constants.md +65 -0
- package/tasks/completed/ARCH-014-sed-incompatibility.md +96 -0
- package/tasks/completed/ARCH-015-docs-todo-tracking.md +83 -0
- package/tasks/completed/BUG-dash-001-tasks-filter-error.md +31 -0
- package/tasks/completed/BUG-dash-002-agents-unknown.md +41 -0
- package/tasks/completed/CLEAN-001.md +38 -0
- package/tasks/completed/CLEAN-002.md +43 -0
- package/tasks/completed/CLEAN-003.md +47 -0
- package/tasks/completed/CLEAN-004.md +56 -0
- package/tasks/completed/CLEAN-005.md +75 -0
- package/tasks/completed/CLEAN-006.md +47 -0
- package/tasks/completed/CLEAN-007.md +34 -0
- package/tasks/completed/CLEAN-008.md +49 -0
- package/tasks/completed/CLEAN-012.md +58 -0
- package/tasks/completed/CLEAN-013.md +45 -0
- package/tasks/completed/FEATURE-001a-dashboard-wireframes.md +162 -0
- package/tasks/completed/IMPL-007a-daemon-notifications-module.md +82 -0
- package/tasks/completed/IMPL-007b-daemon-sync-module.md +71 -0
- package/tasks/completed/IMPL-007c-daemon-state-module.md +80 -0
- package/tasks/completed/IMPL-007d-daemon-routing-module.md +77 -0
- package/tasks/completed/IMPL-007e-daemon-display-module.md +77 -0
- package/tasks/completed/IMPL-007f-daemon-integration.md +124 -0
- package/tasks/completed/PLAT-1-heimdall.md +420 -0
- package/tasks/completed/SEC-001-sql-injection-fix.md +58 -0
- package/tasks/completed/SEC-002-notification-injection-fix.md +45 -0
- package/tasks/completed/SEC-003-eval-injection-fix.md +54 -0
- package/tasks/completed/SEC-004-pid-race-condition-fix.md +49 -0
- package/tasks/completed/SEC-005-worker-loop-path-fix.md +51 -0
- package/tasks/completed/SEC-006-eval-agent-names.md +55 -0
- package/tasks/completed/SEC-007-spawn-escaping.md +67 -0
- package/tasks/completed/TASK-DASH-001-server-infrastructure.md +185 -0
- package/tasks/completed/TASK-anvil-001-dashboard-frontend.md +133 -0
- package/tasks/completed/review-bmad-aegis.md +89 -0
- package/tasks/completed/review-bmad-anvil.md +80 -0
- package/tasks/completed/review-bmad-crucible.md +81 -0
- package/tasks/completed/review-bmad-ember.md +90 -0
- package/tasks/completed/review-bmad-furnace.md +79 -0
- package/tasks/completed/review-bmad-pixel.md +82 -0
- package/tasks/completed/review-bmad-scribe.md +92 -0
- package/tasks/completed/review-bmad-sentinel.md +83 -0
- package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +72 -0
- package/tasks/pending/ARCH-005-missing-src-directory.md +95 -0
- package/tasks/pending/ARCH-006-task-template-location.md +64 -0
- package/tasks/pending/ARCH-008-forge-master-vs-hub.md +81 -0
- package/tasks/pending/ARCH-010-missing-index-files.md +84 -0
- package/tasks/pending/CLEAN-009.md +31 -0
- package/tasks/pending/CLEAN-010.md +30 -0
- package/tasks/pending/CLEAN-011.md +30 -0
- package/tasks/pending/CLEAN-014.md +32 -0
- package/tasks/pending/DESIGN-dash-001-layout-review.md +45 -0
- package/tasks/pending/FEATURE-001-dashboard-mvp.md +268 -0
- package/tasks/review/ARCH-007-daemon-monolith.md +162 -0
- package/tasks/review/bmad-review-aegis.md +349 -0
- package/tasks/review/bmad-review-anvil.md +259 -0
- package/tasks/review/bmad-review-crucible.md +277 -0
- package/tasks/review/bmad-review-ember.md +307 -0
- package/tasks/review/bmad-review-furnace.md +285 -0
- package/tasks/review/bmad-review-pixel.md +329 -0
- package/tasks/review/bmad-review-scribe.md +361 -0
- package/tasks/review/bmad-review-sentinel.md +242 -0
- package/tasks/review/task-001.md +78 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# VCS Workflow Guides
|
|
2
|
+
|
|
3
|
+
Platform-specific workflow guidance for Vibe Forge agents. The appropriate guide is selected based on the project's VCS configuration (see `/configure-vcs`).
|
|
4
|
+
|
|
5
|
+
## Available Guides
|
|
6
|
+
|
|
7
|
+
| Platform | File | Use Case |
|
|
8
|
+
|----------|------|----------|
|
|
9
|
+
| [GitHub](./github.md) | `github.md` | GitHub with Actions CI |
|
|
10
|
+
| [GitLab](./gitlab.md) | `gitlab.md` | GitLab with GitLab CI |
|
|
11
|
+
| [Gitea](./gitea.md) | `gitea.md` | Gitea/Codeberg with Gitea Actions |
|
|
12
|
+
| [Azure DevOps](./azure-devops.md) | `azure-devops.md` | Azure DevOps with Pipelines |
|
|
13
|
+
| [Bitbucket](./bitbucket.md) | `bitbucket.md` | Bitbucket with Pipelines |
|
|
14
|
+
| [Git Only](./git-only.md) | `git-only.md` | Git without hosted platform |
|
|
15
|
+
|
|
16
|
+
## Configuration
|
|
17
|
+
|
|
18
|
+
VCS type is set during `forge init` or via `/configure-vcs`. Configuration stored in `.forge/config.json`:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"vcs": {
|
|
23
|
+
"type": "github",
|
|
24
|
+
"name": "GitHub",
|
|
25
|
+
"autoDetected": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Agent Integration
|
|
31
|
+
|
|
32
|
+
Agents read the VCS configuration and reference the appropriate workflow guide. The git workflow section in agent personalities is dynamically adjusted based on the configured platform.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Azure DevOps Workflow Guide
|
|
2
|
+
|
|
3
|
+
Git workflow guidance for projects hosted on Azure DevOps.
|
|
4
|
+
|
|
5
|
+
## Branch Naming
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
task/TASK-XXX-description # Task branches
|
|
9
|
+
feature/feature-name # Feature branches
|
|
10
|
+
bugfix/bug-description # Bug fix branches
|
|
11
|
+
hotfix/urgent-fix # Urgent production fixes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Daily Workflow
|
|
15
|
+
|
|
16
|
+
### Starting a Task
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Ensure you're on latest main
|
|
20
|
+
git checkout main && git pull origin main
|
|
21
|
+
|
|
22
|
+
# Create feature branch
|
|
23
|
+
git checkout -b task/TASK-XXX-description
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### During Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Stage and commit changes
|
|
30
|
+
git add .
|
|
31
|
+
git commit -m "Add feature X"
|
|
32
|
+
|
|
33
|
+
# Push to remote (first time)
|
|
34
|
+
git push -u origin task/TASK-XXX-description
|
|
35
|
+
|
|
36
|
+
# Subsequent pushes
|
|
37
|
+
git push
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Creating a Pull Request
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Using Azure CLI
|
|
44
|
+
az repos pr create \
|
|
45
|
+
--title "TASK-XXX: Add feature X" \
|
|
46
|
+
--description "Description of changes" \
|
|
47
|
+
--source-branch task/TASK-XXX-description \
|
|
48
|
+
--target-branch main
|
|
49
|
+
|
|
50
|
+
# Set to draft
|
|
51
|
+
az repos pr create --draft \
|
|
52
|
+
--title "TASK-XXX: WIP - Add feature X" \
|
|
53
|
+
--source-branch task/TASK-XXX-description
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### After PR Approval
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Complete PR via Azure CLI
|
|
60
|
+
az repos pr update --id <pr-id> --status completed
|
|
61
|
+
|
|
62
|
+
# Clean up local branch
|
|
63
|
+
git checkout main
|
|
64
|
+
git pull origin main
|
|
65
|
+
git branch -d task/TASK-XXX-description
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## CI/CD
|
|
69
|
+
|
|
70
|
+
Azure Pipelines configuration goes in `azure-pipelines.yml`:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
# azure-pipelines.yml
|
|
74
|
+
trigger:
|
|
75
|
+
- main
|
|
76
|
+
|
|
77
|
+
pool:
|
|
78
|
+
vmImage: 'ubuntu-latest'
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- task: NodeTool@0
|
|
82
|
+
inputs:
|
|
83
|
+
versionSpec: '20.x'
|
|
84
|
+
|
|
85
|
+
- script: npm ci
|
|
86
|
+
displayName: 'Install dependencies'
|
|
87
|
+
|
|
88
|
+
- script: npm test
|
|
89
|
+
displayName: 'Run tests'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Useful Commands
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Azure CLI for repos
|
|
96
|
+
az repos pr list # List open PRs
|
|
97
|
+
az repos pr show --id 123 # Show PR details
|
|
98
|
+
az repos pr checkout --id 123 # Checkout PR locally
|
|
99
|
+
az pipelines run list # List pipeline runs
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Branch Policies
|
|
103
|
+
|
|
104
|
+
Configure in Repos > Branches > Branch policies:
|
|
105
|
+
- Require minimum number of reviewers
|
|
106
|
+
- Check for linked work items
|
|
107
|
+
- Build validation
|
|
108
|
+
- Require merge strategy (squash)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Bitbucket Workflow Guide
|
|
2
|
+
|
|
3
|
+
Git workflow guidance for projects hosted on Bitbucket.
|
|
4
|
+
|
|
5
|
+
## Branch Naming
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
task/TASK-XXX-description # Task branches
|
|
9
|
+
feature/feature-name # Feature branches
|
|
10
|
+
bugfix/bug-description # Bug fix branches
|
|
11
|
+
hotfix/urgent-fix # Urgent production fixes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Daily Workflow
|
|
15
|
+
|
|
16
|
+
### Starting a Task
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Ensure you're on latest main
|
|
20
|
+
git checkout main && git pull origin main
|
|
21
|
+
|
|
22
|
+
# Create feature branch
|
|
23
|
+
git checkout -b task/TASK-XXX-description
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### During Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Stage and commit changes
|
|
30
|
+
git add .
|
|
31
|
+
git commit -m "Add feature X"
|
|
32
|
+
|
|
33
|
+
# Push to remote (first time)
|
|
34
|
+
git push -u origin task/TASK-XXX-description
|
|
35
|
+
|
|
36
|
+
# Subsequent pushes
|
|
37
|
+
git push
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Creating a Pull Request
|
|
41
|
+
|
|
42
|
+
Bitbucket doesn't have an official CLI. Create PRs via:
|
|
43
|
+
|
|
44
|
+
1. **Web UI**: After pushing, visit Bitbucket and click "Create pull request"
|
|
45
|
+
2. **API** (if needed):
|
|
46
|
+
```bash
|
|
47
|
+
curl -X POST \
|
|
48
|
+
-H "Authorization: Bearer $BITBUCKET_TOKEN" \
|
|
49
|
+
-H "Content-Type: application/json" \
|
|
50
|
+
-d '{"title":"TASK-XXX: Add feature X","source":{"branch":{"name":"task/TASK-XXX-description"}},"destination":{"branch":{"name":"main"}}}' \
|
|
51
|
+
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/pullrequests
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### After PR Approval
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Merge via Bitbucket UI (squash merge recommended)
|
|
58
|
+
|
|
59
|
+
# Clean up local branch
|
|
60
|
+
git checkout main
|
|
61
|
+
git pull origin main
|
|
62
|
+
git branch -d task/TASK-XXX-description
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## CI/CD
|
|
66
|
+
|
|
67
|
+
Bitbucket Pipelines configuration goes in `bitbucket-pipelines.yml`:
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
# bitbucket-pipelines.yml
|
|
71
|
+
image: node:20
|
|
72
|
+
|
|
73
|
+
pipelines:
|
|
74
|
+
default:
|
|
75
|
+
- step:
|
|
76
|
+
name: Test
|
|
77
|
+
caches:
|
|
78
|
+
- node
|
|
79
|
+
script:
|
|
80
|
+
- npm ci
|
|
81
|
+
- npm test
|
|
82
|
+
|
|
83
|
+
branches:
|
|
84
|
+
main:
|
|
85
|
+
- step:
|
|
86
|
+
name: Build and Deploy
|
|
87
|
+
script:
|
|
88
|
+
- npm ci
|
|
89
|
+
- npm run build
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Useful Tips
|
|
93
|
+
|
|
94
|
+
- **Jira Integration**: Link commits with Jira issue keys (e.g., `PROJ-123`)
|
|
95
|
+
- **PR Templates**: Create `PULL_REQUEST_TEMPLATE.md` in repo root
|
|
96
|
+
- **Reviewers**: Set default reviewers in repository settings
|
|
97
|
+
|
|
98
|
+
## Branch Permissions
|
|
99
|
+
|
|
100
|
+
Configure in Repository settings > Branch permissions:
|
|
101
|
+
- Require pull request before merging
|
|
102
|
+
- Require approvals
|
|
103
|
+
- Require passing builds
|
|
104
|
+
- Prevent direct pushes to main
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Git-Only Workflow Guide
|
|
2
|
+
|
|
3
|
+
Git workflow guidance for projects using Git without a hosted platform (self-hosted, local-only, or minimal setup).
|
|
4
|
+
|
|
5
|
+
## Branch Naming
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
task/TASK-XXX-description # Task branches
|
|
9
|
+
feature/feature-name # Feature branches
|
|
10
|
+
bugfix/bug-description # Bug fix branches
|
|
11
|
+
hotfix/urgent-fix # Urgent production fixes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Daily Workflow
|
|
15
|
+
|
|
16
|
+
### Starting a Task
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Ensure you're on latest main
|
|
20
|
+
git checkout main
|
|
21
|
+
git pull origin main # if remote exists
|
|
22
|
+
|
|
23
|
+
# Create feature branch
|
|
24
|
+
git checkout -b task/TASK-XXX-description
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### During Development
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Stage and commit changes
|
|
31
|
+
git add .
|
|
32
|
+
git commit -m "Add feature X"
|
|
33
|
+
|
|
34
|
+
# Push to remote (if configured)
|
|
35
|
+
git push -u origin task/TASK-XXX-description
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Completing a Task
|
|
39
|
+
|
|
40
|
+
Without a PR platform, use one of these approaches:
|
|
41
|
+
|
|
42
|
+
#### Option 1: Direct Merge (Solo Developer)
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Switch to main
|
|
46
|
+
git checkout main
|
|
47
|
+
git pull origin main # if remote
|
|
48
|
+
|
|
49
|
+
# Merge with squash
|
|
50
|
+
git merge --squash task/TASK-XXX-description
|
|
51
|
+
git commit -m "TASK-XXX: Add feature X"
|
|
52
|
+
|
|
53
|
+
# Push
|
|
54
|
+
git push origin main
|
|
55
|
+
|
|
56
|
+
# Clean up
|
|
57
|
+
git branch -d task/TASK-XXX-description
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Option 2: Code Review via Diff
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Generate diff for review
|
|
64
|
+
git diff main...task/TASK-XXX-description > review.patch
|
|
65
|
+
|
|
66
|
+
# After review approval, merge as above
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### Option 3: Email Workflow
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Format patches for email review
|
|
73
|
+
git format-patch main..task/TASK-XXX-description -o patches/
|
|
74
|
+
|
|
75
|
+
# Apply approved patches
|
|
76
|
+
git am patches/*.patch
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Local CI
|
|
80
|
+
|
|
81
|
+
Without a hosted CI platform, consider:
|
|
82
|
+
|
|
83
|
+
### Git Hooks
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# .git/hooks/pre-commit
|
|
87
|
+
#!/bin/bash
|
|
88
|
+
npm test
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Manual CI Script
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# scripts/ci.sh
|
|
95
|
+
#!/bin/bash
|
|
96
|
+
set -e
|
|
97
|
+
npm ci
|
|
98
|
+
npm run lint
|
|
99
|
+
npm test
|
|
100
|
+
npm run build
|
|
101
|
+
echo "CI passed!"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Useful Commands
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# View branch history
|
|
108
|
+
git log --oneline --graph main..HEAD
|
|
109
|
+
|
|
110
|
+
# Interactive rebase before merge
|
|
111
|
+
git rebase -i main
|
|
112
|
+
|
|
113
|
+
# Diff summary
|
|
114
|
+
git diff --stat main...HEAD
|
|
115
|
+
|
|
116
|
+
# List branches
|
|
117
|
+
git branch -a
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Best Practices
|
|
121
|
+
|
|
122
|
+
1. **Commit Often**: Small, focused commits are easier to review and revert
|
|
123
|
+
2. **Write Good Messages**: Include context for future reference
|
|
124
|
+
3. **Rebase Before Merge**: Keep history clean with interactive rebase
|
|
125
|
+
4. **Tag Releases**: Use semantic versioning tags
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
git tag -a v1.0.0 -m "Release version 1.0.0"
|
|
129
|
+
git push origin v1.0.0
|
|
130
|
+
```
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Gitea Workflow Guide
|
|
2
|
+
|
|
3
|
+
Git workflow guidance for projects hosted on Gitea (including Codeberg and other Gitea-based instances).
|
|
4
|
+
|
|
5
|
+
## Branch Naming
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
task/TASK-XXX-description # Task branches
|
|
9
|
+
feature/feature-name # Feature branches
|
|
10
|
+
bugfix/bug-description # Bug fix branches
|
|
11
|
+
hotfix/urgent-fix # Urgent production fixes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Daily Workflow
|
|
15
|
+
|
|
16
|
+
### Starting a Task
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Ensure you're on latest main
|
|
20
|
+
git checkout main && git pull origin main
|
|
21
|
+
|
|
22
|
+
# Create feature branch
|
|
23
|
+
git checkout -b task/TASK-XXX-description
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### During Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Stage and commit changes
|
|
30
|
+
git add .
|
|
31
|
+
git commit -m "Add feature X"
|
|
32
|
+
|
|
33
|
+
# Push to remote (first time)
|
|
34
|
+
git push -u origin task/TASK-XXX-description
|
|
35
|
+
|
|
36
|
+
# Subsequent pushes
|
|
37
|
+
git push
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Creating a Pull Request
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Using tea CLI (Gitea's official CLI)
|
|
44
|
+
tea pr create --title "TASK-XXX: Add feature X" --description "Description of changes"
|
|
45
|
+
|
|
46
|
+
# Or create as draft
|
|
47
|
+
tea pr create --title "TASK-XXX: WIP - Add feature X" --labels "work-in-progress"
|
|
48
|
+
|
|
49
|
+
# If tea is not installed, use the web UI:
|
|
50
|
+
# Navigate to your Gitea instance -> Repository -> Pull Requests -> New Pull Request
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### After PR Approval
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Merge via Gitea UI (squash merge recommended)
|
|
57
|
+
# Or via CLI
|
|
58
|
+
tea pr merge --style squash
|
|
59
|
+
|
|
60
|
+
# Clean up local branch
|
|
61
|
+
git checkout main
|
|
62
|
+
git pull origin main
|
|
63
|
+
git branch -d task/TASK-XXX-description
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## CI/CD with Gitea Actions
|
|
67
|
+
|
|
68
|
+
Gitea Actions (v1.19+) uses GitHub Actions-compatible workflow syntax. Configuration goes in `.gitea/workflows/`:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
# .gitea/workflows/ci.yml
|
|
72
|
+
name: CI
|
|
73
|
+
on: [push, pull_request]
|
|
74
|
+
|
|
75
|
+
jobs:
|
|
76
|
+
test:
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
- name: Setup Node.js
|
|
81
|
+
uses: actions/setup-node@v4
|
|
82
|
+
with:
|
|
83
|
+
node-version: '20'
|
|
84
|
+
- run: npm ci
|
|
85
|
+
- run: npm test
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Alternative: Drone CI
|
|
89
|
+
|
|
90
|
+
Many Gitea installations use Drone CI. Configuration goes in `.drone.yml`:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
# .drone.yml
|
|
94
|
+
kind: pipeline
|
|
95
|
+
type: docker
|
|
96
|
+
name: default
|
|
97
|
+
|
|
98
|
+
steps:
|
|
99
|
+
- name: test
|
|
100
|
+
image: node:20
|
|
101
|
+
commands:
|
|
102
|
+
- npm ci
|
|
103
|
+
- npm test
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Installing tea CLI
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# macOS
|
|
110
|
+
brew install tea
|
|
111
|
+
|
|
112
|
+
# Linux (download binary)
|
|
113
|
+
curl -sL https://dl.gitea.io/tea/main/tea-main-linux-amd64 -o tea
|
|
114
|
+
chmod +x tea
|
|
115
|
+
sudo mv tea /usr/local/bin/
|
|
116
|
+
|
|
117
|
+
# Windows (via scoop)
|
|
118
|
+
scoop install tea
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Configure tea
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Add your Gitea instance
|
|
125
|
+
tea login add --name myinstance --url https://gitea.example.com --token YOUR_TOKEN
|
|
126
|
+
|
|
127
|
+
# Set as default
|
|
128
|
+
tea login default myinstance
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Useful Commands
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# tea CLI commands
|
|
135
|
+
tea pr list # List open PRs
|
|
136
|
+
tea pr view 123 # View PR details
|
|
137
|
+
tea pr checkout 123 # Checkout PR locally
|
|
138
|
+
tea issue list # List issues
|
|
139
|
+
tea repo list # List repositories
|
|
140
|
+
|
|
141
|
+
# With specific login
|
|
142
|
+
tea pr list --login myinstance
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Branch Protection
|
|
146
|
+
|
|
147
|
+
Configure in Repository Settings > Branches > Branch Protection:
|
|
148
|
+
- Enable branch protection for `main`
|
|
149
|
+
- Require pull request reviews
|
|
150
|
+
- Require status checks to pass
|
|
151
|
+
- Block force push
|
|
152
|
+
- Block branch deletion
|
|
153
|
+
|
|
154
|
+
## Gitea vs GitHub Differences
|
|
155
|
+
|
|
156
|
+
| Feature | GitHub | Gitea |
|
|
157
|
+
|---------|--------|-------|
|
|
158
|
+
| CLI | `gh` | `tea` |
|
|
159
|
+
| CI | GitHub Actions | Gitea Actions / Drone |
|
|
160
|
+
| Workflows | `.github/workflows/` | `.gitea/workflows/` |
|
|
161
|
+
| PR Labels | Built-in | Instance-specific |
|
|
162
|
+
|
|
163
|
+
## Self-Hosted Considerations
|
|
164
|
+
|
|
165
|
+
- **Instance URL**: Replace `gitea.example.com` with your actual instance URL
|
|
166
|
+
- **Runner Setup**: Gitea Actions requires act_runner for CI/CD
|
|
167
|
+
- **Token Scopes**: Generate tokens with appropriate scopes in Settings > Applications
|
|
168
|
+
- **Webhooks**: Configure webhooks for external CI if not using Gitea Actions
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# GitHub Workflow Guide
|
|
2
|
+
|
|
3
|
+
Git workflow guidance for projects hosted on GitHub.
|
|
4
|
+
|
|
5
|
+
## Branch Naming
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
task/TASK-XXX-description # Task branches
|
|
9
|
+
feature/feature-name # Feature branches
|
|
10
|
+
bugfix/bug-description # Bug fix branches
|
|
11
|
+
hotfix/urgent-fix # Urgent production fixes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Daily Workflow
|
|
15
|
+
|
|
16
|
+
### Starting a Task
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Ensure you're on latest main
|
|
20
|
+
git checkout main && git pull origin main
|
|
21
|
+
|
|
22
|
+
# Create feature branch
|
|
23
|
+
git checkout -b task/TASK-XXX-description
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### During Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Stage and commit changes
|
|
30
|
+
git add .
|
|
31
|
+
git commit -m "Add feature X"
|
|
32
|
+
|
|
33
|
+
# Push to remote (first time)
|
|
34
|
+
git push -u origin task/TASK-XXX-description
|
|
35
|
+
|
|
36
|
+
# Subsequent pushes
|
|
37
|
+
git push
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Creating a Pull Request
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Using GitHub CLI (recommended)
|
|
44
|
+
gh pr create --title "TASK-XXX: Add feature X" --body "Description of changes"
|
|
45
|
+
|
|
46
|
+
# Or with draft PR
|
|
47
|
+
gh pr create --draft --title "TASK-XXX: WIP - Add feature X"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### After PR Approval
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Squash merge via GitHub UI or CLI
|
|
54
|
+
gh pr merge --squash
|
|
55
|
+
|
|
56
|
+
# Clean up local branch
|
|
57
|
+
git checkout main
|
|
58
|
+
git pull origin main
|
|
59
|
+
git branch -d task/TASK-XXX-description
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## CI/CD
|
|
63
|
+
|
|
64
|
+
GitHub Actions configuration goes in `.github/workflows/`:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
# .github/workflows/ci.yml
|
|
68
|
+
name: CI
|
|
69
|
+
on: [push, pull_request]
|
|
70
|
+
|
|
71
|
+
jobs:
|
|
72
|
+
test:
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
- name: Run tests
|
|
77
|
+
run: npm test
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Useful Commands
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Check PR status
|
|
84
|
+
gh pr status
|
|
85
|
+
|
|
86
|
+
# View PR in browser
|
|
87
|
+
gh pr view --web
|
|
88
|
+
|
|
89
|
+
# List open PRs
|
|
90
|
+
gh pr list
|
|
91
|
+
|
|
92
|
+
# Check CI status
|
|
93
|
+
gh run list
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Branch Protection
|
|
97
|
+
|
|
98
|
+
If on a paid plan, configure branch protection rules:
|
|
99
|
+
- Require PR reviews before merging
|
|
100
|
+
- Require status checks to pass
|
|
101
|
+
- Require branches to be up to date
|
|
102
|
+
|
|
103
|
+
For free plans, use the pre-push hook in `.githooks/pre-push`.
|