powershell / ai / open-source
Components Without Borders
What if an AI could inspect an existing codebase, pull out the behavior you need, and reshape it for your workflow?

As we head into 2027, I keep coming back to a question: What if you could point AI at a codebase and ask it to make a useful piece of that project fit the way you work?
The source might be an open-source repository on GitHub, a project on GitLab, or code your own company has already written. You could say, “This project handles A, B, C, and D. I want the part that does B, adapted to this other workflow.” The AI can inspect how the feature works, including the implementation and its tests, then help you reshape it.
I’ve been thinking of this as an AI chop shop, or maybe an AI 3D printer. The existing project gives you working material. You describe the part you want and where it needs to fit. You try it, adjust it, and print another version.
I wanted to make that idea concrete, so I started with Pester, the PowerShell testing framework.
Start with the itch
Pester has a useful assertion vocabulary. You can compare values with Should-Be, check collections with Should-Contain, and compare structured data with Should-BeEquivalent. These assertions usually live inside Describe and It blocks and run as part of a Pester test suite.
That structure works well for durable tests. While I’m developing, though, I sometimes want something smaller. I run a command, inspect the object it returns, and want to check a few expectations right from the PowerShell prompt. I don’t always want to stop and set up a test file just to get that feedback.
The first experiment was simply:
1 + 2 | Should -Be 3
Pester can already run that assertion in a session. A passing assertion returns no value, though, so the pipeline stops there. I wanted the check to happen and the value to keep flowing:
1 + 2 | Should -Be 3
# The checked value, 3, continues down the pipeline.
In the prototype, a successful standalone Should passes its input through. Inside a normal Pester test run, it keeps its existing behavior. That lets me use a familiar assertion while I’m exploring a value at the prompt.
A few checks, without a full suite
One check is useful, but often I want to verify a handful of properties on the same result. I added a lightweight Invoke-Checks command that can run an array of script blocks:
$customer = [pscustomobject]@{
Id = 'C-1042'
Name = 'Ada Lovelace'
Plan = 'Pro'
}
$checks = @(
{ $customer | Should-BeEquivalent ([pscustomobject]@{ Id = 'C-1042'; Name = 'Ada Lovelace'; Plan = 'Pro' }) }
{ $customer.Name | Should-Be 'Ada Lovelace' }
{ $customer.Plan | Should-Be 'Pro' }
)
Invoke-Checks $checks
Each assertion gets a pass or fail message. A failed check doesn’t stop the remaining checks from running. The checks still use Pester’s assertion operators and failure messages.
Put the checks beside the work
I also wanted to try the checks from a small script file. The example simulates a customer lookup against a REST endpoint. It accepts a search term and emits a customer object with an ID, name, email, plan, active status, and recent orders.
The checks file contains one assertion per line and reads the incoming object as $target:
$target.Id | Should-Be 'C-1042'
$target.Name | Should-Be 'Ada Lovelace'
$target.Email | Should-Be 'ada.lovelace@example.test'
$target.Plan | Should-Be 'Pro'
$target.IsActive | Should-BeTrue
$target.Orders.Count | Should-Be 2
$target.Orders[1].Total | Should-Be 125
$target.Orders | Should-BeEquivalent @([pscustomobject]@{ Id = 'O-8801'; Total = 49 }, [pscustomobject]@{ Id = 'O-8830'; Total = 125 })
Then I can pipe the lookup result directly into the checks:
.\examples\Invoke-Checks\Find-Customer.ps1 -Search ada |
Invoke-Checks -Path .\examples\Invoke-Checks\customer-checks.ps1
Invoke-Checks makes each incoming customer available as $target, reports each assertion with its file and line, and continues after failures. The file-based version currently expects one complete assertion per nonblank line. That’s enough for a small, readable development aid.
Explore the code
The prototype is on the showcase branch of my Pester fork. The customer lookup, assertion checks, and example README show the demo. The implementation lives in Invoke-Checks and the standalone pipeline behavior is in Should.
Keep the part connected while you explore
I considered extracting Pester’s assertions into a separate, tiny library. Instead, I started by keeping the experiment in Pester. That gave me the existing assertion operators, the implementation behind them, and the messages users already recognize. It let me explore the new workflow without first rebuilding assertion behavior from scratch.
That choice is part of the method. Start with a working project and a specific itch. Find the behavior that matters. Adapt its boundary to the task at hand. Then decide whether the useful result should remain an extension of the original project, become a separate tool, or graduate into a more formal component.
The source project doesn’t have to contain a ready-made component with exactly the right shape. The useful part may sit inside a larger library or cross boundaries between several parts of a codebase. AI can help inspect how those parts work and reshape the slice you need.
That’s what I mean by Components Without Borders. We can treat our libraries, old projects, and internal tools as material for the next idea. AI makes it practical to ask for a specialized piece that would have been too small or too specific to package in advance.