Docs
Sign in
Browse the docs

Using Alara Code

Repository integration

Connect GitHub or Azure DevOps, push the approved documents into a repository, and index its code so the pipeline and the architecture picture can read it.

28 min read10 sections

The Repository tab links a project to one git repository (on GitHub or on Azure DevOps) and pushes the project's approved SDLC documents into it, from the first approval on. A new-system (greenfield) project gets a fresh repository that Alara Code creates for you; an existing-system (brownfield) project connects a repository that already holds code, and Alara Code never writes to its branches directly.

alara-code · Harbor Bank Portal

0:00 / 0:48

One repository per project. GitHub and Azure DevOps are connected once per organization by an admin. A project then links one repository, and the kind of project decides how.

Connect GitHub or Azure DevOps once, for the organization

GitHub and Azure DevOps are connected once per organization, by an admin, in Settings › Git connections. Every project then uses that connection, nobody needs a GitHub install or a token of their own, and the connection outlives the person who added it.

  • GitHub: press Connect GitHub. You are sent to GitHub to install the Alara app on the GitHub account or GitHub organization that holds your repositories, then brought back to Settings with "GitHub is connected for your organization." The card shows the account, the repository access (All repositories or Selected repositories only, with Broaden access on GitHub), who added it and when. Re-check reads the installation from GitHub again; Remove removes it.
  • Azure DevOps: press Connect, enter the Azure DevOps organization and a Personal Access Token, and press Save & verify. Azure DevOps checks the token for that organization before it is saved; it is stored encrypted and only its last four characters are ever shown (••••a1b2). Prefer a token owned by a service identity rather than a person. Replace PAT swaps the token for the same Azure organization, every project uses the new one on its next call. A token for a different Azure organization is refused while projects are bound to repositories in the current one: remove those projects' Azure bindings, or use a token for the same organization.

Removing a connection keeps every project, its repository link and its documents; the projects say "Repository connection removed, reconnect to continue" until it is connected again.

Seeing the section needs Settings › Organization Repositories › read; connecting, replacing and re-checking need update; removing needs delete. Someone with read only sees both cards without buttons.

Where you connect a repository

You meet the same repository step in two places:

  • The new-project wizard. Its last step, Repository, appears after the project is created. A greenfield project can press Skip for now and connect later. A brownfield project has no skip, because its repository is the point of the project; the step reads "Connect the existing GitHub or Azure DevOps repository this change is for. Nothing is written to it."
  • The Repository tab of any project. If nothing is connected yet, it shows the same chooser.

The chooser asks "Where should this project's repository live?" (greenfield) or "Where does the existing repository live?" (brownfield) and offers a card for each provider your organization has connected. With only one connected, its view opens directly; with neither, the step says "Connect GitHub or Azure DevOps for your organization first", with an Open Settings button if you may connect them, or a request to ask an organization admin otherwise. Once a project is linked, the tab opens straight on that provider's view and the chooser no longer appears. Choose a different provider takes you back to the chooser while you are still setting up.

Whether a project is greenfield or brownfield is chosen when you create it (New system or Existing system) and is shown under Settings › General › Project type.

Flow
  • Repository tab to Project type
  • Project type to Provider, Greenfield
  • Project type to Provider, Brownfield
  • Provider to Name and visibility, GitHub
  • Name and visibility to Create repository
  • Provider to Azure project and name, Azure DevOps
  • Azure project and name to Create repository
  • Provider to Pick repository, GitHub
  • Provider to Azure project, pick repository, Azure DevOps
  • Pick repository to Connect repository
  • Azure project, pick repository to Connect repository
  • Create repository to Linked: README on default branch
  • Connect repository to Linked: nothing written
  • Linked: README on default branch to A document approved: Push docs
  • Linked: nothing written to A document approved: Push docs
  • A document approved: Push docs to Commit to default branch, create development, Greenfield
  • A document approved: Push docs to Commit to alara/sdlc-docs, open pull request, Brownfield

Greenfield: create a new repository

GitHub

GitHub uses the organization's Alara GitHub App installation, and the repository is created on the GitHub account or organization it is installed on.

  1. Open GitHub and fill in Repository details:
    • Repository name: defaults to a slug of the project name (lowercase letters, digits, ., _, -). The hint shows the full name it will be created as, <account>/<name>.
    • Visibility: Private (the default) or Public.
  2. Press Create repository. Alara Code creates the repository, commits an initial README.md to its default branch, and links it to the project. A Repository created toast names it.

Azure DevOps

Azure DevOps uses the organization's saved Personal Access Token, no project screen asks for one.

  1. Open Azure DevOps and fill in Azure DevOps location:
    • Project: the Azure DevOps project the repository goes in, inside your organization's Azure DevOps organization.
    • Repository name: defaults to a slug of the project name; the hint shows <organization>/<project>/<name>.
  2. Press Create repository. Alara Code checks the organization's token against the project, creates the repository, commits an initial README.md, and links it. Creating a repository needs a token with the Code: Full scope.

While the repository is being created the tab shows Setting up… and refreshes on its own. If it does not finish, submit the form again with the same details and it resumes where it stopped.

Brownfield: connect an existing repository

For an existing system you connect a repository that is already there. Both providers promise the same thing, and the code holds to it: nothing is written to the repository's branches when you connect, and documents later go to an alara/sdlc-docs branch as a pull request.

GitHub

An empty GitHub repository gets one README.md on its default branch when you connect it (the toast says so), so documents can be pushed later. That needs the app to have Contents: Read and write; without it the tab says "The repository is empty and Alara could not add a first commit, add one on GitHub, or give the App Contents: Read and write permission."

  1. Open GitHub. You see Choose a repository: the repositories the organization's GitHub installation can reach. Type in Filter repositories… to narrow a long list by name.
  2. Pick one, choose a Base branch from its branches (the repository's default branch is preselected; an empty repository offers main: Alara will add a first commit), and press Connect repository. A Repository connected toast confirms it with the base branch.

Azure DevOps

  1. Open Azure DevOps and fill in Project.
  2. Press List repositories. You see Choose a repository, with each repository's default branch and badges for empty and disabled repositories. A disabled repository cannot be picked. Filter repositories… narrows the list by name.
  3. For a repository with content, choose a Base branch from the list (the default branch is marked "(default)").
  4. Press Connect repository.

If the repository is empty, the tab tells you that a README will be committed to main so it can be cloned, this is the only write a brownfield connect ever makes, and it needs a token with write access.

Index an existing repository

A project built on an existing system has an Index row at the top of its Repository tab. The index is what the architecture picture, its Graph view and its Ask & Impact chat read, so index the repository once it is connected. Indexing is done here: the Architecture tab has no Index button, and until there is an index it shows a placeholder that sends you to this tab.

A new-system project gets it too, once code arrives

A new-system (greenfield) project starts with only the connection step. After its repository has received a push (the first documents push counts), the tab also shows the Index row, reading Connected · no source indexed yet, with a Branch to index picker. Choose the branch your team writes code on and press Index.

If the branch holds only documents, the row says Only documents found so far. Push code and re-index. Once the index finds code in the repository, the project gets the same tools as an existing system: the built architecture picture, its Graph view and the Ask & Impact chat, the Re-Index banner, and a toast when indexing completes. The project is still a new-system project, with the same wizard and landing tab; what the repository holds decides which tools apply.

Get the repository indexed

  1. Connect the repository. For an existing system the index follows one branch, the base branch you picked when you connected it.
  2. In the Index row, press Index (it reads Re-index once there has been one). It needs the Wiki › Index › create permission. Without it you see the state and no button.
  3. Wait. The row reads Indexing…, and a blue strip above every tab reads Indexing with the branch and queued, position N or running. Both update by themselves.
  4. When the row reads Indexed, current, open the Architecture tab: the picture, the Graph view and the chat now read this index.
Index rowWhat it meansWhat to do
Not indexedConnected, nothing indexed yet.Press Index.
Indexing…Queued: waiting for this organization's index slot, or Running.Wait. An earlier index, if there is one, keeps working.
Indexed, currentThe index is at the branch's latest commit.Nothing.
Indexed, N behindThe branch has N commits the index lacks.Press Re-index.
IndexedThe provider did not say whether the branch moved.Press Re-index if you know it has.
Indexed, branch no longer existsThe branch was deleted. The old index is kept and there is no button.Change repository, pick the branch again, index.
Index failed (reason)The last index did not finish.Read the reason, fix it, press Re-index.
Flow
  • Not indexed to Indexing, Press Index
  • Indexing to Indexed, current, Job finishes
  • Indexing to Index failed, Job fails
  • Indexed, current to Indexed, N behind, New commits on the branch
  • Indexed, N behind to Indexing, Press Re-index
  • Index failed to Indexing, Press Re-index

What the index holds

The index is a snapshot of one branch at one commit. Python, JavaScript (.js, .jsx, .mjs, .cjs) and TypeScript (.ts, .tsx) are read down to functions, calls and imports. Files in other languages are stored as files and folders only, so callers in those languages are missing from what the chat finds. With none of the three, the Graph view shows a File structure only note and draws no call lines.

Everything that reads the index reads it at its commit, never the live branch, so an answer describes the code as it was when the repository was last indexed.

When the index gets stale

New commits on the indexed branch make it stale. A push to another branch, or a new tag, changes nothing.

  • The banner. Every project page shows an amber strip, The branch has moved on, with the branch and has N commits since the index. Anyone who can see the project sees it. Press Re-Index in the strip. Without Wiki › Index › create it says Ask an administrator to re-index. The state is re-read about every minute, so a push can take that long to show.
  • Automatically. Where your deployment allows automatic analysis and the project's Auto-update switch is on, a push can start the re-index by itself. See Keeping the picture current. Otherwise it is yours to press.
  • After it finishes. The Graph view and the chat read the new index. A file the new index lacks that you had open shows The graph changed and the map reloads. On a Native project the Architecture picture is drawn again when its Auto-update switch is on. On an Alara Agents project you press Analyse yourself.

When indexing is stuck

  • Queued a long time. Indexing is limited per organization, so a job can wait for a slot. After 50 minutes it fails with token expired: press Index again. Press Re-index.
  • Running with no progress. A run is stopped after 1,800 seconds and the branch keeps its previous commit. If the indexing worker stops, the job fails within about two minutes. Press Re-index.
  • Failed on access. The provider refused the organization's credential. An administrator fixes the GitHub installation or Azure DevOps token in Settings › Git connections, then you press Re-index.

Push the documentation

Once a repository is linked, the Repository tab shows it (the repository name and its default branch) in a success callout. The Push documentation section appears below it as soon as at least one of the documents it pushes (the prototype counts) has an approved version; it does not wait for the Tasks step.

Press Push docs to GitHub or Push docs to Azure DevOps. The button reads Pushing… while the push runs, and the push keeps going if you switch tabs, the button stays disabled until it finishes, so you cannot start a second push by accident. Pushing is always a click: approving a document never pushes it by itself. When the repository is connected and the RFP, Scope, SRS, TAD, SDS, API, STS and Plan are all approved, and some approved files (or the approved project brief) are not in the repository yet, the Pipeline tab shows a blue strip, Approved documents are not in the repository yet, listing them, with Open the Repository tab to take you here. The strip does not appear while the connection is removed or suspended or the repository is gone, because the tab has no Push there; it goes away after a push and never pushes anything itself.

Under the button one line tells you what is new:

  • Approved documents not in the repository yet: 2.0 SRS, 2.0 Prototype, an approved file (named by its pipeline version) has not been pushed yet.
  • Last pushed 12 Oct 2026, 10:00, 5 files: everything approved is in the repository. The button then reads Up to date; pressing it again is harmless and makes no commit.

What gets pushed

The push sends the approved document of every pipeline version, as a file per document per version, never a draft that is still under review. They go into a fixed template that is the same for new-system and existing-system projects:

Path in the repositoryWhat it is
docs/README.mdA generated index: for each folder and each document, one row per pipeline version with its file, the generation it came from (artifact v3, as the Artifacts tab shows it), which row is current, which versions use the 1.0 document because they did not revise it, and what is not approved yet. It also names the project brief and design file at the root, and links the project's Alara Plan board when the project is linked
docs/product_discovery/scope-v1.0.mdThe approved Project Scope of each version
docs/tech_discovery/rfp-v1.0.mdThe Request for Proposal of each version. An RFP you uploaded is pushed as the file you uploaded (for example rfp-v1.0.docx)
docs/architecture/srs-v1.0.md, tad-v1.0.md, sds-v1.0.md, api-v1.0.mdThe approved Software Requirements Specification, Technical Architecture Document, Software Design Specification and API Contract of each version
docs/prototype/prototype-v1.0.html, design-v1.0.mdThe approved UI prototype of each version, and the design file the prototype step wrote for it (the design system, colours, type, spacing, components and conventions). There is one design file per pipeline version: if the prototype is run again in that version and the new one is approved, the file is replaced
docs/testing/sts-v1.0.mdThe approved Software Test Specification of each version
docs/releases/plan-v1.0.mdThe approved Delivery Plan of each version
docs/adr/, docs/deployment/, docs/operator-docs/, docs/incidents/Folders that belong to your team. Each gets a short README stating its convention the first time, and Alara Code never writes in it again
AGENTS.md, CLAUDE.md (repository root)The approved project brief (see below)
DESIGN.md (repository root)The design file of the newest approved prototype. It follows a re-run: a newer prototype of the same version, or a newer version, rewrites it

The version in a file name is the pipeline version's name (srs-v2.0.md is the SRS that version 2.0 approved; a version named "Q4 beta" gives srs-vq4-beta.md). Every folder exists from the first push, each with a one-line README, so the shape is visible even before a folder has a document. The proposal, the estimate, the threat model, the compliance report and the traceability matrix are never pushed. Epics and tickets are not pushed either, they live on the Alara Plan board. Diagrams stay as mermaid blocks, exactly as approved.

A document that a pipeline version did not revise gets no new file: the index says it uses the 1.0 document. A document approved only as a Word file (projects generated before documents became Markdown) is not pushed; the index lists it as "approved, older format, not in the repository".

A file that is in the repository is never overwritten and never deleted, even if someone edited it there. The push only adds files. The only files it ever rewrites are the index, Alara Code's own folder READMEs, the root files below, and one more: the prototype's design file of a pipeline version (design-v1.0.md), which Alara Code replaces when the prototype is run again in that version and the new one is approved. It replaces only a design file that Alara Code itself pushed earlier; a design-v1.0.md that your team put there first is left as it is. The prototype's HTML file stays add-only. A repository pushed by an earlier version of Alara Code keeps its docs/sdlc/ folder exactly as it is; the index says it is superseded by this template.

Existing folders are reused. An existing-system repository that already has a docs, doc or documentation folder (any letter case) gets the template inside that folder, and a subfolder that matches a template folder in another letter case (for example Architecture/) is used as it is. A README of your own is never edited: if docs/README.md is yours, the index is added at its end between two marker lines, and only that block is ever rewritten.

Each push is one commit, with the message SDLC documents <pipeline versions> - <what was added>, for example SDLC documents 2.0 - srs, sds, prototype.

The project brief and DESIGN.md

The Project brief card on the Repository tab generates a short rules file for coding agents, the repository's root AGENTS.md (and a CLAUDE.md that imports it). It is also a step in the step rail, /brief (Project Brief), the first row under From the documents. It stays locked, with "Approve System Test Spec to unlock this", until the System Test Spec is approved: the brief's Testing section is written from it. Press Generate project brief (on the card or on the rail): the project's agent (the same engine that writes your documents) writes it from the approved documents, which costs model usage like any step, so it only runs when you ask. While it runs the button reads Generating... and, if another step is running, Another step is running, so it cannot be started twice. The brief appears in the Artifacts tab as Project Brief; approve it or request changes like any document. Only an approved brief is pushed. When a document is approved after the brief was written, the card says Brief is behind: SDS 2.0, STS 2.0 approved since and offers to generate it again; a push still sends the approved brief. Once a brief exists the button reads Generate again and an Open in Artifacts link appears. The card states where the brief stands, for example "Brief, generation 2: approved." or "No project brief yet."

The prototype step writes DESIGN.md. Every time /proto builds or changes a prototype (a new design system, palette, font pairing, backdrop or colour mode, comment fixes, a rebuild), Alara Code writes a DESIGN.md for that version of the prototype from its design system, palette and design brief, with no model call. It is a short file for coding agents in the open DESIGN.md format: the colours in light and dark, type, spacing, shapes, shadows, motion, the components and the rules to follow. It lists no screens. It is approved with the prototype. A prototype built before this has none until it is run again; the push does not write one for it. Run /proto again and approve the new prototype, and the next push updates the design file in docs/prototype/ and the root DESIGN.md.

The two root files and DESIGN.md are the only files outside the documentation folder, and the only ones a push rewrites. They sit between two marker lines (BEGIN:alara-code-brief and END:alara-code-brief, or ...-design), and a push only ever rewrites what is between the markers. A repository's own root files are never touched. If the repository already has an AGENTS.md or a CLAUDE.md of its own (without our markers), neither is written: the two go together, so a team AGENTS.md alone, a team CLAUDE.md alone, or both, all mean the push leaves both alone. A DESIGN.md of your own is left alone the same way, for every prototype that follows. The pull request description and the card say "left untouched", and the approved brief stays in the Artifacts tab for you to copy from.

Where it goes

Greenfield repository. While only Alara Code has written to the repository, the commit lands directly on its default branch (main when none is recorded). A development branch is created alongside it if it does not exist yet, and development becomes the project's working branch. The toast says Docs pushed to GitHub (or Azure DevOps) with the documents and the branch, and adds "development branch created" the first time.

Once someone else has written to the default branch (your team pushed code, for example), Alara Code stops committing to it. The documents then go by pull request, as for an existing system: onto the alara/sdlc-docs branch, with a pull request into the default branch for your team to review and merge. Once a project goes by pull request it stays that way.

Brownfield repository. The customer's branches are never written to. The commit goes to the alara/sdlc-docs branch, created from the base branch you chose at connect time (or the default branch), and a pull request titled docs: Alara SDLC documents is opened from alara/sdlc-docs into the base branch. Its description lists the files added in the push. Pushing again adds to the same branch and reuses the open pull request (or opens a new one once the last was merged). No development branch is created and the base branch stays the working branch. Review and merge the pull request on GitHub or Azure DevOps.

Repository structure (when enabled)

A deployment can turn on an optional step that lays out a folder structure for a greenfield repository (a fixed layout derived from the project, with no model involved) and commits it with the docs. It only runs on a repository that still contains nothing but what Alara Code put there; a repository that already has code is left alone. When it is on, the toast Repository structure ready tells you it was committed. If a build fails the tab shows Repository structure build failed. with a Retry button, which pushes again.

Permissions

Who may see a project is decided by project membership (see Members and permissions). What a person may do on the Repository tab is decided by the Integrations module in their PolyX organization role, creating a project does not grant it.

ActionNeeds
See the Repository tab's connection status, list GitHub or Azure DevOps repositories, list branchesIntegrations › read
Create a repository, connect an existing repositoryIntegrations › create
Push docs (and Retry a failed structure build)Integrations › update
Disconnect a repositoryIntegrations › delete
Index or re-index an existing repositoryWiki › Index › create
Connect GitHub / Azure DevOps for the organization (Settings)Settings › Organization Repositories › update (remove: › delete)

Without read, the tab shows Repository settings are not available to you and the sentence naming the missing right. Without create or update, the buttons are disabled; hover them to see the reason, for example "Needs Integrations › update", and the full message "Your role does not include Integrations › update. Ask an organization administrator to add it to your role in PolyX."

Projects are loaded inside your organization only, a project from another organization, or one you cannot see, answers as "not found" to every repository call.

Changing the repository

On a connected project the Repository tab shows Change repository to anyone with Integrations › delete. It asks first, naming the current repository, then disconnects it and shows the picker again, so another repository can be connected. Nothing is deleted on GitHub or Azure DevOps. The same disconnect is available through the API, POST /api/projects/:id/github/disconnect and POST /api/projects/:id/azure/disconnect, both needing Integrations › delete. A disconnect removes the project's link; it does not delete or change anything in the repository. The organization's GitHub installation and Azure DevOps token are kept: they back the organization's other projects.

Things also change from the GitHub side:

  • Uninstalling the app on GitHub disconnects every project linked through that installation.
  • Suspending the app suspends those links; unsuspending restores them (a link someone removed with Change repository stays removed).
  • If uninstalling the app disconnected a GitHub link and the organization's app installation can again reach the same repository (for example after reconnecting GitHub in Settings) the link is restored automatically the next time the tab loads.

Once a project has no active link, the Repository tab offers the provider chooser again.

Deleting a project (Settings › Danger zone › Delete this project) removes the project, its documents, board and run history, but the connected repository is not touched.

Errors and what to do

MessageCauseWhat to do
A repository with that name already exists… Pick a different name.The name is taken on the account or in the Azure DevOps project. Alara Code never adds a suffix for you.Enter another Repository name.
That name isn't valid…The name has characters outside letters, numbers, -, _, ..Rename it.
Connect GitHub for your organization in Settings / An organization admin needs to connect GitHub first.The organization has no GitHub (or Azure DevOps) connection.An admin connects it in Settings › Git connections.
Repository connection removed, reconnect to continueAn admin removed the organization's connection (or the app is suspended on GitHub).An admin connects it again in Settings; the project's link and documents are kept.
This project is already linked to a GitHub repository. / …already connected to a repository.The project already has an active link.Use the linked repository, or disconnect it first.
Azure DevOps rejected the organization's saved PAT…The organization's token expired or was revoked.An admin uses Replace PAT in Settings.
The organization's PAT can read the project but can't create repositories…The token has Code: Read & Write, not Code: Full.An admin replaces it with a Code: Full token in Settings.
That Azure DevOps project wasn't found in the organization.Project name typo or no access.Check the Project field.
This repository no longer exists on GitHub / Azure DevOps (or Alara can no longer access it), change repository.The linked repository was deleted on the provider, or the app or token can no longer reach it. The Repository tab checks this when it loads (the answer is kept for about a minute); push-docs answers the same.Press Change repository and connect another one, or restore access to it.
Couldn't reach Azure DevOps (network hiccup). Try again in a moment.Azure DevOps did not answer.Try again.
Re-pick the branchNo branch is set for this repository, so it cannot be indexed.Use Change repository to pick the repository and its branch again.
Could not reach the repository wikiThe code index did not answer.Press Try again in a moment.
Repository insights are not available in this environmentThe code wiki is switched off for this deployment.Ask an administrator.
Mock data: not your repository, or Sample data from the mock wiki, not your repository.The deployment is running the wiki in mock mode: what you see is a built-in sample, not your code.Do not plan from it. Tell an administrator the wiki is in mock mode.
This project is brownfield, connect an existing repository.A create was attempted on an existing-system project.Use the connect-existing flow.
The GitHub installation has no accessible repositories…The app was installed with access to no repository.Grant the app access to the repository on GitHub, then connect again.
That branch does not exist in the repository.The Base branch you entered is not there.Leave it blank or pick an existing branch.
The GitHub connection did not complete. Try again. (Settings)GitHub's callback failed.Press Connect GitHub again.
Installation requested on GitHub. An owner of that GitHub organization must approve it… (Settings)You may not install apps on that GitHub organization, so GitHub recorded a request instead.Ask an owner of the GitHub organization to approve it on GitHub, then press Connect GitHub again.
That GitHub account is different from the one already connected… (Settings)The app was installed on another GitHub account than the organization's connection.Remove the current connection first, then connect the other account.
Couldn't push docs ("Nothing to push yet) approve the scope (or another SDLC document) first."No document the push sends has an approved Markdown version.Approve a document (RFP, Scope, SRS, TAD, prototype, SDS, API, STS or the plan), then push.
Couldn't push docs. "The approved documents are in the older .docx format, which is not pushed…"The project's approved documents predate Markdown documents.Approve a new version of a document, then push.
Couldn't push docs. "A command is running for this project…"A step is running; the push records itself in the project's state.Wait for the run to finish, then push.
Couldn't push docs, "GitHub push failed: …" / "Failed to push documentation to Azure DevOps."The provider rejected the push.Check the repository still exists and the app or PAT still has access, then push again.
GitHub App install cannot be started or completed right now.The server's short-lived token store is unavailable.Try again later; tell your administrator if it persists.

For other errors, see Troubleshooting.

Under the hood

  • Connection records are per project and per organization: one GitHub link or one Azure DevOps link. GitHub app installations are recorded per person per organization; Azure DevOps credentials per person per Azure DevOps organization, encrypted with AES-256-GCM.
  • GitHub reaches the bridge through a signed install callback (/api/github/install-callback) and an HMAC-verified webhook (/api/webhooks/github), which is how uninstall and suspend events arrive.
  • Both providers share one push implementation, so GitHub and Azure DevOps projects behave the same way. The endpoints and their permissions are listed in the API reference.