Skip to content

Commit 5c599ad

Browse files
author
Ubuntu
committed
feat: Create SIMPLIFIED_WORKFLOW.md for documentation-only changes (Issue #2157)
Implements issue #3 Changes: - Implementation as per design specification - Tests added for new functionality - Documentation updated Closes #3
1 parent a180678 commit 5c599ad

10 files changed

+2853
-2
lines changed
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
name: Simplified Workflow
3+
description: Lightweight 16-step workflow for features, bugs, and refactoring
4+
version: 1.0.0
5+
applies_to:
6+
- features
7+
- bugs
8+
- refactoring
9+
prerequisites:
10+
- Git repository initialized
11+
- GitHub CLI (gh) or Azure DevOps CLI (az) installed
12+
- Tests directory exists
13+
success_criteria:
14+
- Changes merged to main branch
15+
- All tests passing
16+
- PR approved by reviewer
17+
failure_modes:
18+
- Tests fail → fix tests or implementation
19+
- Review rejected → address feedback
20+
- Merge conflicts → resolve manually
21+
---
22+
23+
# Simplified Workflow
24+
25+
A lightweight 16-step workflow optimized for:
26+
-**Small to medium changes** (1-10 files)
27+
-**Clear requirements** (no research needed)
28+
-**Standard patterns** (no architecture decisions)
29+
30+
For complex work requiring architecture design, use DEFAULT_WORKFLOW.md instead.
31+
32+
---
33+
34+
## Step 1: Verify Prerequisites
35+
36+
**Actions**:
37+
- ✅ Check Git: `git --version`
38+
- ✅ Check GitHub CLI or Azure CLI: `gh --version` or `az --version`
39+
- ✅ Verify git repository: `git status`
40+
41+
---
42+
43+
## Step 2: Create Issue/Work Item
44+
45+
**Actions**:
46+
- ✅ Create issue: `gh issue create --title "Add user authentication" --body "Implement JWT-based authentication"`
47+
- ✅ Note the issue number (e.g., #42) for branch name
48+
49+
---
50+
51+
## Step 3: Create Feature Branch
52+
53+
**Actions**:
54+
- ✅ Create and switch to branch: `git checkout -b feature/issue-42-user-authentication`
55+
- ✅ Use pattern: `feature/issue-<number>-<description>`
56+
57+
---
58+
59+
## Step 4: Review Requirements
60+
61+
**Actions**:
62+
- ✅ Read issue description completely
63+
- ✅ Identify success criteria and constraints
64+
65+
---
66+
67+
## Step 5: Identify Files to Change
68+
69+
**Actions**:
70+
- ✅ List files to modify: `find . -name "*auth*" -type f`
71+
- ✅ Plan scope: 1-10 files maximum
72+
73+
---
74+
75+
## Step 6: Write Failing Tests (TDD)
76+
77+
**Actions**:
78+
- ✅ Write tests for new functionality
79+
- ✅ Run tests to verify they fail: `pytest tests/`
80+
81+
**Example**:
82+
```python
83+
def test_user_authentication():
84+
auth = Authenticator()
85+
token = auth.authenticate("user", "password")
86+
assert auth.validate(token) is True
87+
```
88+
89+
---
90+
91+
## Step 7: Implement Solution
92+
93+
**Actions**:
94+
- ✅ Write code to make tests pass
95+
- ✅ Follow existing code style
96+
- ✅ Keep changes focused on the issue
97+
98+
---
99+
100+
## Step 8: Run Tests Until Green
101+
102+
**Actions**:
103+
- ✅ Run full test suite: `pytest tests/ -v`
104+
- ✅ Fix any failing tests
105+
- ✅ Repeat until 100% pass rate
106+
107+
---
108+
109+
## Step 9: Manual Testing (If Needed)
110+
111+
**Actions**:
112+
- ✅ Test critical user paths manually
113+
- ✅ Verify edge cases: `python -m myapp authenticate --username test`
114+
115+
---
116+
117+
## Step 10: Pre-Commit Review
118+
119+
**Actions**:
120+
- ✅ Review changes: `git diff`
121+
- ✅ Verify no debug code or TODOs remain
122+
- ✅ Scan for secrets (see Security section below)
123+
124+
---
125+
126+
## Step 11: Commit Changes
127+
128+
**Actions**:
129+
- ✅ Stage changes: `git add src/auth.py tests/test_auth.py`
130+
- ✅ Commit with clear message:
131+
```bash
132+
git commit -m "feat: add JWT authentication (#42)
133+
134+
- Implement JWT token generation
135+
- Add token validation
136+
- Update tests for auth module"
137+
```
138+
139+
**Format**: `<type>: <description> (#<issue-number>)`
140+
**Types**: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
141+
142+
---
143+
144+
## Step 12: Push to Remote
145+
146+
**Actions**:
147+
- ✅ Push branch: `git push -u origin feature/issue-42-user-authentication`
148+
149+
---
150+
151+
## Step 13: Create Pull Request
152+
153+
**Actions**:
154+
- ✅ Create PR: `gh pr create --title "Add user authentication (#42)" --body "Implements JWT-based authentication as described in #42" --reviewer teammate`
155+
- ✅ Or use Azure DevOps: `az repos pr create --title "Add user authentication (#42)" --source-branch feature/issue-42-user-authentication`
156+
157+
---
158+
159+
## Step 14: Address Review Feedback
160+
161+
**Actions**:
162+
- ✅ Respond to review comments
163+
- ✅ Make requested changes
164+
- ✅ Push updates: `git push`
165+
166+
---
167+
168+
## Step 15: Merge Pull Request
169+
170+
**Actions**:
171+
- ✅ Ensure CI checks pass and approvals received
172+
- ✅ Merge PR: `gh pr merge --squash --delete-branch`
173+
- ✅ Or Azure: `az repos pr update --id 1234 --status completed --delete-source-branch true`
174+
175+
---
176+
177+
## Step 16: Clean Up Local Branch
178+
179+
**Actions**:
180+
- ✅ Switch to main: `git checkout main`
181+
- ✅ Pull latest: `git pull`
182+
- ✅ Delete feature branch: `git branch -d feature/issue-42-user-authentication`
183+
184+
---
185+
186+
## 🔒 Security Best Practices
187+
188+
**Before committing**:
189+
- ✅ Quote all variables in scripts: `"$branch_name"` not `$branch_name`
190+
- ✅ Scan for secrets: `git diff --cached | grep -E '(password|token|secret|api[_-]?key)'`
191+
- ✅ Never commit credentials, API keys, or tokens
192+
193+
**Before merging PR**:
194+
- ✅ Review full diff: `gh pr diff` or `az repos pr show --id 1234`
195+
- ✅ Ensure no sensitive data in commit history

0 commit comments

Comments
 (0)