# Development

The **Development** tab bridges the gap between project requirements and code. Connect your GitHub repositories, review pull requests with AI-powered analysis, and track which PRs implement which parts of your definition and specs.

{% hint style="success" %}
**Requirements-to-code traceability**: Connect a GitHub repo, let Darcy review your PRs, then compute citations to see exactly which sections of your definition and specs have been implemented — and which haven't.
{% endhint %}

## GitHub Connection

Before you can use PR Reviews, you need to connect a GitHub account and select repositories.

### Connecting GitHub

{% stepper %}
{% step %}
**Open Development Settings** On the Development tab, click **Connect GitHub** (or the settings gear icon if you're reconfiguring). This opens the GitHub connection dialog.
{% endstep %}

{% step %}
**Authenticate with GitHub** Click **Connect & Discover** to open a GitHub OAuth popup. Sign in and authorize the DarcyIQ GitHub App. After authorization, the dialog detects your GitHub App installations.
{% endstep %}

{% step %}
**Select an Installation** If you have multiple GitHub App installations (e.g., personal account and organization), choose the one that contains the repositories you want to connect.

If you don't see the installation you need, click **New Installation** to install the GitHub App on another account or organization. The dialog will detect the new installation automatically after you complete the setup.

Alternatively, use the **Manual Setup** option and enter an installation ID directly.
{% endstep %}

{% step %}
**Select Repositories** A list of available repositories from the selected installation appears. Check the repositories you want to link to this project. Each repository shows its name and default branch.
{% endstep %}

{% step %}
**Configure Author Filter (Optional)** Toggle on the author filter to limit which PR authors are included in reviews. For each selected repository, a collaborator list is loaded from GitHub. Check the authors whose PRs should be reviewed — unchecked authors' PRs are excluded from review.
{% endstep %}

{% step %}
**Save** Click **Save** to store the connection. The Development tab will begin showing PR reviews for the selected repositories.
{% endstep %}
{% endstepper %}

### Managing the Connection

| Action                   | Description                                                                                              |
| ------------------------ | -------------------------------------------------------------------------------------------------------- |
| **Change repositories**  | Open the settings dialog and update your repository selection                                            |
| **Update author filter** | Toggle the filter on or off, and add or remove authors per repository                                    |
| **Disconnect**           | Click **Disconnect** in the settings dialog to remove the GitHub connection entirely (with confirmation) |
| **View configuration**   | A summary in the dialog shows who configured the connection and when                                     |

***

## PR Reviews

Once GitHub is connected, the **PR Reviews** sub-tab shows a list of pull requests from your linked repositories, along with Darcy's automated review analysis.

### PR Review List

The PR list includes:

* **Search** — filter PRs by title or number
* **Pagination** — navigate through pages of PRs
* **Status chips** for each PR:

| Chip              | Meaning                                              |
| ----------------- | ---------------------------------------------------- |
| **Merged**        | The PR was merged into the default branch            |
| **Closed**        | The PR was closed without merging                    |
| **Review posted** | Darcy has completed its automated review of this PR  |
| **Quality score** | A numeric score assessing the PR's quality           |
| **Helpful**       | The team rated Darcy's review as helpful (thumbs up) |
| **Cited**         | This PR appears in definition or spec citations      |

### PR Detail Panel

Click any PR to open a detail panel showing:

* **Full PR information** — title, number, repository, author, branches, merge status, dates
* **Darcy's review** — the AI-generated analysis in Markdown, including code review comments and suggestions
* **Direct link** — open the PR on GitHub
* **Feedback** — rate Darcy's review with thumbs up or thumbs down; feedback history is visible below

### Providing Feedback

Feedback helps improve Darcy's review quality over time:

1. Open a PR detail panel
2. Click **thumbs up** if the review was helpful, or **thumbs down** if it wasn't
3. Your vote and a timestamp are recorded and visible in the feedback history

***

## PR Citations

Citations create semantic links between pull requests and sections of your project definition and specs.

### Computing Citations

1. Click the **Compute Citations** button on the PR Reviews sub-tab
2. Darcy analyzes all reviewed PRs and maps them to relevant headings in your definition and specs
3. Citation badges appear next to PR entries in the list (showing "Cited") and next to headings in the Definition tab

### Recomputing Citations

If your definition or specs change after citations are computed, they become **stale**. A banner appears prompting you to recompute. Click **Recompute** to refresh all citations based on the current content.

### Using Citations

* On the **Development tab**: PRs with citations show a "Cited" badge, making it easy to see which PRs implement requirements
* On the **Definition tab**: Section headings show citation badges linking to the specific PRs that address them
* Click any citation badge to open the referenced PR in the detail panel

***

## Best Practices

| Practice                              | Recommendation                                                                                  |
| ------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **Connect GitHub early**              | Set up the GitHub connection when creating the project so PR reviews begin accumulating         |
| **Use author filters**                | Filter out bot accounts and external contributors to focus reviews on your team's PRs           |
| **Recompute citations after sprints** | After merging a batch of PRs, recompute citations to update traceability between specs and code |
| **Provide feedback on reviews**       | Rate Darcy's PR reviews with thumbs up/down to improve review quality over time                 |
| **Keep specs up to date**             | Accurate specs lead to better citation results and more useful traceability                     |

{% hint style="info" %}
**Pro Tip**: After connecting GitHub, enable the author filter to include only your delivery team members. This keeps the PR review list focused on relevant PRs and avoids noise from dependency bots or unrelated contributors.
{% endhint %}


---

# Agent Instructions: 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.darcyiq.com/workspace/projects/development.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.
