|
| 1 | +# Workflow |
| 2 | + |
| 3 | +How work flows from idea to delivery — and back again. This is the heartbeat of the PSModule ecosystem. |
| 4 | + |
| 5 | +## The big picture |
| 6 | + |
| 7 | +Two things run side by side, continuously: |
| 8 | + |
| 9 | +1. **Context** — keeping issues, decisions, READMEs, and documentation right and evergreen. |
| 10 | +2. **Software** — delivering code, tests, and releases. |
| 11 | + |
| 12 | +Each feeds the other. Software produces signals that require context maintenance. Refined context unblocks the next round of software work. The loop never stops. |
| 13 | + |
| 14 | +```text |
| 15 | + ┌───────────────────────────────────────────────────────┐ |
| 16 | + │ Context maintenance │ |
| 17 | + │ │ |
| 18 | + │ Capture → Refine → Plan │ |
| 19 | + │ │ │ |
| 20 | + │ ┌──────────────┼──────────────┐ │ |
| 21 | + │ ▼ ▼ ▼ │ |
| 22 | + │ simple task sub-issues checklist │ |
| 23 | + │ │ |
| 24 | + └───────────────────────┼───────────────────────────────┘ |
| 25 | + │ |
| 26 | + ▼ |
| 27 | + ┌───────────────────────┼───────────────────────────────┐ |
| 28 | + │ │ │ |
| 29 | + │ Software delivery │ |
| 30 | + │ │ |
| 31 | + │ Branch → Draft PR → Build → Finalize │ |
| 32 | + │ │ │ |
| 33 | + │ ▼ │ |
| 34 | + │ Review │ |
| 35 | + │ │ │ |
| 36 | + │ fixes needed? → respond │ |
| 37 | + │ │ |
| 38 | + └───────────────────────────────────────────────────────┘ |
| 39 | + │ |
| 40 | + ▼ |
| 41 | + Run and operate |
| 42 | + (DevOps + SRE loop) |
| 43 | + │ |
| 44 | + ▼ |
| 45 | + Signals, errors, feedback |
| 46 | + │ |
| 47 | + ▼ |
| 48 | + Capture (again) |
| 49 | +``` |
| 50 | + |
| 51 | +## Phases |
| 52 | + |
| 53 | +### Capture |
| 54 | + |
| 55 | +A desire for change enters the system. It can come from anywhere: |
| 56 | + |
| 57 | +- A user request or feature idea. |
| 58 | +- A bug report or error signal. |
| 59 | +- An observation during a review. |
| 60 | +- A dependency update or platform change. |
| 61 | + |
| 62 | +The goal is to **write it down** — quickly, in a GitHub issue — so it exists outside someone's head. At this stage, precision is less important than existence. The issue captures the current state, the pain or opportunity, and the desired outcome. |
| 63 | + |
| 64 | +See [Issue Format § Section 1](Issue-Format.md) for structure. |
| 65 | + |
| 66 | +### Refine |
| 67 | + |
| 68 | +Ground the captured desire in reality. Ask: |
| 69 | + |
| 70 | +- What is the actual problem? (Not the symptom, not the first solution that comes to mind.) |
| 71 | +- Who is affected and how? |
| 72 | +- What does "done" look like from the user's perspective? |
| 73 | +- Are there constraints, dependencies, or prior decisions that matter? |
| 74 | + |
| 75 | +This may involve questions in issue comments, interactive discussion, or research. The goal is **shared understanding** — everyone (humans and agents) agrees on what the real problem is and what the outcome should be. |
| 76 | + |
| 77 | +### Plan |
| 78 | + |
| 79 | +Turn the refined understanding into actionable work: |
| 80 | + |
| 81 | +- **Decisions** — what approach will we take? What trade-offs are we making? Document them in the issue. |
| 82 | +- **Decomposition** — if the work is large, break it into sub-issues. Each sub-issue should be deliverable in a single pull request. |
| 83 | +- **Checklist** — for a single task, list the concrete steps in the issue body. |
| 84 | + |
| 85 | +The plan is the contract. It drives implementation. |
| 86 | + |
| 87 | +See [Issue Format § Sections 2–3](Issue-Format.md), [Issue Hierarchy](Issue-Hierarchy.md). |
| 88 | + |
| 89 | +### Build |
| 90 | + |
| 91 | +Execute the plan: |
| 92 | + |
| 93 | +1. **Branch** — create a branch (and [worktree](../Agents/Git-Worktrees.md)) for the issue. |
| 94 | +2. **Draft PR** — push early and open a draft pull request. Link it to the issue. This makes progress visible and attaches CI from the start. |
| 95 | +3. **Implement** — work through the checklist. One logical change per commit. Update the issue as each task completes. |
| 96 | +4. **Test locally** — don't push known failures to CI. Push work as far inward as it can go. |
| 97 | + |
| 98 | +See [Commit Conventions](Commit-Conventions.md), [PR Format](PR-Format.md). |
| 99 | + |
| 100 | +### Review |
| 101 | + |
| 102 | +Every change gets a second perspective: |
| 103 | + |
| 104 | +- Does the PR deliver what the linked issue asks for? |
| 105 | +- Does it follow the project's standards and conventions? |
| 106 | +- Are there security concerns or undiscussed decisions? |
| 107 | +- Is the code clear and maintainable? |
| 108 | + |
| 109 | +Feedback is processed one thread at a time: read → evaluate → fix → reply → resolve. |
| 110 | + |
| 111 | +See [Review Etiquette](Review-Etiquette.md). |
| 112 | + |
| 113 | +### Ship |
| 114 | + |
| 115 | +When all tasks are complete, CI is green, and review is approved: |
| 116 | + |
| 117 | +1. Update the PR title and description as a user-facing release note. |
| 118 | +2. Apply the correct labels (Major, Minor, Patch, etc.). |
| 119 | +3. Mark ready for review (or merge, depending on the project's flow). |
| 120 | + |
| 121 | +The PR description becomes the release note. Write it for end users, not reviewers. |
| 122 | + |
| 123 | +See [PR Format](PR-Format.md). |
| 124 | + |
| 125 | +### Operate |
| 126 | + |
| 127 | +> You build it, you run it. |
| 128 | +
|
| 129 | +After merge, the system is live. Monitor, observe, respond to signals. When something breaks or an opportunity appears — the loop starts again at **Capture**. |
| 130 | + |
| 131 | +## Three horizons of planning |
| 132 | + |
| 133 | +Planning happens at different time horizons and levels of detail: |
| 134 | + |
| 135 | +| | Now | Next | Later | |
| 136 | +| ---------- | -------------------- | ------------- | -------------- | |
| 137 | +| Conceptual | Vision delivered now | Vision next | Vision later | |
| 138 | +| Logical | Approach now | Approach next | Approach later | |
| 139 | +| Detailed | Tasks in flight | Tasks ready | Tasks framed | |
| 140 | + |
| 141 | +- **Now / Next / Later** are time horizons without firm dates. |
| 142 | +- **Conceptual / Logical / Detailed** are levels of fidelity. |
| 143 | + |
| 144 | +Detail increases as work moves from Later toward Now. |
| 145 | + |
| 146 | +- A single task lives in **Now / Detailed**. |
| 147 | +- A product backlog item lives between **Now / Logical** and **Next / Detailed**. |
| 148 | +- An epic spans **Now → Next → Later** at **Conceptual / Logical** fidelity. |
| 149 | + |
| 150 | +## Guiding principles in the workflow |
| 151 | + |
| 152 | +| Principle | Where it shows up | |
| 153 | +| -------------------------------- | ---------------------------------------- | |
| 154 | +| Start with Why (Golden Circle) | Capture and Refine — grounding the work | |
| 155 | +| OKRs | Capture (especially at Epic level) | |
| 156 | +| YAGNI / Lean | Plan and Build — thinnest viable path | |
| 157 | +| Test-Driven Development | Build — define tests with behavior | |
| 158 | +| DevOps / SRE | Operate — continuous loop | |
| 159 | +| 4-eyes principle | Review — every change gets a second look | |
| 160 | +| Everything as Code | All phases — issues, PRs, docs in source | |
| 161 | + |
| 162 | +See [Principles](Principles.md) for the full set. |
0 commit comments