Loading...
Loading...
Produces a single-story walkthrough of AI-authored code changes from runtime trigger to final behavior, weaving changed and unchanged code into one narrative with annotated diffs, trade-offs, alternatives, and risk analysis. Use when asked to "explain what changed", "walk me through this diff", "summarize agent edits", "show how this feature works", or "explain this implementation step by step".
npx skill4agent add cameroncooke/cameroncooke-skills agent-change-walkthroughgit status --short
git diff --name-only
git diff -- <file>
git show -- <file>git log --oneline -- <file>UNCHANGED CONTEXTCHANGEDFilename: Symbol: Why this step exists:Impact:- old behavior
+ new behaviorExample input/output# Implementation Walkthrough## Step 1## Step 2## Final Outcome# Implementation Walkthrough
This change adds source-aware feature behavior for a new UI path while preserving the existing invocation flow.
## Step 1 — User click enters the feature entrypoint [UNCHANGED CONTEXT]
The runtime trigger is still the button click. That handler forwards the input into the existing feature path, so the change does not alter how execution begins.
Filename: `src/ui/button.ts:42`
Symbol: `onClick`
```ts
button.onClick = () => startFeature(input)
```
From here, control moves into `startFeature()`.
## Step 2 — Entrypoint forwards to service [UNCHANGED CONTEXT]
The orchestration layer remains unchanged and continues to delegate work to `run()`. This is important context because it means the new behavior is introduced deeper in the service layer, not at the boundary.
Filename: `src/feature/entry.ts:10`
Symbol: `startFeature`
```ts
export function startFeature(input: Input) {
return run(input)
}
```
That keeps the original control flow intact and localizes the behavior change.
## Step 3 — Service return payload updated [CHANGED]
This is the functional change: the service now includes source metadata in its return payload so downstream consumers can render source-specific UI behavior.
Filename: `src/feature/service.ts:88`
Symbol: `run`
```diff
- return { state: "pending" }
+ return { state: "ready", source: "agent" }
```
Example input/output:
```json
{
"input": { "taskId": "t_123", "state": "pending" },
"output_before": { "state": "pending" },
"output_after": { "state": "ready", "source": "agent" }
}
```
The team chose to enrich the existing payload instead of creating a second metadata endpoint, which avoids an extra network hop and synchronization complexity. Performance impact here is negligible because no additional I/O is introduced, but there is a compatibility risk for legacy consumers that assume the old payload shape.
## Step 4 — UI consumes enriched payload [CHANGED]
Rendering now branches on the new `source` field, which is what makes the feature visible to users. This step is where the service-layer change becomes observable behavior.
Filename: `src/ui/render.ts:120`
Symbol: `renderState`
```ts
if (data.source === "agent") {
showAgentState()
}
```
At this point the flow reaches the updated UI outcome.
## Final Outcome
The feature still starts at the same runtime trigger and follows the same orchestration path, but the changed service payload now drives source-aware rendering. Next validation should confirm that legacy consumers handle the added `source` field safely.CHANGEDFilename: relative/path/to/file.ext:start_lineUNCHANGED CONTEXT