Kiro Writes the Spec, and Meko Remembers Why
AI coding tools can write code quickly and efficiently, but they often lack the architectural context behind existing design decisions. As teams adopt more AI tools and onboard new members, preserving this knowledge becomes increasingly important to avoid inconsistent designs, rework, and unnecessary costs.
This blog explores how Kiro‘s spec-driven development and Meko‘s architectural memory complement each other. While Kiro helps AI agents write code through structured specifications, Meko preserves the rationale behind architectural decisions. Together, they help AI agents make informed choices, avoid repeating past mistakes, reduce rework, and maintain architectural consistency as teams and tools evolve.
Forgetting Past Decisions is a Waste of Time and Money
When teams forget why a design decision was originally made, they waste time repeating discussions, rebuilding rejected solutions, and fixing problems that could have been avoided.
Every system has decisions behind how it works, including ideas that were rejected for good reasons, like shortcuts that break reports or database designs that fail under heavy traffic.
When these reasons are forgotten, the business pays the price in three ways:
- Repeated work. Someone suggests the same rejected idea again. The team has to re-discuss it, or worse, build it and then spend time fixing or removing it.
- Problems that reach customers. A rejected design is built anyway, leading to production issues, incorrect reports, or problems during an audit.
- Questions without answers. An auditor, a new team member, or someone investigating an incident asks, “Why did we build it this way?” But the answer is buried in an old chat that nobody can find.
AI coding agents make this problem even bigger. They work across different tools and short sessions, often without knowing why past decisions were made.
Without a shared record of these decisions, your team and your AI agents will repeat the same mistakes. The team wastes time, money, and effort solving problems it has already solved.
A Real Example: When an Audit Feed Loses the Reason
Imagine an online store where every refund must be traceable. The fraud team needs to distinguish refunds requested by customers from refunds issued after a fraud investigation.
During spec design, the architect decides to record every business action as an event, including the action, reason, person responsible, and timestamp. The team considers using Change Data Capture (CDC) on the orders table but rejects it. The table records the order’s current state, but not why each action was taken. CDC can capture changes to that table, but it cannot recover business reasons that were never stored.
The decision is recorded in the spec, and the team moves on.
A few days later, a new engineer asks an AI agent to build an audit feed for the fraud team. The agent has no record of the earlier decision in its session context. The agent suggests CDC because it is quick to implement. Neither the agent nor the engineer knows that the team already rejected this option.
A design review is not triggered because nothing about it appears to be a design decision. It arrives as a small, well-tested pull request. A review agent checks it and finds nothing wrong, because it lacks the same context the coding agent lacked. The code is correct. It merges the same afternoon.
The feed goes live. When the fraud team investigates a case, it sees that an order has been refunded and that its status has changed. It does not see whether the customer requested the refund or a fraud investigation triggered it. The team cannot reliably separate ordinary refunds from fraud-related cases using that feed. The audit feed exists, but it fails to answer the very question it was built to answer.
The problem isn’t that the AI wrote bad code, or that the team skipped a process. In ADLC, decisions are made faster than anyone can carry them forward by hand. The reasoning lived in the spec, but no agent session that touched the audit feed ever saw it.
CDC captures changes made to data in a database. Depending on the CDC tool and configuration, it can record which row changed, which fields changed, their old and new values, and when the change occurred.
For example, if an order changes from PAID to REFUNDED, CDC might capture:
{
"order_id": 1234,
"op": "UPDATE",
"before": { "status": "PAID" },
"after": { "status": "REFUNDED" },
"timestamp": "2026-10-27T10:30:00Z"
}This record shows what changed, but not why the order was refunded or who authorized it. CDC can only capture that context if the table stores it, for example, in refund_reason and approved_by fields. Here, it doesn’t. That’s the distinction the team weighed:
- CDC captures what changed in the database.
- Business events capture what happened and why, such as who initiated a refund and for what reason.
Why This Keeps Happening in ADLC
CDC isn’t wrong in general, only wrong for this question.
ADLC makes that kind of judgment easy to lose, as every agent session starts with no memory of earlier ones. The code shows what was chosen, not what was rejected, and review checks the diff, not decisions made in another spec. At agent speed, nobody can carry every decision forward by hand.
The fix isn’t more process. A design review for every PR would undermine the speed ADLC exists for. Instead, you need to capture the reasoning at spec time and bring it back to the agent before it proposes a design.
How Kiro and Meko Close the Gap
Kiro, from AWS, is a spec-driven coding agent that turns a request into requirements, a design, and a task list before code is written. It also reads the team’s steering files at the start of a session [E3].
Kiro helps capture what to build. But what happens when an agent needs to know why the team chose one design over another?
Meko, from YugabyteDB, provides a shared memory layer for AI agents through MCP (Model Context Protocol) and is available as a Kiro power [E1]. It helps preserve architectural decisions, including the alternatives the team rejected and the reasons behind those choices. You can learn more about Meko in this short video.
With a steering file in the repository, the workflow becomes:
- Search before designing. Before creating a spec, Kiro searches Meko for relevant decisions and cites the ones it finds [E4].
- Record the decision. When a design choice is made, Kiro saves the chosen approach, the rejected alternatives and their reasons, the consequences, and the agent that recorded the decision [E5].
- Share reviewed decisions. A team member can promote a decision to shared knowledge so other agents can retrieve it [E8].
The difference is not just having a spec. It’s preserving the reasoning behind the choices that shaped it.
| Situation | Kiro alone | Kiro + Meko |
| A new session starts | Reads repository steering and spec files [E3] | Also searches stored decisions for relevant context [E4] |
| An option is rejected | The reason is in the spec, but a later session sees it only if it retrieves the spec | The decision and its rationale can be recorded in Meko [E5] |
| Someone proposes it again | The agent may lack the original reasoning | The agent can retrieve and cite the earlier decision [E4] |
| The team switches tools | The new tool can access repository files | Compatible agents can also search shared decision records [E6, E7] |
| A teammate joins | They rely on repository files and existing documentation | They can also access decisions promoted to shared knowledge [E8] |
Testing the Refund Scenario with Kiro
We gave Kiro a small order service with an overwritten status column. The service did not store the business reason or the person responsible for each status change.
We explicitly instructed Kiro not to use CDC on the orders table because the existing data model could not distinguish a customer refund from a fraud reversal. The test focused on whether Kiro could capture this decision and its rationale in Meko for future retrieval, not whether it could independently arrive at the same conclusion.
Here’s what happened in the session log [E5]:
- It searched first. Kiro checked Meko and found no existing decision covering the problem.
- It inspected the code. It independently identified that the service did not record who changed the status or why.
- It proposed recording the decision. Before writing the spec, Kiro said it should record the decision so agents using other tools would not propose the same approach without the original context.
- It recorded another decision. While refining the spec, it identified and recorded a second design decision that we had not explicitly asked it to document.
The resulting record captured the architectural choice:
DECISION ADR-001 Order service: Record status-change intent as domain events
Chosen: Record each status change as an append-only domain event containing the action, reason, and actor at the time of the change.
Rejected: CDC on the orders table. In this service, the table stores only the current status. CDC can capture changes to that status, but it cannot recover a business reason or actor that the database never recorded. A customer refund and a fraud reversal would remain indistinguishable in the resulting feed.
Rejected: Keep only the current status. This loses the history of individual actions, including who performed them and why.
Recorded by: Kiro
Associated spec: order-status-event-log
The record preserves more than the final choice. It explains why the alternatives were rejected, making that reasoning available to future sessions.
We also tested a separate scenario in which the decision was already stored. Kiro retrieved it before designing, cited the existing rationale, and said it would not reopen the decision or create a duplicate [E4].
These runs demonstrate the workflow we wanted to test: Kiro can retrieve an earlier decision and apply its reasoning to a new task.
The important distinction is that storing a decision does not guarantee every agent will follow it. It gives the agent the context it would otherwise lack and gives the team a way to check whether new work respects the decisions already made.
Why it’s Useful, by Role
Architects: preserve the reasoning behind decisions
- Decisions can be recorded as the design is being developed, including rejected alternatives and the reasons for their rejection, rather than reconstructed months later. In our tests, Kiro recorded decisions without a per-task request in two of three runs and correctly skipped a duplicate in the third [E5].
- When Kiro found an existing decision, it cited the rationale and said it would not reopen or duplicate the record. A person still controls when a decision becomes shared team knowledge [E4, E8].
Engineering teams: fewer repeated debates, easier handoffs
- The same user can retrieve decision records across agent identities and tools that can access Meko. We verified retrieval with a test client, not with the actual Cursor or Claude Code applications [E6, E7].
- Promoted decisions are intended to give teammates’ agents access to shared reasoning. The power documentation describes this capability, but we have not yet tested it with a second user account.
Platform, DevOps and security: explicit controls
- Datapack members can search conversations stored in a datapack through context_search, not just promoted decisions. Teams should consider this when choosing a datapack for Kiro session storage, since conversation content may be visible to other members. This behavior was verified in the MCP server code (MEKO-1064).
- In our tested setup, Meko authentication used browser-based OAuth, and the power’s MCP configuration contained no API key. Kiro also requested approval when its tools were first used during the observed run [E2, E9].
- A steering file defines how Kiro should record and retrieve decisions, and Kiro read that file in all three test runs [E3]. The power documentation describes datapacks as the isolation boundary; an agent label identifies the writer but is not an access-control boundary [E10]. Records can preserve decision rationale and identify the agent that wrote them, while promotion records who shared them [E5, E8].
Why Pair Kiro with Meko?
Meko provides persistent decision memory through MCP, so it is not specific to Kiro. We chose Kiro because its spec-driven workflow gave us a concrete way to observe decision recording and retrieval during design.
The same workflow should be testable with other compatible coding tools, including Claude Code and Cursor, but that will be validated in the future.
Try it for Yourself
- Create a Meko account at cloud.mekodata.ai and create a datapack for your project.

Post sign-in, click datapacks → Add datapack (as shown below)

- In Kiro, install the Meko power, then choose MCP Servers → Authenticate [E1, E2].

- Add a steering file under .kiro/steering/ that identifies the relevant datapack and instructs Kiro to search for existing decisions before designing, and to record decisions with their rationale and rejected alternatives.
- Make a design decision during a spec task. Check the session log and Meko record to confirm what Kiro actually stored; this happened in two of our three runs [E5].
What We Tested and What Remains
We tested Kiro 1.4.26 with Meko power 1.2.0 across three dry runs.
The results are encouraging but still preliminary. Kiro searched for prior decisions, retrieved and cited a seeded decision, and recorded new decisions without being asked in two of the three runs. In those runs, it read the records back successfully [E4, E5].
Two things remain unverified:
- Real cross-tool retrieval: We retrieved a Kiro-authored record using a Node test client labeled as Cursor, not the actual Cursor or Claude Code applications [E6].
- Durability over time: We have not tested whether the workflow remains reliable over weeks or months.
The key distinction is between remembering a decision and enforcing it. Meko can preserve the choice and its rationale, but an agent may still fail to follow it. Our tests demonstrate a promising workflow for making prior decisions available, not proof that architectural regressions are eliminated.
Conclusion
Ultimately, generating code is only part of the challenge; preserving the architectural reasoning behind it is equally important.
Combining Kiro’s spec-driven development with Meko’s shared architectural memory offers a promising approach to helping AI agents make more informed decisions and maintain architectural context as development evolves.
Want to explore this further? Watch our on-demand webinar, Shared Memory for AI Coding Agents: A Live Build with Meko, to see how Meko helps AI coding agents share context, retain decisions, and collaborate across tools and sessions.
Appendix: Evidence Table
Each [E#] marker points to the evidence table below. It identifies the source, what it supports, and any limitations. Run logs are in docs/dryrun-1, dryrun-2, and dryrun-3 in the demo repository.
Github Link: https://github.com/seethb/kiro_meko
| ID | Claim | Source and what it supports | Status |
| E1 | The Meko power was installed from Kiro’s recommended registry. | ~/.kiro/powers/installed.json identifies registryId: kiro-recommended; plugin.json identifies power version 1.2.0. Kiro version was 1.4.26. These versions define the scope of the tests. | Verified |
| E2 | Authentication used browser OAuth; the tested power configuration did not include an API key. | The power’s mcp.json contained no credentials, only a User-Agent header. Kiro’s MCP log shows an unauthorized response until the user selected Authenticate, followed by an authorization code and a successful connection on 26 October at 04:02 UTC. | Verified for the tested setup |
| E3 | Kiro read the repository steering file in all three dry runs. | Steering-inclusion events in the session logs list .kiro/steering/meko-decisions.md and AGENTS.md. This supports the behavior observed in those runs, but it’s not a guarantee for every possible session. | Verified in three runs |
| E4 | Kiro searched Meko before designing, cited the reasoning of a stored decision, and said it would not reopen or duplicate it. | Dry run 1, 26 October, 04:16-04:30 UTC: paired memory_search and knowledgebase_search calls preceded requirements writing. Kiro said: “This decision is already recorded… I won’t re-open it or record a duplicate.” The retrieved decision was a rehearsal record seeded by the team. | Verified; seeded decision |
| E5 | Kiro recorded decisions without being asked, included rejected options and reasons, and read the records back. | Dry run 3, 06:13-06:36 UTC: Kiro recorded decisions, included rejected options and reasons, and read the records back; a duplicate was skipped in the third run. | Verified in two of three runs |
| E6 | A second agent identity retrieved Kiro’s decision and its writer attribution. | Verification runs 2 and 3, plus a 25 October live test: a memory_search using the identity cursor:order-service returned a record with agent_id: kiro:order-service. The second client was a Node test client using a Cursor label | Verified with test client only |
| E7 | Personal memories are scoped by the datapack and the user, rather than by the tool alone. | The memory_search tool description says records are scoped by datapack and user; memory_get_all returns criteria.user_id. This is consistent with the cross-identity retrieval test, correctly limits the finding to a single user, and does not claim teammate access. | Verified for one user |
| E8 | Promotion adds a decision to shared knowledge and records writer and promoter attribution. | On 25 October, memory_promote returned inserted IDs. The promoted listing showed agent_id, promoted_by_name, and promoted_to_kb_at; subsequent retrieval used knowledgebase_search, not memory_search. The power instructions say to ask before sharing. | Observed in two datapacks; instructions reviewed |
| E9 | Kiro prompts for approval when Meko tools are first used. | Dry run 2 logs show tool-approval prompts offering Allow, Always allow, and Deny for Meko tools. This demonstrates the approval flow in that run. | Verified in one run |
| E10 | The power documentation identifies the datapack as the access boundary, not the agent label. | The power’s SKILL.md at commit e1f526c (lines 109-111) states that agent_id attributes writes but is not an access boundary, and recommends placing projects that must not see each other’s content in separate datapacks. This claim is based on the power’s documentation, not an independent access-control test. | Documented; not independently tested |


