Skip to content

Commit b5203a5

Browse files
committed
add pull request guidance
1 parent 31b56b4 commit b5203a5

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ Further docs:
6363

6464
- [Workflow](/Users/jonyfq/git/udx/dev.kit/docs/workflow.md)
6565
- [Engineering Guide](/Users/jonyfq/git/udx/dev.kit/docs/engineering-guide.md)
66+
- [Pull Requests](/Users/jonyfq/git/udx/dev.kit/docs/pull-requests.md)
6667
- [Development](/Users/jonyfq/git/udx/dev.kit/docs/development.md)

docs/engineering-guide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,13 @@ Good enforcement targets:
6767
- canonical verification before push
6868
- explicit config and output contracts
6969
- module structure and file-size guidance
70+
- pull request structure and operational clarity
7071

7172
Poor enforcement targets:
7273

7374
- whether someone checked `git status` at the start of the day
7475
- whether they merged the right base branch at the right moment without repo context
7576

7677
`dev.kit` should increasingly validate the enforceable parts of this guide, so the repo teaches its own operating model to both humans and agents.
78+
79+
Useful PR guidance is documented separately in [docs/pull-requests.md](/Users/jonyfq/git/udx/dev.kit/docs/pull-requests.md).

docs/pull-requests.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Pull Requests
2+
3+
Useful pull requests are not just code dumps. They explain the operational change clearly enough that reviewers, CI, and future agents can understand what changed and why.
4+
5+
## What Good PRs Should Do
6+
7+
- state the problem first
8+
- summarize the actual change in a short `Changes` section
9+
- keep the scope coherent instead of mixing unrelated work
10+
- include docs or examples when behavior or workflow changes
11+
- give reviewers enough runtime or config context to validate the change
12+
13+
## Preferred Shape
14+
15+
Use a structure like this:
16+
17+
```md
18+
## Problem
19+
20+
What is broken, drifting, risky, or unclear?
21+
22+
## Changes
23+
24+
- concrete change 1
25+
- concrete change 2
26+
- concrete change 3
27+
28+
## Validation
29+
30+
- command or workflow used to verify
31+
- relevant environment or scenario notes
32+
33+
## Related
34+
35+
- issue, incident, or follow-up links
36+
```
37+
38+
If screenshots, logs, or runtime traces make the problem clearer, include them. Use them to support the explanation, not replace it.
39+
40+
## What The Example PRs Do Well
41+
42+
Reference examples:
43+
44+
- `udx/worker-site#76`
45+
- `udx/worker#117`
46+
- `udx/worker#113`
47+
48+
Patterns worth repeating from those PRs:
49+
50+
- they explain the problem in operational terms, not only code terms
51+
- they keep the change list concrete and scannable
52+
- they connect config, runtime, and dependency updates instead of pretending the code changed in isolation
53+
- they include documentation updates when workflow or behavior changes
54+
- they show real scenarios or examples when precedence, secrets, or runtime behavior is subtle
55+
56+
## PR Rules
57+
58+
- keep one PR focused on one logical improvement area
59+
- if the change has multiple logical parts, use separate commits with clean commit subjects
60+
- include docs updates when the engineering contract changes
61+
- prefer reproducible validation over “tested locally” statements
62+
- do not hide important behavior changes inside dependency bump PRs without explaining the behavioral reason
63+
64+
## Anti-Patterns
65+
66+
- vague titles that do not describe the operational change
67+
- large mixed PRs with unrelated fixes
68+
- no explanation of config or runtime impact
69+
- no validation notes for behavior-sensitive changes
70+
- missing docs when commands, structure, or workflow expectations changed
71+
72+
## How This Fits `dev.kit`
73+
74+
`dev.kit` should eventually validate more of this automatically:
75+
76+
- whether workflow-affecting changes also updated docs
77+
- whether architecture or config contracts changed without explanation
78+
- whether PR-sized changes stay aligned with the repo's engineering guide

docs/todo.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111

1212
- expose more explicit engineering-contract guidance for agents, including preferred edit boundaries and validation order
1313
- add machine-readable improvement priority or severity so agents can plan fixes more predictably
14+
- improve CLI and output UI so factor status, evidence, and guidance are easier to scan quickly
1415

1516
## Validation
1617

1718
- add worker-backed fixture coverage for architecture edge cases
1819
- add fixtures for larger application layouts and infra-heavy repos
1920
- add checks for repos that document commands but do not actually expose them
21+
- make git hooks fail more gracefully when local prerequisites such as Docker are unavailable, while keeping the enforcement intent clear
2022

2123
## Docs
2224

0 commit comments

Comments
 (0)