> For the complete documentation index, see [llms.txt](https://docs.walnutai.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.walnutai.ai/core-features/gap-analysis/phase-1-missing-code-detection.md).

# Phase 1: Missing Code Detection

**Phase 1:** Missing Code Detection validates whether documented requirements are implemented in the connected code repository. In this phase, User Stories act as the baseline, and WalnutAI verifies whether corresponding functionality exists in the selected code branches.

* Before starting the analysis:
  * The project must contain **User Stories** in the Action Items.
  * Ensure all required stories are created and available, these stories will be used as the reference for comparison against the codebase.
* To start the analysis:

  * Click **Start Analysis**.

  <figure><img src="/files/CRv8Iama7m7a5plvcc7z" alt=""><figcaption></figcaption></figure>

  * Select one or more **connected repositories** (repositories that were linked during project creation).

  <figure><img src="/files/m09QlmHERGRHf2Y1aiiV" alt=""><figcaption></figcaption></figure>

  * Click "**Start Analysing"** to begin evaluation and start Analysing.

  <figure><img src="/files/zafcj9dFupXs0yZcxROa" alt=""><figcaption></figcaption></figure>
* During analysis:
  * WalnutAI compares each user story with the selected repository branches.
  * It checks whether the requirement is fully implemented.
  * It detects partially implemented functionality.
  * It identifies requirements that are not implemented at all.
* After the analysis completes, the **Analysis Summary** section displays:

  * **Stories Analysed** – Total number of user stories evaluated.
  * **Gaps Found** – Total number of gaps identified.
  * **Coverage %** – Overall implementation coverage based on analysis.
  * A breakdown of **Missing**, **Incomplete**, and **Outdated** counts.

  <figure><img src="/files/QQfDhzEVtDlBKzsr3gec" alt=""><figcaption></figcaption></figure>

  <figure><img src="/files/opj8C0zoqU0xeivYx7bU" alt=""><figcaption></figcaption></figure>
* When a user clicks on a specific user story, the **AI Recommendations** panel displays suggestions such as:
  * Implementation suggestions
  * Displays estimated effort (if available).
  * Highlights missing elements.
  * Shows related code references with match percentage.
  * Recommends an approach to close the identified gap.
* The **Confidence Score** indicates how strongly the implementation aligns with the requirement based on WalnutAI’s semantic comparison.

<figure><img src="/files/cgxROe2HaBKsP9GiniMe" alt=""><figcaption></figcaption></figure>

* Click **Run New Analysis** to re-evaluate the selected user stories against the latest code changes and update the analysis results accordingly

<figure><img src="/files/D6e2rpqFW2CyWhRU5KSO" alt=""><figcaption></figcaption></figure>

Phase 1 ensures every user story is validated against the codebase, clearly identifies missing or incomplete implementations, maintains requirement-to-code traceability, and enables teams to proactively resolve gaps before release.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.walnutai.ai/core-features/gap-analysis/phase-1-missing-code-detection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
