2026-05-31

Compilers, Context, and Control: Shifting Paradigms in C#, VS Code, and AI Personalization

It has been one of those weeks where the tech landscape feels like it’s violently snapping into a new shape. Between structural overhauls in our languages and major upgrades to our IDE workflows, the industry is forcing us to think deeply about how we manage two fundamental things: memory boundaries and execution context.

If you've been tracking the commits and release notes over the last few days, you know exactly what I mean. Let's unpack the big shifts in C# and VS Code, and dive into an architectural problem I’ve been trying to solve in my own repo.


1. C# 16 and the "Rustification" of Unsafe Boundaries

A few days ago, Richard Lander dropped a massive bombshell on the .NET Blog concerning the future of memory safety in C#. Microsoft is fundamentally redesigning C#’s unsafe code model for C# 16 (slated for previews in .NET 11). The core philosophy? Move away from implicit conventions and adopt an explicit, contract-driven model that closely mirrors Rust's isolation patterns.

For those of us working deep in enterprise microservices or high-throughput serialization pipelines, unsafe blocks have always been a double-edged sword. The new model aims to make unsafe patterns strict, viral (meaning unsafe properties propagate clearly through the call stack), and highly auditable by the compiler.

Instead of just wrapping a block in unsafe { ... }, the compiler will force us to explicitly scope caller obligations and safety assumptions. Think of it less like an "escape hatch" and more like an isolation boundary.

Here is a conceptual look at how this shift toward rigorous, contract-enforced safe/unsafe boundaries changes the way we reason about system code:

C#
// Current paradigm: Unsafe is an unchecked escape hatch
public unsafe void LegacyProcessData(byte* rawBuffer, int length)
{
    // Implicit trust that length matches allocated memory
    byte target = rawBuffer[length - 1]; 
}

// Upcoming C# 16 Concept: Contract-driven, auditable safety boundaries
public unsafe void ModernProcessData(byte* rawBuffer, int length)
    where unsafe // Explicit propagation of the unsafe capability
{
    // Compiler-enforced boundary validation and caller obligation tracking
    #pragma safety_contract(buffer_size >= length)
    {
        byte target = rawBuffer[length - 1];
    }
}

This isn't just academic pedantry. In a world where cloud computation costs and AI-driven scale demand maximum optimization without security compromises, tightening these boundaries is a required evolution.


2. VS Code 1.122: Air-Gapped BYOK and Agentic Workspaces

On the tooling front, the Visual Studio Code 1.122 release just hit the wire, and it represents a massive leap forward for how we interact with LLMs locally. Two features in this release are absolute game-changers for enterprise engineers:

1. Air-Gapped BYOK (Bring Your Own Key): You can now hook up your own language models and switch providers completely detached from external network requirements.
2. The Agents Window Preview: A dedicated companion window optimized for iterating, reviewing, and tracking autonomous agent sessions across multiple workspaces. By toggling sessions.chat.localAgent.enabled in the Insiders build, you can use a local harness to let an agent inspect, modify, and build files natively.

This shifts the IDE from a passive text editor with code completion to an active, autonomous engineering partner. But it also introduces a massive friction point. If we are running autonomous local agents across different codebases, how do we keep them aligned to how we work without polluting our system prompts with endless, repetitive text configurations?


3. The I-AM Experiment: Making AI Feel More Personal

This exact dilemma is why I’ve spent my late nights hacking away on a side project: The I-AM Experiment.

I-AM is an experiment in building a portable personality context format for AI. The core idea is simple: instead of re-explaining your technical preferences, experience level, tone requirements, and constraints in every single chat or tool configuration, you share one compact, serialized I-AM string. This string carries structured signals about how you think, communicate, and want responses delivered.

The format is strictly segment-based. It starts with a version header like IAM/0.7 and appends optional metadata and behavioral modules.

For instance, consider a communication segment structured like this:

TEXT
/COMM:DRV75ANC80EXP80AMB55

This cleanly encodes a precise, normalized balance of Driver (DRV), Analytical (ANC), Expressive (EXP), and Amiable (AMB) tendencies.

Similarly, a delivery segment can fine-tune the exact structural composition of the model's output:

TEXT
/DELIVERY:DEF13PEER75CHL92DNS75AUD0STR50ABS88FMT50VBS25EMP50CND100HMR75AUT75BUR25

Here, we explicitly score dimensions like deference (DEF), peer-to-peer positioning (PEER), socratic challenge level (CHL), data density (DNS), abstraction depth (ABS), verbosity limits (VBS), and absolute candor (CND).

Finally, a runtime state segment adds immediate session-specific context:

TEXT
/STATE:bandwidth50,mode:convergent,horizon:long,stakes:casual

What makes this project interesting to me—and why I wanted to share it—is that it treats personalization as a structured system, not just vague, conversational prompting. Personality and preference responses are scored, normalized, and serialized into reusable context that can travel seamlessly across tools, IDE extensions, and sessions.

Putting it into Code: The Parser Implementation

Instead of passing a massive paragraph of text to an LLM, a local tool or gateway can parse this string and translate it directly into precise system behaviors. Here is a lightweight example of how we can parse this structure in Python to evaluate and dynamically inject runtime state metrics into an agent's orchestration framework:

PYTHON
import re

class IAmContext:
    def __init__(self, iam_string: str):
        self.raw_string = iam_string
        self.segments = {}
        self._parse()

    def _parse(self):
        # Extract segments using slash-delimiters
        matches = re.findall(r'/([A-Z]+):([^/]+)', self.raw_string)
        for segment_type, data in matches:
            if ',' in data: # Key-value style state segments
                self.segments[segment_type] = dict(item.split(':') for item in data.split(','))
            else: # Fixed-width metric blocks
                metrics = re.findall(r'([A-Z]{3})(\d+)', data)
                self.segments[segment_type] = {k: int(v) for k, v in metrics}

    def get_delivery_guardrails(self) -> str:
        delivery = self.segments.get('DELIVERY', {})
        candor = delivery.get('CND', 50)
        density = delivery.get('DNS', 50)
        verbosity = delivery.get('VBS', 50)
        
        return (
            f"Provide responses with a candor level of {candor}/100. "
            f"Maintain a data density of {density}/100 and a verbosity level of {verbosity}/100. "
            f"Do not include unnecessary conversational filler."
        )

# Example execution using a real context string
raw_ctx = "IAM/0.7/DELIVERY:DEF13PEER75CHL92DNS75VBS25CND100/STATE:bandwidth50,mode:convergent"
ctx = IAmContext(raw_ctx)
print(ctx.get_delivery_guardrails())

The System Prompt Translation

When translated into an LLM system prompt, the model consumes the tokenized parameters to build a highly optimized meta-cognitive guardrail. Instead of a messy paragraph, the system instruction block leverages the parsed values to enforce execution boundaries:

TEXT
SYSTEM PROMPT INTERFACE CONFIGURATION
[CONTEXT_TUNING_ACTIVE]
- Engineering Persona Profile Baseline Evaluated.
- Target Interaction Protocol: Peer-to-Peer (Score: 75/100)
- Structural Evaluation Depth: High Abstraction (Score: 88/100)
- Communication Style: Analytical/Driver dominant.
- Runtime Mode: Convergent execution over a long operational horizon.

INSTRUCTION: Bypass elementary concepts, introductory pleasantries, and basic summaries. Deliver high-density code examples directly. Highlight technical tradeoffs with absolute candor (CND:100). Keep explanations lean, focusing purely on structural rigor and underlying architecture.

4. Expanding the Execution Context: Cross-Domain Routing

While I initially engineered I-AM for terminal tools and IDEs, the true leverage of a portable context string is domain-agnostic. The exact same string boundaries cross seamlessly into non-work tasks.

By passing the parsed profile into a generalized reasoning model, output constraints shift fluidly. A highly analytical, structure-driven profile will automatically force an LLM to map out financial planning with clear constraints, reframe medical preparation into optimized diagnostic bullet lists, and strip the subjective noise out of travel itineraries or music discovery.

The utility extends to peer-to-peer interoperability as well. You can share your tokenized string directly with cross-functional partners to calibrate communication, or use it to instantly bootstrap new agentic tools without tedious onboarding prompt-tuning.

Rather than expanding on the endless permutations here, I’ve mapped out a matrix of these cross-domain use cases—spanning science, education, lifestyle, and team collaboration. You can review the full implementation concepts in the docs:

Read the I-AM Use Cases Documentation


5. The Risk Landscape: Privacy, Bias, and Guardrails

As with any paradigm shift in context tracking, we have to look closely at the vulnerabilities. Personality and preference serialization tools must never be converted into gatekeeping frameworks. Using an I-AM string as a baseline or shortcut tool for high-stakes decisions—such as hiring, formal promotions, medical diagnostics, or legal validation—is an explicit misuse of the concept.

Furthermore, stale profiles can degrade system accuracy. If a user's operational bandwidth, expertise track, or communication preferences shift over time, using an outdated, highly deterministic string will inevitably generate misaligned, low-value outputs.

Then there is the data security layer. Sharing a raw text string containing your structural habits introduces distinct privacy considerations. We need to be highly intentional about where these strings are tracked and who holds the decryption keys.

Looking forward, the roadmap for the project includes exploring cutting-edge Privacy-Enhancing Technologies (PETs) to build a highly secure, decentralized context layer. While these are currently community discussion topics rather than built-in features, the long-term research directions are critical:

Future Cryptographic Directions Under Discussion:

  • Fully Homomorphic Encryption (FHE): Allowing an LLM or proxy gateway to evaluate and adapt to token metrics while the underlying preference boundaries remain completely encrypted in memory.
  • Selective Disclosure Mechanisms: Giving users granular, cryptographic control over exactly which segments (e.g., passing /COMM but completely blocking /STATE or /CAR) are revealed during an API transaction.
  • Key-Scoped Token Sharing: Restricting token interpretation scope, allowing external actors or collaborative systems to parse only the parameters explicit to their runtime permission layer.
It is still highly experimental, but the goal remains clear: compact context, clearer adaptation, and a practical path toward AI that better understands exactly how you want to work—without making you repeat yourself.

If you want to explore the format spec, view the scoring formulas, or contribute to the parser, check out the main repository here: https://github.com/jeremypetter502/I-Am. Let's keep building cleaner boundaries.

2026-04-22

Specs, Agents, and the Ghost in the Microservice: Reflections on the Week

It’s been a high-bandwidth week, even by 2026 standards. Between the latest drops in reasoning models and the ongoing evolution of the .NET ecosystem, the line between "Architect" and "Context Engineer" is officially gone. I’ve spent the last few days leaning hard into the idea that Markdown is the only source of truth that matters anymore.

If we learned anything from the early 2000s—back when I was wrestling with custom ORMs and bare-metal JavaScript—it’s that brittle code dies, but well-defined intent survives.

The Rise of "Executable Intent"

The big talk this week in the dev community is the move toward Agentic Specification-Driven Development (ASDD). We’re moving past just asking AI to "write a function" and toward providing a holistic markdown spec that an agent can reason through to build an entire microservice.

I’ve been refining a workflow where my Markdown specs aren't just documentation—they are the prompt. Here is a snippet of a spec.

Spec Snippet: Estimation Agent

Objective: Analyze incoming project emails and cross-reference with historical SQL data to generate a draft quote.
Constraints:
* Must use the poco pattern for data persistence.
* Logic must reside in a .NET 10 Worker Service.
* Output must be formatted for the legacy style reporting schema.

By treating the context window as a finite architectural resource, I’m finding that 2026-era models like Gemini 3 Flash handle these complex, multi-step reasoning tasks with zero hallucinations if the "Context Engineering" is tight.

The Prompt: Bridging the Gap

I’ve been using this prompt pattern to turn that spec into a scaffold:
TEXT
Act as a Senior C# Architect. I am providing a Markdown Specification for a 'Social Media Synthesis' agent. 
Review the [Project_Schema] and the [Domain_Logic] sections. 
Generate a .NET 10 BackgroundService that implements the following interface, 
ensuring that all SQS message headers are preserved for downstream analytics.

[Insert Markdown Spec Here]

C# 15: The Evolution of Static Power

On the .NET front, the new Interceptors feature in C# 15 (yes, we are really here) is changing how I think about the data pipelines I built back at QSR. Back then, we were doing high-throughput kitchen events with complex DTO mapping.

Now, with the refined Source Generators and Interceptors, we can "hook" into calls at compile time to inject telemetry or security checks without the overhead of Reflection. They are brittle for human use and designed primarily for Source Generators.

Check out this pattern for a secure banking microservice:

C#
// 2026 Pattern: Intercepting for Compliance
[InterceptsLocation("TransactionService.cs", line: 42, character: 15)]
public static void AuditTransactionInterceptor(this TransactionService service, Transaction tx)
{
    // Automatic compliance logging without modifying the original service logic
    if (tx.Amount > 10000) 
    {
        ComplianceEngine.Flag(tx, Reason.HighValueAnomaly);
    }
    
    service.Process(tx);
}

A Retro Perspective on Modern Agents

I was digging through some old documents this week and found a CRM I built for Maker’s Mark back in 2003. It was all custom SQL generation and heavy client-side JS logic. It’s funny; we spent a decade trying to abstract the "messiness" of human intent into rigid forms.

Now, with Agentic AI, we’re doing the exact opposite. We’re building systems that can handle the messiness. My current project for a private client uses an AI pipeline to turn raw project logs into polished blog content. We’ve gone from "Save to Database" to "Synthesize and Publish."

Final Thoughts for the Week

The goal hasn’t changed: build systems that matter. Whether it’s a mental wellness survey or a high-throughput data lake, the tools are just getting better at understanding what we actually want.

If you’re still writing every line of your boilerplate by hand, you’re not an architect; you’re a bricklayer. It’s time to pick up the markdown and start engineering the context.

Stay curious,
Jeremy

2026-04-01

From Chat to Contracts: Why I'm Moving Beyond the Prompt

It’s been a high-bandwidth week in the lab. If there is one thing the latest releases from the "Big Three" model providers have confirmed, it’s that we are officially exiting the era of "Chatting with AI" and entering the era of Agentic Orchestration.

For those of us who grew up on the rigors of C# and MS SQL, the initial "wild west" phase of prompt engineering felt a bit... loose. But this week, seeing the industry lean harder into Specification-Driven Development (SDD) feels like a homecoming. We’re finally treating our AI interactions like the software contracts they ought to be.

1. The Death of the Mega-Prompt

We’ve all seen them: the 3,000-word system prompts that try to cover every edge case. They’re brittle. This week, I’ve been refactoring my pipeline to move away from monolithic prompts and toward Markdown-based Context Engineering.

Instead of telling the AI how to think, I’m giving it a strict specification. It’s the difference between a loose conversation and an Interface in C#.

The "Spec-First" Prompt Pattern:
Instead of: "You are a blogger for a woodshop, write about tables."
Try this structured context block:

MARKDOWN
### SPECIFICATION: Content_Generator_V2
**Role:** Specification Engineer / Technical Author
**Input_Schema:** { "project_logs": "string", "image_metadata": "array" }
**Constraints:** - Tone: Pragmatic, craftsman-focused.
- No "AI-isms" (e.g., "In the rapidly evolving landscape...").
- Output Format: GitHub Flavored Markdown.
**Logic_Hook:** If project_logs contain "walnut," prioritize "grain-matching" terminology.

2. C# and the Agentic TPL

On the backend side, I’ve been playing with the latest experimental Agentic Task Parallel Library features. We’re seeing a shift where .NET is becoming the glue for multi-agent systems. I’m currently architecting a "Context Broker" that manages state across three different LLMs to handle restaurant reservations—bringing that old PBI Bank "security-first" mindset to a non-deterministic environment.

Here is a snippet of a "Contract Validator" I’m testing to ensure an AI agent’s output matches our domain-driven design (DDD) before it ever touches the database:

C#
public async Task<ValidationResult> ValidateAgentOutput(string aiResponse)
{
    // Using a Specification pattern to ensure AI doesn't hallucinate 
    // outside our business rules.
    var spec = new ReservationIntegritySpecification();
    
    var proposal = JsonSerializer.Deserialize<ReservationProposal>(aiResponse);
    
    if (spec.IsSatisfiedBy(proposal))
    {
        return await CommitToRedshift(proposal);
    }
    
    // Trigger "Refinement Loop" if spec fails
    return await RequestAgentCorrection(aiResponse, spec.GetFailureReasons());
}

3. Retro Constraints for Modern NPUs

If you’re trying to run a 7B model on a local workstation to handle data pipelines, you realize that efficiency is the ultimate feature. I’ve been applying old-school optimization logic to my context windows. By stripping out the "fluff" and using token-dense Markdown summaries.

The Takeaway

The "hype" is settling, and the "engineering" is starting. Whether I’m at the whiteboard or deep in the IDE, the goal remains the same: building systems that matter. This week reminded me that whether it’s a global pay monitor for Mercer or an AI agent for a local woodshop, success lies in the clarity of the contract.

If you aren't writing specs for your agents yet, you're just chatting. And in 2026, chatting is for the water cooler—specs are for production.


What’s on your stack this week? Are you leaning into local execution, or are you still riding the frontier models? Let’s talk architecture.

2026-03-22

The Orchestrator's Shift: Why Your Git Repo is Now an Agent

It’s been a whirlwind week in the ecosystem. Between the London tech conferences and the quiet launch of new open standards, I’ve been reflecting on how our roles as developers are fundamentally shifting. We are moving from being the "implementers" who write every line of code to "orchestrators" who manage teams of digital entities.

If you've been following the news, the term GitAgent likely crossed your radar this week. It’s a concept that hits home for anyone who values specification-driven development and clean architectural patterns.

Beyond the Chatbot: The Rise of Git-Native Agents

One of the most significant releases this week was the open standard for GitAgent. For a long time, AI "agents" felt like black boxes locked inside specific platforms like Claude or OpenAI. If you built a complex prompt or logic in one tool, porting it was a nightmare.

GitAgent changes the game by treating your Git repository as the agent's soul. Instead of unstructured system prompts, you define your agent using:

  • SOUL.md: Defines the core identity and personality.
  • DUTIES.md: Explicitly outlines what the agent is allowed to do and—more importantly—what it is restricted from doing.
  • Memory/: A directory where the agent stores its state in human-readable Markdown files, making "knowledge" version-controlled and reversible via a simple git revert.

Lesson of the Week: "Bounded Autonomy"


A major theme from the recent London technology conference was the "Security Gap." We're seeing reports that AI-assisted code can double the rate of secret leaks compared to human-only code.

The teaching moment here is about Bounded Autonomy. We shouldn't just "vibe code" and hope for the best. By using tools like GitAgent, we can implement Segregation of Duties (SOD). For example, you can define a "Maker" agent to write the code and a "Checker" agent to review it, ensuring that no single entity has total authority over a critical process.

.NET 11 and the "Syntax Bloat" Debate

For those of us deep in the C# and .NET world, the first previews of .NET 11 have sparked some healthy debate. While Microsoft is pushing hard toward "Agentic AI" support—including native Model Context Protocol (MCP) integration—the community is more focused on the new C# 15 syntax.

The new "collection expression arguments" (using with() inside brackets) has been called "syntax bloat" by some, but it's a great example of the language evolving to handle complex data structures more concisely.

The Bottom Line for Learners

If you are learning to code today, don't just focus on the syntax of a specific language. Focus on System Architecture and Agent Coordination.

The most valuable skill in 2026 isn't just knowing how to write a loop; it's knowing how to decompose a massive problem into tasks that specialized agents can execute, and then validating that output against a rigorous specification.

Happy orchestrating!