vibe-forge 0.4.0 → 0.8.1

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.
Files changed (129) hide show
  1. package/.claude/commands/clear-attention.md +63 -63
  2. package/.claude/commands/compact-context.md +52 -0
  3. package/.claude/commands/configure-vcs.md +102 -102
  4. package/.claude/commands/forge.md +218 -171
  5. package/.claude/commands/need-help.md +77 -77
  6. package/.claude/commands/update-status.md +64 -64
  7. package/.claude/commands/worker-loop.md +106 -106
  8. package/.claude/hooks/worker-loop.js +217 -187
  9. package/.claude/scripts/setup-worker-loop.sh +45 -45
  10. package/.claude/settings.json +89 -0
  11. package/LICENSE +21 -21
  12. package/README.md +253 -232
  13. package/agents/aegis/personality.md +303 -269
  14. package/agents/anvil/personality.md +278 -240
  15. package/agents/architect/personality.md +260 -234
  16. package/agents/crucible/personality.md +362 -309
  17. package/agents/crucible-x/personality.md +210 -0
  18. package/agents/ember/personality.md +293 -265
  19. package/agents/flux/personality.md +248 -0
  20. package/agents/furnace/personality.md +342 -291
  21. package/agents/herald/personality.md +249 -247
  22. package/agents/loki/personality.md +108 -0
  23. package/agents/oracle/personality.md +284 -0
  24. package/agents/pixel/personality.md +140 -0
  25. package/agents/planning-hub/personality.md +473 -251
  26. package/agents/scribe/personality.md +253 -251
  27. package/agents/slag/personality.md +268 -0
  28. package/agents/temper/personality.md +270 -0
  29. package/bin/cli.js +372 -325
  30. package/bin/dashboard/api/agents.js +333 -0
  31. package/bin/dashboard/api/dispatch.js +507 -0
  32. package/bin/dashboard/api/tasks.js +416 -0
  33. package/bin/dashboard/public/assets/index-BpHfsx1r.js +2 -0
  34. package/bin/dashboard/public/assets/index-QODv4Zn9.css +1 -0
  35. package/bin/dashboard/public/index.html +14 -0
  36. package/bin/dashboard/server.js +645 -0
  37. package/bin/forge-daemon.sh +477 -851
  38. package/bin/forge-setup.sh +661 -645
  39. package/bin/forge-spawn.sh +164 -164
  40. package/bin/forge.cmd +83 -83
  41. package/bin/forge.sh +566 -387
  42. package/bin/lib/agents.sh +177 -177
  43. package/bin/lib/check-aliases.js +50 -0
  44. package/bin/lib/colors.sh +44 -44
  45. package/bin/lib/config.sh +347 -313
  46. package/bin/lib/constants.sh +241 -206
  47. package/bin/lib/daemon/budgets.sh +107 -0
  48. package/bin/lib/daemon/dependencies.sh +146 -0
  49. package/bin/lib/daemon/display.sh +128 -0
  50. package/bin/lib/daemon/notifications.sh +273 -0
  51. package/bin/lib/daemon/routing.sh +93 -0
  52. package/bin/lib/daemon/state.sh +163 -0
  53. package/bin/lib/daemon/sync.sh +103 -0
  54. package/bin/lib/database.sh +357 -305
  55. package/bin/lib/frontmatter.js +106 -0
  56. package/bin/lib/heimdall-setup.js +113 -0
  57. package/bin/lib/heimdall.js +265 -0
  58. package/bin/lib/json.sh +264 -258
  59. package/bin/lib/terminal.js +452 -446
  60. package/bin/lib/util.sh +126 -126
  61. package/bin/lib/vcs.js +349 -349
  62. package/config/agent-manifest.yaml +237 -243
  63. package/config/agents.json +207 -132
  64. package/config/task-template.md +159 -87
  65. package/config/task-types.yaml +111 -106
  66. package/config/templates/handoff-template.md +40 -0
  67. package/context/agent-overrides/README.md +41 -0
  68. package/context/architecture.md +42 -0
  69. package/context/modern-conventions.md +129 -129
  70. package/context/project-context-template.md +122 -122
  71. package/docs/agents.md +473 -409
  72. package/docs/architecture.md +194 -162
  73. package/docs/commands.md +451 -388
  74. package/docs/security.md +195 -144
  75. package/package.json +77 -50
  76. package/.claude/settings.local.json +0 -33
  77. package/agents/forge-master/capabilities.md +0 -144
  78. package/agents/forge-master/context-template.md +0 -128
  79. package/agents/forge-master/personality.md +0 -138
  80. package/agents/sentinel/personality.md +0 -194
  81. package/context/forge-state.yaml +0 -19
  82. package/docs/TODO.md +0 -150
  83. package/docs/getting-started.md +0 -243
  84. package/docs/npm-publishing.md +0 -95
  85. package/docs/workflows/README.md +0 -32
  86. package/docs/workflows/azure-devops.md +0 -108
  87. package/docs/workflows/bitbucket.md +0 -104
  88. package/docs/workflows/git-only.md +0 -130
  89. package/docs/workflows/gitea.md +0 -168
  90. package/docs/workflows/github.md +0 -103
  91. package/docs/workflows/gitlab.md +0 -105
  92. package/docs/workflows.md +0 -454
  93. package/tasks/completed/ARCH-001-duplicate-agent-config.md +0 -121
  94. package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +0 -88
  95. package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +0 -77
  96. package/tasks/completed/ARCH-009-test-organization.md +0 -78
  97. package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +0 -94
  98. package/tasks/completed/ARCH-012-tmp-files-in-root.md +0 -71
  99. package/tasks/completed/ARCH-013-exit-code-constants.md +0 -65
  100. package/tasks/completed/ARCH-014-sed-incompatibility.md +0 -96
  101. package/tasks/completed/ARCH-015-docs-todo-tracking.md +0 -83
  102. package/tasks/completed/CLEAN-001.md +0 -38
  103. package/tasks/completed/CLEAN-003.md +0 -47
  104. package/tasks/completed/CLEAN-004.md +0 -56
  105. package/tasks/completed/CLEAN-005.md +0 -75
  106. package/tasks/completed/CLEAN-006.md +0 -47
  107. package/tasks/completed/CLEAN-007.md +0 -34
  108. package/tasks/completed/CLEAN-008.md +0 -49
  109. package/tasks/completed/CLEAN-012.md +0 -58
  110. package/tasks/completed/CLEAN-013.md +0 -45
  111. package/tasks/completed/SEC-001-sql-injection-fix.md +0 -58
  112. package/tasks/completed/SEC-002-notification-injection-fix.md +0 -45
  113. package/tasks/completed/SEC-003-eval-injection-fix.md +0 -54
  114. package/tasks/completed/SEC-004-pid-race-condition-fix.md +0 -49
  115. package/tasks/completed/SEC-005-worker-loop-path-fix.md +0 -51
  116. package/tasks/completed/SEC-006-eval-agent-names.md +0 -55
  117. package/tasks/completed/SEC-007-spawn-escaping.md +0 -67
  118. package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +0 -72
  119. package/tasks/pending/ARCH-005-missing-src-directory.md +0 -95
  120. package/tasks/pending/ARCH-006-task-template-location.md +0 -64
  121. package/tasks/pending/ARCH-007-daemon-monolith.md +0 -91
  122. package/tasks/pending/ARCH-008-forge-master-vs-hub.md +0 -81
  123. package/tasks/pending/ARCH-010-missing-index-files.md +0 -84
  124. package/tasks/pending/CLEAN-002.md +0 -29
  125. package/tasks/pending/CLEAN-009.md +0 -31
  126. package/tasks/pending/CLEAN-010.md +0 -30
  127. package/tasks/pending/CLEAN-011.md +0 -30
  128. package/tasks/pending/CLEAN-014.md +0 -32
  129. package/tasks/review/task-001.md +0 -78
@@ -1,243 +0,0 @@
1
- # Getting Started with Vibe Forge
2
-
3
- Vibe Forge is a multi-agent development orchestration tool for Claude Code. It helps you coordinate multiple AI agents working on different aspects of your project - frontend, backend, testing, documentation, and more.
4
-
5
- ## Prerequisites
6
-
7
- Before installing Vibe Forge, ensure you have:
8
-
9
- 1. **Node.js** (v18 or later)
10
- 2. **Git** - Required for installation and version control
11
- 3. **Claude Code CLI** - Install from [claude.ai/download](https://claude.ai/download)
12
-
13
- ### Windows Users
14
-
15
- Git Bash is required. Install Git via:
16
- ```bash
17
- winget install Git.Git
18
- ```
19
-
20
- ## Installation
21
-
22
- ### Quick Start (Recommended)
23
-
24
- Run this command in your project directory:
25
-
26
- ```bash
27
- npx vibe-forge init
28
- ```
29
-
30
- This will:
31
- 1. Clone Vibe Forge into `_vibe-forge/`
32
- 2. Check prerequisites (Git, Claude Code)
33
- 3. Run the interactive setup wizard
34
- 4. Install the `/forge` slash command
35
- 5. Create a project context file
36
-
37
- ### Global Installation
38
-
39
- If you prefer a global install:
40
-
41
- ```bash
42
- npm install -g vibe-forge
43
- vibe-forge init
44
- ```
45
-
46
- ### Update to Latest Version
47
-
48
- ```bash
49
- npx vibe-forge update
50
- ```
51
-
52
- ## First-Time Setup
53
-
54
- When you run `npx vibe-forge init`, you will be guided through configuration:
55
-
56
- ### 1. Platform Detection
57
-
58
- Vibe Forge automatically detects your operating system (Windows, macOS, or Linux) and configures paths accordingly.
59
-
60
- ### 2. Terminal Selection
61
-
62
- Choose your terminal for spawning worker agents:
63
-
64
- - **Windows Terminal** (recommended for Windows) - Workers spawn in new tabs
65
- - **Manual** - You will receive instructions to start workers manually
66
-
67
- ### 3. Daemon Configuration
68
-
69
- The forge daemon monitors task folders and routes work automatically:
70
-
71
- ```
72
- Enable daemon orchestration? (Y/n):
73
- ```
74
-
75
- The daemon runs in the background and keeps track of:
76
- - Pending tasks
77
- - Worker status
78
- - Task assignments
79
-
80
- ### 4. Worker Loop Configuration
81
-
82
- Worker Loop keeps agents running continuously:
83
-
84
- ```
85
- Enable persistent worker mode? (y/N):
86
- ```
87
-
88
- When enabled, workers automatically check for new tasks after completing their current work instead of exiting.
89
-
90
- ### 5. Project Context
91
-
92
- Vibe Forge creates `context/project-context.md` with detected information about your project. Edit this file to add:
93
- - Project description
94
- - Architecture overview
95
- - Coding conventions
96
- - Team guidelines
97
-
98
- ## Basic Usage
99
-
100
- ### Start the Planning Hub
101
-
102
- Open Claude Code in your project and run:
103
-
104
- ```
105
- /forge
106
- ```
107
-
108
- This starts the Planning Hub - a multi-expert planning team that helps you:
109
- - Break down features into tasks
110
- - Assign work to specialized agents
111
- - Coordinate development efforts
112
-
113
- ### Check Status
114
-
115
- View the current state of your forge:
116
-
117
- ```
118
- /forge status
119
- ```
120
-
121
- This shows:
122
- - Active agents and their status
123
- - Pending tasks by category
124
- - Tasks in progress
125
- - Completed work
126
-
127
- ### Spawn a Worker
128
-
129
- Start a specialized agent in a new terminal:
130
-
131
- ```
132
- /forge spawn anvil
133
- ```
134
-
135
- Available agents:
136
- - `anvil` - Frontend Developer
137
- - `furnace` - Backend Developer
138
- - `crucible` - Tester / QA
139
- - `sentinel` - Code Reviewer
140
- - `scribe` - Documentation
141
- - `herald` - Release Manager
142
- - `ember` - DevOps
143
- - `aegis` - Security
144
-
145
- ### Create a Task
146
-
147
- Add a new task to the queue:
148
-
149
- ```
150
- /forge task Add user authentication to the login page
151
- ```
152
-
153
- The Planning Hub will help you:
154
- - Clarify requirements
155
- - Assign the appropriate agent
156
- - Set priority
157
-
158
- ## Project Structure
159
-
160
- After setup, your project will have:
161
-
162
- ```
163
- your-project/
164
- ├── _vibe-forge/ # Vibe Forge tool (mostly gitignored)
165
- │ ├── bin/ # CLI scripts
166
- │ ├── config/ # Configuration files
167
- │ ├── agents/ # Agent personalities
168
- │ └── .forge/ # Local config (gitignored)
169
- ├── context/ # Project context (committed)
170
- │ └── project-context.md # Your project description
171
- ├── tasks/ # Task files (committed)
172
- │ ├── pending/ # Awaiting assignment
173
- │ ├── in-progress/ # Currently being worked
174
- │ ├── review/ # Ready for review
175
- │ └── completed/ # Done
176
- └── .claude/
177
- └── commands/
178
- └── forge.md # The /forge slash command
179
- ```
180
-
181
- ## Example Workflow
182
-
183
- Here is a typical development session:
184
-
185
- 1. **Start your day** - Open Claude Code and run `/forge`
186
-
187
- 2. **Plan features** - Discuss what you want to build with the Planning Hub
188
-
189
- 3. **Spawn workers** - `/forge spawn anvil` for frontend, `/forge spawn furnace` for backend
190
-
191
- 4. **Create tasks** - `/forge task Implement shopping cart component`
192
-
193
- 5. **Monitor progress** - `/forge status` to see what is happening
194
-
195
- 6. **Review work** - Sentinel reviews completed code automatically
196
-
197
- 7. **Ship** - Herald manages releases when ready
198
-
199
- ## Next Steps
200
-
201
- - Read [Commands Reference](./commands.md) for all available commands
202
- - Read [Agent Guide](./agents.md) to learn about each specialist
203
- - Read [Workflows](./workflows.md) for common patterns
204
-
205
- ## Troubleshooting
206
-
207
- ### Claude Code not found
208
-
209
- Ensure Claude Code CLI is installed and in your PATH:
210
- ```bash
211
- claude --version
212
- ```
213
-
214
- If not found, install from [claude.ai/download](https://claude.ai/download).
215
-
216
- ### Git Bash not found (Windows)
217
-
218
- Install Git with Git Bash:
219
- ```bash
220
- winget install Git.Git
221
- ```
222
-
223
- Restart your terminal after installation.
224
-
225
- ### Slash command not working
226
-
227
- The `/forge` command should be installed in `.claude/commands/forge.md`. If missing, copy it manually:
228
-
229
- ```bash
230
- cp _vibe-forge/.claude/commands/forge.md .claude/commands/
231
- ```
232
-
233
- ### Daemon not starting
234
-
235
- Check if the daemon is already running:
236
- ```bash
237
- ./bin/forge-daemon.sh status
238
- ```
239
-
240
- Start it manually:
241
- ```bash
242
- ./bin/forge-daemon.sh start
243
- ```
@@ -1,95 +0,0 @@
1
- # npm Publishing with OIDC Trusted Publishing
2
-
3
- This document explains how Vibe Forge publishes to npm using GitHub Actions OIDC trusted publishing - no npm tokens required.
4
-
5
- ## Overview
6
-
7
- npm's [trusted publishing](https://docs.npmjs.com/trusted-publishers/) uses OpenID Connect (OIDC) to authenticate GitHub Actions workflows directly with npm. This eliminates the need to store npm tokens as secrets.
8
-
9
- ## Requirements
10
-
11
- 1. **npm CLI v11.5.1+** - OIDC support was added in npm 11.5.1
12
- 2. **Public GitHub repository** - Provenance attestation only works with public repos
13
- 3. **Trusted Publisher configured on npmjs.com** - Links your package to your GitHub repo
14
-
15
- ## Setup
16
-
17
- ### 1. Configure Trusted Publisher on npm
18
-
19
- 1. Go to https://www.npmjs.com/package/vibe-forge/access
20
- 2. Under "Trusted Publishers", add a new publisher:
21
- - **Publisher**: GitHub Actions
22
- - **Organization/user**: SpasticPalate
23
- - **Repository**: vibe-forge
24
- - **Workflow filename**: publish.yml
25
- - **Environment name**: (leave empty)
26
-
27
- ### 2. GitHub Actions Workflow
28
-
29
- The workflow requires specific permissions and npm version:
30
-
31
- ```yaml
32
- jobs:
33
- publish:
34
- runs-on: ubuntu-latest
35
- permissions:
36
- contents: read
37
- id-token: write # Required for OIDC token generation
38
- steps:
39
- - uses: actions/checkout@v4
40
-
41
- - uses: actions/setup-node@v4
42
- with:
43
- node-version: '22'
44
-
45
- # npm 11.5.1+ required for OIDC
46
- - run: npm install -g npm@latest
47
-
48
- - run: npm publish --provenance --access public
49
- ```
50
-
51
- Key points:
52
- - `id-token: write` permission enables OIDC token generation
53
- - `--provenance` flag enables signed provenance attestation
54
- - No `NODE_AUTH_TOKEN` or `NPM_TOKEN` needed
55
-
56
- ## Troubleshooting
57
-
58
- ### "Access token expired or revoked" with E404
59
-
60
- **Cause**: npm CLI version is too old (< 11.5.1)
61
-
62
- **Fix**: Add `npm install -g npm@latest` before publishing
63
-
64
- ### "Unsupported GitHub Actions source repository visibility: private"
65
-
66
- **Cause**: Provenance attestation only works with public repositories
67
-
68
- **Fix**: Either make the repo public, or remove `--provenance` and use a granular npm token instead
69
-
70
- ### "ENEEDAUTH - need auth"
71
-
72
- **Cause**: OIDC token not being generated/used
73
-
74
- **Fix**: Ensure `id-token: write` permission is set on the job
75
-
76
- ### 404 on publish despite correct setup
77
-
78
- **Cause**: Trusted Publisher configuration doesn't match workflow
79
-
80
- **Fix**: Verify on npmjs.com that:
81
- - Organization/user matches exactly (case-sensitive)
82
- - Repository name matches exactly
83
- - Workflow filename matches exactly (e.g., `publish.yml`)
84
-
85
- ## Benefits
86
-
87
- - **No secrets to manage** - No npm tokens to rotate or accidentally expose
88
- - **Provenance attestation** - Packages are cryptographically signed with build info
89
- - **Audit trail** - Provenance is published to Sigstore transparency log
90
-
91
- ## References
92
-
93
- - [npm Trusted Publishers](https://docs.npmjs.com/trusted-publishers/)
94
- - [npm Provenance](https://docs.npmjs.com/generating-provenance-statements/)
95
- - [GitHub: npm trusted publishing GA](https://github.blog/changelog/2025-07-31-npm-trusted-publishing-with-oidc-is-generally-available/)
@@ -1,32 +0,0 @@
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.
@@ -1,108 +0,0 @@
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)
@@ -1,104 +0,0 @@
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
@@ -1,130 +0,0 @@
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
- ```