ahead-pi 0.2.0 → 0.3.0

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 (102) hide show
  1. package/README.md +29 -9
  2. package/dist/ahead_wasm.wasm +0 -0
  3. package/generated/corrective-debugging/ai-audit.md +39 -0
  4. package/generated/corrective-debugging/ai-review.md +46 -0
  5. package/generated/corrective-debugging/characterize.md +53 -0
  6. package/generated/corrective-debugging/conclude.md +59 -0
  7. package/generated/corrective-debugging/correction.md +53 -0
  8. package/generated/corrective-debugging/deploy.md +38 -0
  9. package/generated/corrective-debugging/human-review.md +45 -0
  10. package/generated/corrective-debugging/implement.md +42 -0
  11. package/generated/corrective-debugging/investigate.md +59 -0
  12. package/generated/corrective-debugging/manifest.json +30 -0
  13. package/generated/corrective-debugging/model.md +53 -0
  14. package/generated/corrective-debugging/outcome.md +38 -0
  15. package/generated/corrective-debugging/plan.md +53 -0
  16. package/generated/corrective-debugging/verify.md +47 -0
  17. package/generated/decision/compare.md +45 -0
  18. package/generated/decision/criteria.md +45 -0
  19. package/generated/decision/decide.md +45 -0
  20. package/generated/decision/frame.md +45 -0
  21. package/generated/decision/manifest.json +21 -0
  22. package/generated/decision/options.md +47 -0
  23. package/generated/decision/publish.md +38 -0
  24. package/generated/decision/research.md +45 -0
  25. package/generated/internal-improvement/ai-audit.md +39 -0
  26. package/generated/internal-improvement/ai-review.md +46 -0
  27. package/generated/internal-improvement/baseline.md +46 -0
  28. package/generated/internal-improvement/decision.md +45 -0
  29. package/generated/internal-improvement/deploy.md +38 -0
  30. package/generated/internal-improvement/human-review.md +45 -0
  31. package/generated/internal-improvement/implement.md +42 -0
  32. package/generated/internal-improvement/invariants.md +38 -0
  33. package/generated/internal-improvement/manifest.json +29 -0
  34. package/generated/internal-improvement/options.md +47 -0
  35. package/generated/internal-improvement/outcome.md +38 -0
  36. package/generated/internal-improvement/plan.md +53 -0
  37. package/generated/internal-improvement/target.md +45 -0
  38. package/generated/internal-improvement/verify.md +45 -0
  39. package/generated/investigation/bound.md +45 -0
  40. package/generated/investigation/conclude.md +45 -0
  41. package/generated/investigation/explore.md +60 -0
  42. package/generated/investigation/frame.md +45 -0
  43. package/generated/investigation/gather.md +45 -0
  44. package/generated/investigation/manifest.json +21 -0
  45. package/generated/investigation/synthesize.md +51 -0
  46. package/generated/operational-stabilization/assess.md +46 -0
  47. package/generated/operational-stabilization/execute-observe.md +45 -0
  48. package/generated/operational-stabilization/manifest.json +19 -0
  49. package/generated/operational-stabilization/monitor.md +45 -0
  50. package/generated/operational-stabilization/outcome.md +38 -0
  51. package/generated/operational-stabilization/respond.md +40 -0
  52. package/generated/operational-stabilization/verify-recovery.md +45 -0
  53. package/generated/product-change/ai-audit.md +12 -6
  54. package/generated/product-change/ai-review.md +20 -7
  55. package/generated/product-change/decision.md +16 -4
  56. package/generated/product-change/define.md +9 -4
  57. package/generated/product-change/deploy.md +9 -4
  58. package/generated/product-change/human-review.md +16 -4
  59. package/generated/product-change/implement.md +14 -5
  60. package/generated/product-change/manifest.json +9 -4
  61. package/generated/product-change/options.md +16 -4
  62. package/generated/product-change/outcome.md +9 -4
  63. package/generated/product-change/plan.md +22 -4
  64. package/generated/product-change/questions.md +22 -4
  65. package/generated/product-change/research.md +16 -4
  66. package/generated/product-change/verify.md +9 -4
  67. package/generated/recommended-skills.json +24 -0
  68. package/generated/reference/CONSTITUTION.md +43 -0
  69. package/generated/reference/docs/acceptable-ai-use.md +217 -0
  70. package/generated/reference/docs/design/adapted-skill-guidance.md +27 -0
  71. package/generated/reference/docs/design/debugging-and-operations.md +119 -0
  72. package/generated/reference/docs/design/executable-workflows.md +122 -0
  73. package/generated/reference/docs/design/instruction-authoring.md +28 -0
  74. package/generated/reference/docs/design/process-taxonomy.md +144 -0
  75. package/generated/reference/docs/design/review-workbench.md +37 -0
  76. package/generated/reference/docs/engineering-practice.md +163 -0
  77. package/generated/reference/docs/evidence/evidence-standard.md +123 -0
  78. package/generated/reference/docs/evidence/research-map.md +98 -0
  79. package/generated/reference/docs/rationale.md +210 -0
  80. package/generated/reference/docs/recommended-skills.md +19 -0
  81. package/generated/reference/docs/references/pragmatic-programmer-page-index.md +113 -0
  82. package/generated/reference/docs/references/submitted-engineering-notes.md +306 -0
  83. package/generated/reference/docs/releasing-pi.md +89 -0
  84. package/generated/reference/docs/workflows/README.md +142 -0
  85. package/generated/reference/docs/workflows/corrective-debugging.md +221 -0
  86. package/generated/reference/docs/workflows/decision.md +149 -0
  87. package/generated/reference/docs/workflows/internal-improvement.md +219 -0
  88. package/generated/reference/docs/workflows/investigation.md +161 -0
  89. package/generated/reference/docs/workflows/operational-stabilization.md +187 -0
  90. package/generated/reference/docs/workflows/product-change.md +216 -0
  91. package/generated/reference/index.json +298 -0
  92. package/package.json +36 -25
  93. package/src/engine.ts +26 -7
  94. package/src/flow-guides.ts +168 -0
  95. package/src/guidance.ts +220 -72
  96. package/src/index.ts +696 -140
  97. package/src/reference-viewer.ts +73 -0
  98. package/src/reference.ts +107 -0
  99. package/src/review.ts +360 -0
  100. package/src/skills.ts +133 -0
  101. package/src/storage.ts +77 -13
  102. package/src/types.ts +1 -0
@@ -0,0 +1,210 @@
1
+ # Why AHEAD
2
+
3
+ ## Human-led engineering, amplified by AI
4
+
5
+ AI can make software engineering faster. It can search broadly, synthesize information, identify omissions, generate alternatives, produce routine code, explain unfamiliar systems, and review more material than a person can inspect unaided.
6
+
7
+ Those capabilities create real leverage. They also create a temptation to optimize for the visible artifact—an answer, design, plan, or code change—while weakening the human understanding that makes the artifact trustworthy.
8
+
9
+ AHEAD exists because software engineering is not merely the production of code. It is the development and application of judgment under incomplete information. Engineers frame problems, construct mental models, decide which tradeoffs matter, test explanations, recognize abnormalities, and remain accountable when systems affect other people.
10
+
11
+ The goal is therefore not maximum AI autonomy. It is a stronger combined engineering system in which automation increases human capability without displacing the thinking required to direct, evaluate, and improve it.
12
+
13
+ The central principle is:
14
+
15
+ > **Human thinks first → AI amplifies and challenges → Human decides.**
16
+
17
+ ## The Toyota lesson
18
+
19
+ In 2014, Bloomberg reported that Toyota was putting skilled people back into selected production processes that had been automated. The objective was not nostalgia or the wholesale rejection of robots. Toyota wanted workers to deepen their manual knowledge of how parts were made so they could discover improvements and build better processes and machines.
20
+
21
+ Toyota's own description of the Toyota Production System gives the broader principle. Its concept of *jidoka* is commonly described as “automation with a human touch.” Toyota explains that people first need to understand work well enough to perform it, detect abnormalities, remove waste and inconsistency, and then embody that learning in machinery. Automation handles repeatable work, while people supply judgment and *kaizen*—continuous improvement.
22
+
23
+ Toyota has continued to describe its approach as automation centered on people. Its position is not that machines are undesirable. It is that machines do not independently determine what improvement means. Human skill and technological capability must develop together.
24
+
25
+ That is the analogy AHEAD applies to software engineering.
26
+
27
+ AI can generate an implementation without possessing the team's lived understanding of its customers, constraints, architecture, operations, risk tolerance, or long-term intent. If engineers become reviewers of artifacts they did not reason toward, they may gradually lose the ability to recognize subtle errors, challenge framing, diagnose novel failures, or improve the engineering process itself.
28
+
29
+ AHEAD therefore keeps humans engaged in the parts of engineering that create and exercise judgment. AI is used aggressively where it expands human reach, but not in ways that turn engineers into passive supervisors of a process they no longer understand.
30
+
31
+ The analogy has limits. Software development is not an assembly line, generative AI is not an industrial robot, and Toyota's experience does not prove a particular software methodology. The useful lesson is narrower: **capability that is fully delegated can stop developing, and people need direct contact with the work to recognize abnormalities and invent better ways of doing it.**
32
+
33
+ Sources:
34
+
35
+ - [Humans Replacing Robots Herald Toyota's Vision of Future — Bloomberg, 2014](https://www.bloomberg.com/news/articles/2014-04-06/humans-replacing-robots-herald-toyota-s-vision-of-future)
36
+ - [Toyota Production System — Toyota Motor Corporation](https://global.toyota/en/company/vision-and-philosophy/production-system/)
37
+ - [Skilled Manufacturing Key to the Future — Toyota Motor Corporation](https://global.toyota/en/newsroom/corporate/35433493.html)
38
+
39
+ ## Understanding is productive capacity
40
+
41
+ An engineer's mental model is part of the organization's productive capacity. It enables the engineer to:
42
+
43
+ - determine whether the requested solution addresses the real problem;
44
+ - recognize when a generated answer is plausible but wrong;
45
+ - reason about behavior that is not represented in the immediate prompt;
46
+ - debug unfamiliar or emergent failures;
47
+ - make safe changes under time pressure;
48
+ - explain and defend architectural decisions;
49
+ - teach teammates and improve tools and processes;
50
+ - remain accountable for the result.
51
+
52
+ Code produced quickly without corresponding understanding can create hidden debt. The organization receives an artifact, but it may lose the ability to operate and evolve that artifact safely. AHEAD treats understanding as a required engineering outcome rather than incidental overhead.
53
+
54
+ ## Why humans think first
55
+
56
+ AI suggestions are influential even when they are weak. Once an apparently coherent answer is present, people tend to evaluate that answer instead of exploring the problem independently. The question can quietly change from “What do we think is right?” to “Can we find a reason to accept or reject what the AI proposed?”
57
+
58
+ AHEAD asks the human to contribute first where independent judgment matters:
59
+
60
+ - define the problem and desired outcome;
61
+ - state an initial understanding or set of questions;
62
+ - propose at least one option before AI expands the option space;
63
+ - select debugging hypotheses and tests;
64
+ - choose the decision and accept its tradeoffs;
65
+ - write the first-pass implementation or remediation plan;
66
+ - own the implementation; for lasting changes, a different human performs the final engineering review.
67
+
68
+ The first human contribution does not need to be polished or complete. Its purpose is to make the person's current mental model visible before AI influences it. AI can then do what it is particularly good at: broaden the search, find contradictions, identify omissions, generate counterarguments, and expose assumptions.
69
+
70
+ ## Why AI still matters
71
+
72
+ Human-led does not mean AI-last, AI-light, or manually performing every task. Refusing useful automation would also weaken engineering.
73
+
74
+ AI can improve the process by:
75
+
76
+ - researching internal and external sources;
77
+ - compiling evidence and tracing claims back to sources;
78
+ - identifying missing questions and contradictory information;
79
+ - proposing additional options after the human has framed the space;
80
+ - arguing against a preferred approach;
81
+ - generating debugging hypotheses and discriminating tests;
82
+ - assisting with bounded implementation, tests, and mechanical changes;
83
+ - reviewing correctness, security, architecture, test coverage, and plan compliance;
84
+ - comparing observed outcomes with original intent;
85
+ - preserving and connecting engineering knowledge.
86
+
87
+ The correct boundary is not “human work” versus “AI work.” It is **human accountability and judgment supported by appropriately scoped AI capabilities**.
88
+
89
+ ## Why decisions remain human
90
+
91
+ Engineering decisions are rarely determined by technical facts alone. They encode product priorities, acceptable risk, reversibility, organizational capability, operational burden, opportunity cost, and obligations to users.
92
+
93
+ AI can make those considerations visible, but it cannot legitimately accept their consequences for the organization. AHEAD therefore requires humans to select approaches, record rationale and tradeoffs, accept unresolved uncertainty, and approve consequential actions.
94
+
95
+ This is not ceremonial approval. If a human cannot explain the decision and the evidence behind it, the workflow has produced an approval record without producing accountable engineering.
96
+
97
+ ## Why debugging remains human-led
98
+
99
+ Debugging is not simply locating a suspicious line of code. It is an iterative process of constructing and correcting a model of reality:
100
+
101
+ ```text
102
+ Facts → mental model → hypothesis → test
103
+ → updated evidence → revised model → conclusion
104
+ ```
105
+
106
+ AI can generate many plausible explanations and suggest evidence to collect. Humans still choose which explanations are credible enough to test, authorize safe experiments, interpret results in context, and decide when the evidence justifies a conclusion or intervention.
107
+
108
+ This matters even more for operational systems. A production failure may not be a software bug. It may arise from reconciliation behavior, configuration drift, capacity, an external provider, timing, data, or an emergent interaction between individually functioning components. Investigation requires an understanding of desired versus actual state, timelines, control loops, scope, and recovery signals. AHEAD supports that human reasoning rather than reducing every failure to AI-assisted source-code search.
109
+
110
+ ## Why AI review does not replace human review
111
+
112
+ AI review and human review provide different defenses.
113
+
114
+ AI can consistently compare a large changeset against requirements, plans, common defect patterns, security concerns, and missing tests. It can revisit the work without fatigue and produce useful challenges.
115
+
116
+ Human reviewers understand organizational context, implicit architectural boundaries, operational history, product consequences, and whether the implementation is one the team is willing and able to own. They also carry accountability that an AI system cannot.
117
+
118
+ AHEAD uses AI review before final human review. For a lasting engineering change, that final review is performed by a person other than the implementer. The AI broadens scrutiny; the independent human reviewer makes the final engineering judgment. In an emergency, review may be deferred to restore service, but it remains due after stabilization.
119
+
120
+ ## The failure modes AHEAD is designed to prevent
121
+
122
+ ### Artifact without understanding
123
+
124
+ The AI produces a persuasive design or implementation, but nobody can adequately explain why it is correct or how it will behave outside the happy path.
125
+
126
+ ### Automation bias
127
+
128
+ The first generated answer anchors the team's thinking, narrowing the options and hypotheses they seriously consider.
129
+
130
+ ### Accountability theater
131
+
132
+ A human clicks approve after inspecting output but did not own the framing, decision, or reasoning that produced it.
133
+
134
+ ### Skill atrophy
135
+
136
+ Engineers increasingly supervise generated work while exercising less of the problem solving, debugging, and system modeling needed for novel situations.
137
+
138
+ ### Self-confirming automation
139
+
140
+ AI proposes the approach, implements it, generates its tests, and reviews its own assumptions. Multiple artifacts create the appearance of independent checks while sharing the same blind spots.
141
+
142
+ ### Process theater
143
+
144
+ Required documents and gates are completed to satisfy tooling, but they do not record real reasoning or improve decisions.
145
+
146
+ AHEAD must resist all six. Its workflows should create useful moments for thought, challenge, evidence, and decision—not merely more generated paperwork.
147
+
148
+ ## What AHEAD optimizes for
149
+
150
+ AHEAD does not optimize for lines of AI-generated code or the percentage of a workflow performed autonomously. It optimizes for:
151
+
152
+ - better problem framing;
153
+ - broader and better-supported option sets;
154
+ - explicit decisions and tradeoffs;
155
+ - stronger human mental models;
156
+ - faster access to relevant evidence;
157
+ - safer implementation and operations;
158
+ - independent challenge before consequential actions;
159
+ - earlier detection of incorrect assumptions;
160
+ - durable, inspectable engineering knowledge;
161
+ - learning that improves both people and automation.
162
+
163
+ Delivery speed matters. AHEAD's claim is that sustainable speed comes from combining human understanding with AI leverage, not from maximizing automation at every step.
164
+
165
+ ## The intended relationship
166
+
167
+ The relationship between an engineer and AI should resemble a strong engineering partnership, with an important asymmetry: the human is accountable.
168
+
169
+ The human supplies intent, context, judgment, and responsibility. AI supplies reach, recall, variation, synthesis, and challenge. Each compensates for limitations of the other, but only the human can decide what the organization should do and own what happens next.
170
+
171
+ That is why AHEAD means **Assisted Human Engineering and Development**. The adjective is “assisted.” The subject is human engineering.
172
+
173
+ ## How AHEAD expects engineers to work
174
+
175
+ AHEAD's philosophy applies beyond explicit workflow gates. Engineers should:
176
+
177
+ - care about the quality and consequences of their work;
178
+ - think deliberately rather than operate on autopilot;
179
+ - understand the user, domain, constraints, and system before optimizing a solution;
180
+ - make assumptions, evidence, decisions, and uncertainty visible;
181
+ - prefer simple, local, independently changeable parts over convenient but entangled designs;
182
+ - prototype to learn without quietly turning exploratory code into production code;
183
+ - automate repeatable mechanics while retaining mastery of the work being automated;
184
+ - design for testing, failure, diagnosis, and recovery;
185
+ - use version control, traceable decisions, and durable engineering records;
186
+ - fix problems without turning investigation into blame;
187
+ - communicate from genuine understanding and state uncertainty honestly;
188
+ - keep learning, including learning when a favored tool or practice does not improve outcomes.
189
+
190
+ The detailed [engineering-practice guide](engineering-practice.md) traces these recommendations to empirical research, standards, and practitioner sources. Not every useful craft principle has experimental support; AHEAD labels the source and strength instead of presenting all advice as settled science.
191
+
192
+ ## Acceptable use of AI
193
+
194
+ AI use is appropriate when it expands human reach without replacing the human reasoning, knowledge, or accountability the work requires. Typical uses include research, bounded boilerplate, candidate tests after a human defines expected behavior, examples and fixtures, explanations, proposed refactorings, documentation drafts based on supplied facts, structured meeting notes, additional design options, debugging hypotheses, and first-pass review.
195
+
196
+ Full vibe coding is also appropriate for explicitly disposable, isolated prototypes built to answer a learning question quickly. The prototype may demonstrate feasibility or reveal how an idea feels, but it is not production evidence. Useful learning is preserved; prototype code is discarded. Anything retained must re-enter the ordinary human-led engineering workflow.
197
+
198
+ AI use is not acceptable when it defines business behavior, substitutes for learning or codebase knowledge, makes a consequential decision, produces core business logic on the engineer's behalf, hides uncertainty, invents evidence, impersonates human authorship, performs final approval, uses unauthorized sensitive context, or produces code the responsible engineer cannot explain, test, maintain, debug, and change.
199
+
200
+ The boundary depends on risk. AI may assist with security, authorization, cryptography, data migrations, infrastructure, CI/CD, or production operations, but such work requires explicit human design, authorization, and independent verification. Workflow permission never grants operational permission.
201
+
202
+ The full [acceptable-use policy](acceptable-ai-use.md) records the conditions, heightened-review areas, prohibited uses, and evidence behind these boundaries.
203
+
204
+ ## Evidence posture
205
+
206
+ AHEAD is evidence-informed; it is not yet an experimentally validated methodology. No single study establishes that the complete AHEAD sequence is optimal. Some principles have direct support from empirical software-engineering research, some draw on adjacent cognitive research or consensus standards, and some—especially the exact “human first” sequencing—remain design hypotheses that AHEAD must test.
207
+
208
+ The existing evidence also resists simplistic claims about AI. A randomized field study across 4,867 developers found increased completed tasks with access to an AI coding assistant, while a smaller randomized study of experienced open-source developers working in familiar repositories found that the available AI tools increased completion time. The responsible conclusion is that AI's effect depends on the people, task, system, tool, and outcome being measured—not that AI is inherently productive or unproductive.
209
+
210
+ AHEAD will maintain a [research map](evidence/research-map.md) that records the evidence and limitations behind each important process choice. Its [evidence standard](evidence/evidence-standard.md) defines how claims are classified and how the methodology should be revised when better evidence appears.
@@ -0,0 +1,19 @@
1
+ # Recommended Skills
2
+
3
+ Status: reviewed catalog v0.1
4
+
5
+ AHEAD may recommend independently maintained agent skills when they strengthen an active phase. Recommendations are references, not bundled code or silent dependencies. A human chooses whether to inspect and install one, and AHEAD's workflow, authority boundaries, and gates remain controlling.
6
+
7
+ The machine-readable catalog is `recommendations/skills-v0.1.json`. Every entry pins the exact revision AHEAD reviewed, supplies an inspectable source URL and install command, identifies applicable workflows and phases, and records compatibility constraints. Updating a recommendation requires reviewing the new revision before changing the pin.
8
+
9
+ ## Ponytail
10
+
11
+ [Ponytail](https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail) is recommended as an optional persistence and problem-solving aid for difficult implementation, corrective debugging, and investigation work. AHEAD does not adopt Ponytail's authority model: the human still leads, its suggestions remain subject to the active phase, and a quick version is not production-ready merely because it works.
12
+
13
+ Inspect the pinned source, then opt in with:
14
+
15
+ ```sh
16
+ npx skills add https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail --agent pi
17
+ ```
18
+
19
+ The Pi integration exposes this catalog but never runs the command itself. Future editor adapters should render the same canonical catalog through their native UI.
@@ -0,0 +1,113 @@
1
+ # *The Pragmatic Programmer* Page Index
2
+
3
+ Status: submitted source notes
4
+
5
+ ## Edition and use
6
+
7
+ This index preserves the page-level provenance from the original AHEAD engineering-practice notes for:
8
+
9
+ > David Thomas and Andrew Hunt, *The Pragmatic Programmer: Your Journey to Mastery*, 20th Anniversary Edition, ISBN 9780135957059.
10
+
11
+ Page numbers are edition-specific and may not match an ebook or another printing. The titles and locators below are the submitter's reading notes, retained so AHEAD's distilled guidance remains traceable. They are not presented as scientific evidence; the [research map](../evidence/research-map.md) separately records empirical support.
12
+
13
+ Two submitted locators look like transcription errors but are intentionally preserved pending a check against the physical edition:
14
+
15
+ - tips 1 and 2 use `xlx`, which is not standard Roman-numeral notation;
16
+ - tip 40 uses p. 15, although it occurs between notes for pp. 151 and 156.
17
+
18
+ ## Tip locators
19
+
20
+ | No. | Submitted tip title | Page |
21
+ |---:|---|---:|
22
+ | 1 | Care About Your Craft | xlx |
23
+ | 2 | Think! About Your Work | xlx |
24
+ | 3 | Provide Options, Don't Make Lame Excuses | 3 |
25
+ | 4 | Don't Live With Broken Windows | 5 |
26
+ | 5 | Be a Catalyst for Change | 8 |
27
+ | 6 | Remember the Big Picture | 8 |
28
+ | 7 | Make Quality a Requirements Issue | 11 |
29
+ | 8 | Invest Regularly in Your Knowledge Portfolio | 14 |
30
+ | 9 | Critically Analyze What You Read and Hear | 16 |
31
+ | 10 | It's Both What You Say and the Way You Say It | 21 |
32
+ | 11 | DRY—Don't Repeat Yourself | 27 |
33
+ | 12 | Make It Easy to Reuse | 33 |
34
+ | 13 | Eliminate Effects Between Unrelated Things | 35 |
35
+ | 14 | There Are No Final Decisions | 46 |
36
+ | 15 | Use Tracer Bullets to Find the Target | 49 |
37
+ | 16 | Prototype to Learn | 54 |
38
+ | 17 | Program Close to the Problem Domain | 58 |
39
+ | 18 | Estimate to Avoid Surprises | 64 |
40
+ | 19 | Iterate the Schedule with the Code | 69 |
41
+ | 20 | Keep Knowledge in Plain Text | 74 |
42
+ | 21 | Use the Power of Command Shells | 80 |
43
+ | 22 | Use a Single Editor Well | 85 |
44
+ | 23 | Always Use Source Code Control | 88 |
45
+ | 24 | Fix the Problem, Not the Blame | 91 |
46
+ | 25 | Don't Panic When Debugging | 91 |
47
+ | 26 | “select” Isn't Broken | 96 |
48
+ | 27 | Don't Assume It—Prove It | 97 |
49
+ | 28 | Learn a Text Manipulation Language | 100 |
50
+ | 29 | Write Code That Writes Code | 103 |
51
+ | 30 | You Can't Write Perfect Software | 107 |
52
+ | 31 | Design with Contracts | 111 |
53
+ | 32 | Crash Early | 120 |
54
+ | 33 | Use Assertions to Prevent the Impossible | 122 |
55
+ | 34 | Use Exceptions for Exceptional Problems | 127 |
56
+ | 35 | Finish What You Start | 129 |
57
+ | 36 | Minimize Coupling Between Modules | 140 |
58
+ | 37 | Configure, Don't Integrate | 144 |
59
+ | 38 | Put Abstractions in Code, Details in Metadata | 145 |
60
+ | 39 | Analyze Workflow to Improve Concurrency | 151 |
61
+ | 40 | Design Using Services | 15 |
62
+ | 41 | Always Design for Concurrency | 156 |
63
+ | 42 | Separate Views from Model | 161 |
64
+ | 43 | Use Blackboards to Coordinate Workflow | 169 |
65
+ | 44 | Don't Program by Coincidence | 175 |
66
+ | 45 | Estimate the Order of Your Algorithms | 181 |
67
+ | 46 | Test Your Estimates | 182 |
68
+ | 47 | Refactor Early, Refactor Often | 186 |
69
+ | 48 | Design to Test | 192 |
70
+ | 49 | Test Your Software, or Your Users Will | 197 |
71
+ | 50 | Don't Use Wizard Code You Don't Understand | 199 |
72
+ | 51 | Don't Gather Requirements—Dig for Them | 202 |
73
+ | 52 | Work with a User to Think Like a User | 204 |
74
+ | 53 | Abstractions Live Longer than Details | 209 |
75
+ | 54 | Use a Project Glossary | 210 |
76
+ | 55 | Don't Think Outside the Box—Find the Box | 213 |
77
+ | 56 | Start When You're Ready | 215 |
78
+ | 57 | Some Things Are Better Done than Described | 218 |
79
+ | 58 | Don't Be a Slave to Formal Methods | 220 |
80
+ | 59 | Costly Tools Don't Produce Better Designs | 222 |
81
+ | 60 | Organize Team Around Functionality | 227 |
82
+ | 61 | Don't Use Manual Procedures | 231 |
83
+ | 62 | Test Early. Test Often. Test Automatically. | 237 |
84
+ | 63 | Coding Ain't Done 'Til All the Tests Run | 238 |
85
+ | 64 | Use Saboteurs to Test Your Testing | 244 |
86
+ | 65 | Test State Coverage, Not Code Coverage | 245 |
87
+ | 66 | Find Bugs Once | 247 |
88
+ | 67 | English Is Just a Programming Language | 248 |
89
+ | 68 | Build Documentation In, Don't Bolt It On | 249 |
90
+ | 69 | Gently Exceed Your Users' Expectations | 255 |
91
+ | 70 | Sign Your Work | 258 |
92
+
93
+ ## Checklist locators
94
+
95
+ | Submitted checklist | Page |
96
+ |---|---:|
97
+ | The Wisdom Acrostic | 20 |
98
+ | How to Maintain Orthogonality | 34 |
99
+ | Things to Prototype | 53 |
100
+ | Architectural Questions | 55 |
101
+ | Debugging Checklist | 98 |
102
+ | Law of Demeter for Functions | 141 |
103
+ | How to Program Deliberately | 172 |
104
+ | When to Refactor | 185 |
105
+ | Cutting the Gordian Knot | 212 |
106
+
107
+ The submitted “Aspects of Testing” checklist did not include a page locator, so this index does not invent one.
108
+
109
+ The complete submitted checklist bodies and the additional post-Pragmatic tips and practices are retained in the [submitted engineering notes](submitted-engineering-notes.md).
110
+
111
+ ## Maintenance rule
112
+
113
+ When AHEAD guidance derived from these notes is reorganized or condensed, retain the page-level reference either at the point of use or through a link to this index. If a locator is corrected against the referenced print edition, record the correction in the commit rather than silently replacing the submitted value.
@@ -0,0 +1,306 @@
1
+ # Submitted Engineering Notes
2
+
3
+ Status: submitted source notes
4
+
5
+ ## Purpose and provenance
6
+
7
+ This document preserves submitted engineering tips, checklists, and practices that are intentionally condensed in the [AHEAD Engineering Practice](../engineering-practice.md) guide. It is a source record, not a claim that every item is an experimentally validated rule.
8
+
9
+ Tips 1–70 and their submitted page locators from *The Pragmatic Programmer* are retained in the [edition-specific page index](pragmatic-programmer-page-index.md). Their accompanying submitted meanings are retained below, followed by the additional tips and the full submitted checklist and practice content. The submitted language-learning list is intentionally omitted.
10
+
11
+ ## *The Pragmatic Programmer* tip notes
12
+
13
+ The page index is authoritative for the submitted locators. These concise notes preserve the submitted meaning associated with each title.
14
+
15
+ | No. | Submitted meaning |
16
+ |---:|---|
17
+ | 1 | Care about doing software development well. |
18
+ | 2 | Turn off autopilot; continually critique and appraise the work. |
19
+ | 3 | Offer viable options instead of excuses or an unsupported claim that something cannot be done. |
20
+ | 4 | Correct bad designs, wrong decisions, and poor code when they are found. |
21
+ | 5 | Catalyze change by showing people a possible future and helping them participate in creating it. |
22
+ | 6 | Keep checking the larger context rather than becoming trapped in implementation detail. |
23
+ | 7 | Involve users in deciding the quality the project actually requires. |
24
+ | 8 | Make continuous learning a regular investment. |
25
+ | 9 | Critically evaluate vendor claims, media, received wisdom, and dogma in the context of the actual project. |
26
+ | 10 | Effective communication depends on both the idea and how it is expressed. |
27
+ | 11 | Give each piece of knowledge one unambiguous, authoritative representation, while avoiding premature abstraction; use the rule of three as a judgment prompt rather than dogma. |
28
+ | 12 | Create an environment in which reuse is easy. |
29
+ | 13 | Design self-contained, independent components with a single well-defined purpose. |
30
+ | 14 | Treat decisions as revisable and plan for change. |
31
+ | 15 | Use tracer implementations to test direction and progressively find the target. |
32
+ | 16 | Treat prototypes as learning artifacts whose value lies in lessons rather than retained code. |
33
+ | 17 | Design and code using the language of the problem domain and its users. |
34
+ | 18 | Estimate before starting so potential problems become visible early. |
35
+ | 19 | Refine schedules with the experience gained during implementation. |
36
+ | 20 | Preserve knowledge in plain text so it remains portable, inspectable, testable, and debuggable. |
37
+ | 21 | Use command shells when graphical interfaces do not provide enough leverage. |
38
+ | 22 | Learn one configurable, extensible, programmable editor deeply enough that it becomes an extension of the hand. |
39
+ | 23 | Always use source control so work and decisions can be recovered and revisited. |
40
+ | 24 | Focus on fixing the problem rather than assigning blame. |
41
+ | 25 | Do not panic while debugging; stop and think about plausible causes. |
42
+ | 26 | Bugs are more often in the application than in foundational tools, but likelihood is not proof. |
43
+ | 27 | Test assumptions in the real environment with realistic data and boundary conditions. |
44
+ | 28 | Learn a text-manipulation language so repetitive text work can be automated. |
45
+ | 29 | Use code generation to improve consistency and reduce duplicated mechanics. |
46
+ | 30 | Perfect software is impossible; protect code and users from inevitable errors. |
47
+ | 31 | Use contracts to state and verify what code promises and requires. |
48
+ | 32 | Fail early when continuing would cause more damage or hide the real fault. |
49
+ | 33 | Use assertions to validate assumptions and prevent impossible states from proceeding unnoticed. |
50
+ | 34 | Reserve exceptions for exceptional conditions so control flow remains readable and maintainable. |
51
+ | 35 | Where possible, make the code that acquires a resource responsible for releasing it. |
52
+ | 36 | Minimize coupling and follow the principle of least knowledge. |
53
+ | 37 | Express technology choices as configuration rather than baking them into unrelated implementation. |
54
+ | 38 | Put general abstractions in code and variable details in metadata. |
55
+ | 39 | Analyze user workflows to find genuine opportunities for concurrency. |
56
+ | 40 | Design around independent, concurrent services behind consistent interfaces. |
57
+ | 41 | Designing for concurrency can produce cleaner interfaces with fewer timing assumptions. |
58
+ | 42 | Separate models from views where useful; this principle is broader than the MVC pattern. |
59
+ | 43 | Use blackboards to coordinate facts and agents while preserving their independence and isolation. |
60
+ | 44 | Do not rely on accidental behavior or confuse coincidence with deliberate design. |
61
+ | 45 | Estimate algorithmic order before implementation to understand likely scaling behavior. |
62
+ | 46 | Mathematical estimates are incomplete; measure behavior in the target environment. |
63
+ | 47 | Refactor early and repeatedly when the system needs it, addressing the underlying problem rather than its surface arrangement. |
64
+ | 48 | Think about testing before implementation so the design is observable and testable; this does not mandate or reject test-driven development. |
65
+ | 49 | Test aggressively rather than relying on users to discover defects. |
66
+ | 50 | Do not incorporate generated or wizard-produced code that the engineer does not understand. |
67
+ | 51 | Discover requirements beneath assumptions, misconceptions, and organizational pressures rather than merely collecting surface statements. |
68
+ | 52 | Work with users to understand how the system will actually be used. |
69
+ | 53 | Invest in stable abstractions rather than transient implementation details. |
70
+ | 54 | Maintain one authoritative glossary for project-specific vocabulary. |
71
+ | 55 | When a problem appears impossible, identify the real constraints and question whether the assumed method or task is necessary. |
72
+ | 56 | Respect accumulated experience and unresolved doubts when deciding whether the work is ready to begin. |
73
+ | 57 | Avoid an endless specification spiral; some understanding emerges only by doing the work. |
74
+ | 58 | Evaluate formal methods in the context of the team's practices and capabilities rather than following them blindly. |
75
+ | 59 | Expensive tools and vendor prestige do not guarantee better designs; judge tools on their merits. |
76
+ | 60 | Organize teams around delivered functionality instead of isolating design, coding, testing, and data work. |
77
+ | 61 | Replace repeatable manual procedures with inspectable automation that executes consistently. |
78
+ | 62 | Run automated tests early and frequently, preferably with every build. |
79
+ | 63 | Coding is not complete until all required tests run. |
80
+ | 64 | Deliberately introduce defects in an isolated copy to verify that tests can detect them. |
81
+ | 65 | Test significant program states, not only executed lines. |
82
+ | 66 | Preserve a reliable automated regression check after a human discovers a defect. |
83
+ | 67 | Treat documentation like code by applying authoritative sources, metadata, separation of model and view, and generation where useful. |
84
+ | 68 | Keep documentation close to the system so it is less likely to become incorrect or stale. |
85
+ | 69 | Understand user expectations and then exceed them gently rather than surprising users with unrequested complexity. |
86
+ | 70 | Take accountable pride in the work and be willing to sign it. |
87
+
88
+ ## Additional tips
89
+
90
+ ### 71. Create simple solutions, not easy ones
91
+
92
+ Take time to find the simplest solution. The easy solution may use a familiar tool or pattern, but familiarity can conceal complexity and deprive the engineer of learning.
93
+
94
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
95
+
96
+ ### 72. KISS — Keep It Simple, Stupid
97
+
98
+ Simplicity is the ultimate sophistication. Simpler solutions are generally easier to understand, maintain, and extend.
99
+
100
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
101
+
102
+ ### 73. The Locality of Behavior principle
103
+
104
+ The behavior of a unit of code should be as obvious as possible from that unit. Separation of concerns may favor splitting behavior into separate pieces, while locality of behavior may favor keeping the tasks for a feature or component together. Some designs can satisfy both; others require an explicit tradeoff.
105
+
106
+ No external source locator was included with this submitted note.
107
+
108
+ ### 74. Judge tools by the artifacts they produce
109
+
110
+ Do not choose a language, library, framework, or pattern only because it is pleasant or familiar to use. Judge it by the long-lived software it helps create: reliability, changeability, debuggability, and the incidental complexity it leaves behind.
111
+
112
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
113
+
114
+ ### 75. Avoid complecting independent concerns
115
+
116
+ Complexity comes from braiding together things that could be reasoned about independently. Watch for value tied to time, function tied to state, policy tied to mechanism, meaning tied to order, and implementation details leaking across boundaries.
117
+
118
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
119
+
120
+ ### 76. Isolate state
121
+
122
+ State ties value to time. Keep mutable state explicit, minimal, and behind interfaces that let the rest of the system work with stable values when possible.
123
+
124
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
125
+
126
+ ### 77. Prefer values, data, and functions
127
+
128
+ Prefer immutable values, plain data, functions, queues, set operations, declarative queries, and explicit rules where they fit. These can create simpler artifacts than objects, mutable variables, inheritance, loops, object-relational mapping, and scattered conditionals.
129
+
130
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
131
+
132
+ ### 78. Modular does not automatically mean simple
133
+
134
+ Separate files, classes, modules, or services can still be deeply entangled. The real test is whether each part needs to know only stable abstractions rather than the hidden details or assumptions of other parts.
135
+
136
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
137
+
138
+ ### 79. Tests are guardrails, not steering
139
+
140
+ Tests and type checkers help catch mistakes, but they do not replace design clarity or reasoning. A production defect already passed the checks that existed, so the program must remain simple enough to understand.
141
+
142
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
143
+
144
+ ## Submitted checklists
145
+
146
+ ### The Wisdom Acrostic
147
+
148
+ - **W**hat do you want them to learn?
149
+ - What is their **I**nterest in what you have to say?
150
+ - How **S**ophisticated are they?
151
+ - How much **D**etail do they want?
152
+ - Whom do you want to **O**wn the information?
153
+ - How can you **M**otivate them to listen?
154
+
155
+ Submitted locator: *The Pragmatic Programmer*, p. 20.
156
+
157
+ ### How to maintain orthogonality
158
+
159
+ - Design independent, well-defined components.
160
+ - Keep code decoupled.
161
+ - Avoid global data.
162
+ - Refactor similar functions.
163
+
164
+ Submitted locator: *The Pragmatic Programmer*, p. 34.
165
+
166
+ ### Things to prototype
167
+
168
+ - Architecture.
169
+ - New functionality in an existing system.
170
+ - The structure or contents of external data.
171
+ - Third-party tools or components.
172
+ - Performance issues.
173
+ - User-interface design.
174
+
175
+ The submitted note emphasizes that prototype code is intended to be thrown away and may be fully vibe coded under the AHEAD disposable-prototype policy.
176
+
177
+ Submitted locator: *The Pragmatic Programmer*, p. 53.
178
+
179
+ ### Architectural questions
180
+
181
+ - Are responsibilities well defined?
182
+ - Are collaborations well defined?
183
+ - Is coupling minimized?
184
+ - Can potential duplication be identified?
185
+ - Are interface definitions and constraints acceptable?
186
+ - Can modules access the data they need when they need it?
187
+
188
+ Submitted locator: *The Pragmatic Programmer*, p. 55.
189
+
190
+ ### Simplicity and complecting review
191
+
192
+ - Is this design simple, or only easy because it is familiar?
193
+ - What concepts are tied together that could vary independently?
194
+ - What incidental complexity are we accepting from the selected tools, libraries, frameworks, or patterns?
195
+ - Can this part be understood without loading the rest of the system into your head?
196
+ - Is state explicit, minimized, and isolated?
197
+ - Are policies and rules gathered somewhere clear, or scattered through unrelated code paths?
198
+ - Are we choosing this approach for authoring convenience or for the quality of the artifact it creates?
199
+ - Do tests support our reasoning, or are we depending on them to compensate for unclear design?
200
+
201
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
202
+
203
+ ### Abstraction questions
204
+
205
+ - What is the operation or capability?
206
+ - Who owns the data or entity?
207
+ - How is the implementation separated from the interface?
208
+ - When does this happen, and is timing unnecessarily coupled to the caller?
209
+ - Where does this run, and is location unnecessarily coupled to the caller?
210
+ - Why does this rule or policy exist, and can it be represented declaratively?
211
+
212
+ Source: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.
213
+
214
+ ### Debugging checklist
215
+
216
+ - Is the reported problem a direct result of the underlying defect, or merely a symptom?
217
+ - Is the defect really in the compiler, operating system, or another platform component—or is it in the application? Treat likelihood as a starting point and prove the conclusion.
218
+ - If you explained the problem in detail to a coworker, what would you say? Rubber-duck debugging can help make the model explicit.
219
+ - If the suspect code passes its unit tests, are the tests complete enough? What happens with different data?
220
+ - Do the conditions that caused this defect exist elsewhere in the system?
221
+
222
+ Submitted locator: *The Pragmatic Programmer*, p. 98. The submitted note also references [Rubber Duck Debugging](https://rubberduckdebugging.com/).
223
+
224
+ ### Law of Demeter for functions
225
+
226
+ An object's method should call only methods belonging to:
227
+
228
+ - itself;
229
+ - parameters passed to it;
230
+ - objects it creates;
231
+ - its component objects.
232
+
233
+ Submitted locator: *The Pragmatic Programmer*, p. 141.
234
+
235
+ ### How to program deliberately
236
+
237
+ - Stay aware of what you are doing.
238
+ - Do not code blindfolded.
239
+ - Proceed from a plan.
240
+ - Rely only on reliable things.
241
+ - Document assumptions.
242
+ - Test assumptions as well as code.
243
+ - Prioritize effort.
244
+ - Do not be a slave to history.
245
+
246
+ Submitted locator: *The Pragmatic Programmer*, p. 172.
247
+
248
+ ### When to refactor
249
+
250
+ - A violation of the DRY principle is discovered.
251
+ - Things could be made more orthogonal.
252
+ - Knowledge improves.
253
+ - Requirements evolve.
254
+ - Performance needs improvement.
255
+
256
+ Submitted locator: *The Pragmatic Programmer*, p. 185.
257
+
258
+ ### Cutting the Gordian knot
259
+
260
+ When a problem appears impossible, ask:
261
+
262
+ - Is there an easier way?
263
+ - Am I solving the right problem?
264
+ - Why is this a problem?
265
+ - What makes it hard?
266
+ - Must it be done this way?
267
+ - Must it be done at all?
268
+
269
+ Submitted locator: *The Pragmatic Programmer*, p. 212.
270
+
271
+ ### Aspects of testing
272
+
273
+ - Unit testing.
274
+ - Integration testing.
275
+ - Validation and verification.
276
+ - Resource exhaustion, errors, and recovery.
277
+ - Performance testing.
278
+ - Usability testing.
279
+ - Testing the tests themselves.
280
+
281
+ No page locator was included with this submitted checklist.
282
+
283
+ ## Submitted practices
284
+
285
+ ### Simplicity pass before implementation
286
+
287
+ - Before building a long-lived feature, separate concerns that do not need to be tied together.
288
+ - Prefer more small, straight, independent pieces over fewer pieces tied into a knot.
289
+ - Name the parts representing problem complexity and those representing incidental complexity.
290
+
291
+ ### Complexity ledger
292
+
293
+ - For meaningful design decisions, record the benefit, byproducts, what the choice ties together, and why the tradeoff is acceptable.
294
+ - Revisit the ledger when the system becomes difficult to change or debug.
295
+
296
+ ### Quarantine state
297
+
298
+ - Make mutable state rare, named, easy to find, and surrounded by a simpler interface.
299
+ - Do not pass mutable references through the system when a stable value will do.
300
+
301
+ ### Disentangle during refactoring
302
+
303
+ - Trace what is tied together, identify the separate concerns, and separate one concern at a time.
304
+ - Refactoring should reduce what a reader must hold in mind rather than merely moving code into different files.
305
+
306
+ Source for these submitted practices: Rich Hickey, [*Simple Made Easy*](https://www.youtube.com/watch?v=SxdOUGdseq4), Strange Loop 2011.