Git Flow Skill
Step-by-Step Instructions
Phase 4 — Implementation
- •Initialize a Git repository on
mainbranch. - •Create first commit: project structure, configuration files, IMPLEMENTATION.md stub.
- •Create
developbranch frommain. - •For each implementation step in DESIGN.md §6:
a. Create a
feature/[descriptive-name]branch fromdevelop. b. Implement the step. c. Commit with a message referencing requirements (see Commit Format below). d. Merge the feature branch intodevelop(no fast-forward:--no-ff). e. Delete the feature branch. - •After all features are merged, push
developto remote.
Phase 5 — Validation
- •Create
feature/validationbranch fromdevelop. - •Add validate.sh, demo.sh, and VALIDATION_REPORT.md.
- •Commit and merge into
develop. - •If ALL scenarios pass:
a. Merge
developintomain(no fast-forward). b. Tagmainasv0.1.0. c. Pushmainand tags to remote. - •If failures exist: stop. Proceed to Phase 7.
Phase 7a — Fix
- •Create
fix/validation-fixesbranch fromdevelop. - •Implement fixes — one commit per root cause.
- •Merge into
develop.
Phase 7b — Re-Validation
- •Create
feature/re-validationbranch fromdevelop. - •Update validate.sh if needed, re-run, update VALIDATION_REPORT.md.
- •Commit and merge into
develop. - •If ALL scenarios pass:
a. Merge
developintomain(no fast-forward). b. Tagmainasv0.1.0. c. Pushmainand tags to remote.
Commit Format
code
[REQ-XX-NNN] Short imperative description Longer description if needed. Explain what and why, not how (the code shows how). References: - REQ-XX-NNN: [requirement title] - CON-XX: [contract title] (if enforced in this commit)
Examples:
code
[REQ-CA-001] Implement root CA initialization Create ca_engine.py with init_ca() function that generates a self-signed root certificate with configurable subject and key algorithm. References: - REQ-CA-001: Generate self-signed root CA certificate - CON-INV-01: CA certificate must have CA:TRUE basic constraint
code
[REQ-CRL-001] Add CRL generation Implement crl_generator.py with generate_crl() that produces a signed CRL containing all revoked certificate serial numbers. References: - REQ-CRL-001: Generate Certificate Revocation List - CON-DAT-03: Revoked certificates must appear in next CRL
For fix commits:
code
[FIX] Root cause: revocation state not persisted Add storage.save() call after revocation list update in ca_engine.py. Fixes scenarios §6.3 and §6.5 from VALIDATION_REPORT.md. References: - CON-DAT-03: Revocation is immediate and permanent
Branch Naming
| Phase | Pattern | Example |
|---|---|---|
| Phase 4 | feature/[descriptive-name] | feature/ca-initialization |
| Phase 5 | feature/validation | feature/validation |
| Phase 7a | fix/validation-fixes | fix/validation-fixes |
| Phase 7b | feature/re-validation | feature/re-validation |
Common Edge Cases
- •A feature branch has multiple commits. Squash to one commit per feature branch before merging, unless the commits represent genuinely distinct logical steps.
- •A merge conflict occurs. Resolve it in the merge commit. Document the resolution in the commit message.
- •The remote is not yet created (Phase 4 start). Initialize git locally. Push to remote after the user provides the URL.
Quality Checklist
- • Repository has
mainanddevelopbranches - • Feature branches follow naming convention
- • Every merge to develop uses
--no-ff - • Commit messages reference requirement IDs (REQ-XX-NNN)
- • Fix commits reference the scenarios they fix
- • No direct commits to
main(only merges from develop) - • Tag
v0.1.0exists on main only when all validations pass - • Git history is linear and readable