<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Development on joesturge / dev</title><link>https://dev.joesturge.com/tags/development/</link><description>Recent content in Development on joesturge / dev</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Sun, 25 Oct 2026 12:41:00 +0000</lastBuildDate><atom:link href="https://dev.joesturge.com/tags/development/index.xml" rel="self" type="application/rss+xml"/><item><title>The Context Flywheel: A Pragmatic Approach to Context Engineering</title><link>https://dev.joesturge.com/p/the-context-flywheel-a-pragmatic-approach-to-context-engineering/</link><pubDate>Sun, 25 Oct 2026 12:41:00 +0000</pubDate><guid>https://dev.joesturge.com/p/the-context-flywheel-a-pragmatic-approach-to-context-engineering/</guid><description>&lt;img src="https://dev.joesturge.com/p/the-context-flywheel-a-pragmatic-approach-to-context-engineering/flywheel.jpg" alt="Featured image of post The Context Flywheel: A Pragmatic Approach to Context Engineering" /&gt;&lt;p&gt;When using GitHub Copilot on a large codebase, context can get messy.&lt;/p&gt;
&lt;p&gt;Without repository guidance, Copilot can miss the patterns and conventions that aren&amp;rsquo;t obvious from the code. On the other hand, writing loads of instructions up front, or putting everything in &lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;, adds context and can leave you with stale docs.&lt;/p&gt;
&lt;p&gt;I use a simple, bottom-up workflow I call &lt;strong&gt;The Context Flywheel&lt;/strong&gt;. When I come across something about the repo that seems worth keeping, I ask Copilot to help work out what to capture and where it should go.&lt;/p&gt;
&lt;p&gt;The loop is straightforward: development friction reveals something useful, that knowledge gets captured in the right place, and future work can use it instead of rediscovering it. Over time, that should mean fewer repeated corrections and less friction.&lt;/p&gt;
&lt;h2 id="the-rule-of-three"&gt;The Rule of Three
&lt;/h2&gt;&lt;p&gt;I don&amp;rsquo;t write rules for problems I haven&amp;rsquo;t hit yet. If I find a strange edge case or a repo-specific pattern, I fix the immediate issue and get on with the work.&lt;/p&gt;
&lt;p&gt;If I keep correcting Copilot, or run into the same pattern a few times, that might be a sign it&amp;rsquo;s worth writing down. The Rule of Three is my own rule of thumb, not a threshold the skill enforces. Some things are worth documenting the first time; other things don&amp;rsquo;t need a permanent rule at all.&lt;/p&gt;
&lt;h2 id="how-the-skill-works"&gt;How the skill works
&lt;/h2&gt;&lt;p&gt;I built The Context Flywheel as a GitHub Copilot skill. I use it when wrapping up a task or when I find something about the repo that seems worth keeping. It looks at the conversation, the changes, and the existing docs.&lt;/p&gt;
&lt;p&gt;It then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Filters the noise:&lt;/strong&gt; It looks for repo-specific constraints, recurring edge cases, and patterns. Not generic advice or one-off fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Checks the docs:&lt;/strong&gt; It checks for docs that are out of date or missing something useful. If the fix is clear and low-risk, it updates them. If not, it explains the gap and suggests what to change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Picks a home:&lt;/strong&gt; It puts the guidance where it makes sense: path-specific instructions, global Copilot instructions, a skill, a prompt, an agent, or the project&amp;rsquo;s own docs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The skill lives in the plugin at &lt;code&gt;skills/context-flywheel/SKILL.md&lt;/code&gt;. Copilot instructions might go under &lt;code&gt;.github/&lt;/code&gt;; docs for people should go wherever the project keeps its documentation.&lt;/p&gt;
&lt;h2 id="i-stay-in-control"&gt;I stay in control
&lt;/h2&gt;&lt;p&gt;If the change is clear and low-risk, the skill can make a focused edit in my working tree and tell me what it changed and why. If the right change or destination isn&amp;rsquo;t clear, it suggests an edit instead.&lt;/p&gt;
&lt;p&gt;I review the diff and decide whether the guidance is correct and useful. I can keep it, change it, or drop it, and choose whether to commit it with the work. There&amp;rsquo;s no separate approval step: an AI-made edit is still just a working-tree change, not something added to the shared repo automatically.&lt;/p&gt;
&lt;h2 id="why-this-works"&gt;Why this works
&lt;/h2&gt;&lt;p&gt;I don&amp;rsquo;t need to document the whole repo up front. I can capture useful details while the work is still fresh, as real tasks reveal what is worth keeping, without dumping every bit of repo knowledge into global instructions. I still need to review and maintain the guidance as the repo changes, but that is a smaller job than trying to write and keep comprehensive instructions up to date.&lt;/p&gt;
&lt;p&gt;It also feels like a good way to hedge our bets with AI tools. The knowledge it captures is plain, readable Markdown, placed in the repo&amp;rsquo;s relevant guidance or documentation. If the tools change, break, or I stop using them, that effort still leaves useful documentation for the next human engineer.&lt;/p&gt;
&lt;p&gt;The Context Flywheel helps identify and draft candidate knowledge, and can keep relevant docs in sync. It can&amp;rsquo;t reliably decide what deserves to become permanent guidance; I still use my judgement about what to keep.&lt;/p&gt;
&lt;h2 id="how-this-fits-agile-and-aidlc"&gt;How this fits Agile and AIDLC
&lt;/h2&gt;&lt;p&gt;For me, this is Agile for context. No Big Design Up Front or massive instruction files; just small feedback loops that capture useful knowledge while the work is still fresh.&lt;/p&gt;
&lt;p&gt;Much of the AIDLC and CDLC discussion I&amp;rsquo;ve come across emphasises top-down governance. This adds a complementary bottom-up step: notice friction at the developer&amp;rsquo;s desk, capture what happened, and commit the useful bits to Git.&lt;/p&gt;
&lt;h2 id="try-it-out"&gt;Try it out
&lt;/h2&gt;&lt;p&gt;If you want to give it a go, the plugin is here: &lt;a class="link" href="https://github.com/joesturge/context-flywheel" target="_blank" rel="noopener"
&gt;joesturge/context-flywheel&lt;/a&gt;. Add the marketplace and install it with the GitHub CLI:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gh copilot -- plugin marketplace add joesturge/context-flywheel
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gh copilot -- plugin install context-flywheel@context-flywheel-marketplace
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;(The example uses GitHub Copilot. The same incremental workflow can be adapted for other tools, but their guidance files and loading conventions differ; adapt the instructions to the tool rather than assuming Copilot&amp;rsquo;s skill format transfers directly.)&lt;/p&gt;
&lt;p&gt;Or copy the file below into your Git repo under &lt;code&gt;.github/skills/context-flywheel/SKILL.md&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;context-flywheel&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Use when finishing a task or noticing repository friction, to assess and capture durable knowledge in the right project documentation or AI guidance.&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gh"&gt;# The Context Flywheel
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Help maintain useful repository context incrementally as development reveals it. Do not pursue exhaustive upfront documentation or turn every observation into a permanent rule.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gu"&gt;## Assess and verify
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Consider retaining insights that are durable, non-obvious, repository-specific, and useful to future work. Recurrence is a useful signal, not a threshold; ignore generic advice, transient details, and one-off mistakes.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Check relevant code, tests, configuration, and guidance where practical. Distinguish verified facts from uncertainty; resolve stale or conflicting guidance when evidence is clear, otherwise report the conflict.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gu"&gt;## Choose a destination and format
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Choose based on audience, timing, scope, existing sources of truth, and target-tool support:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Use project documentation for human contributors; use AI guidance when an agent needs the information during relevant work.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Scope guidance to matching files when possible; use global instructions only for rules that apply across the repository. Use on-demand resources when their discovery and loading fit better.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Prefer the narrowest supported destination. Update or link to an existing source of truth only if the intended audience or agent can reliably discover and access it when needed; otherwise, capture the minimum necessary information in an appropriate, supported location.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Optimize useful guidance per token: keep automatically loaded instructions lean and place additional detail in on-demand resources when supported.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Validate the actual target tool&amp;#39;s format, schema, scope syntax, and discovery behavior before relying on them. Support varies by tool, host, and version; do not assume a field such as &lt;span class="sb"&gt;`applyTo`&lt;/span&gt; has one universal type or syntax.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gu"&gt;## Make and report changes
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;When the evidence and destination are clear and the change is low risk, edit the relevant workspace file directly without asking permission for routine edits. For consequential ambiguity, explain the options and ask or propose before editing.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Preserve unrelated working-tree changes. Edits are proposals for developer review: do not stage, commit, or push. Inspect the diff and perform proportionate validation. Report what changed, where it was placed, and what was actually inspected or verified; do not imply format validation or tool loading was tested unless it was. If no worthwhile improvement is justified, leave files unchanged and say so.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item></channel></rss>