Skip to content

Add AGENTS.md with validated repo onboarding guidance#2522

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/add-agents-md-file
Open

Add AGENTS.md with validated repo onboarding guidance#2522
Copilot wants to merge 3 commits into
mainfrom
copilot/add-agents-md-file

Conversation

Copy link
Copy Markdown

Copilot AI commented May 12, 2026

This adds a repository-specific AGENTS.md to onboard coding agents to canonical/canonical.com with less exploration and fewer setup/CI missteps. The guide consolidates where code lives, which commands matter, and which repository-level workflows and environment variables matter most.

Done

  • Repository onboarding

    • Added AGENTS.md at the repo root for first-time coding agents
    • Summarized the app architecture, major directories, and the files that matter most for typical changes
  • Validated workflows

    • Documented the preferred local path with dotrun
    • Captured the direct host commands that were validated for build, lint, and test workflows
    • Called out the key CI entrypoints to use as ground truth, especially .github/workflows/pr.yaml
  • Operational guidance

    • Documented the Python dependency upgrade flow for this repo’s pinned requirements.txt
    • Listed the env vars that matter locally vs. for specific integrations
    • Kept repository-specific caveats in the guide after review feedback, including:
      • python3 app.py does not start the site
      • dotrun is the preferred workflow for running the full site locally because it matches the README and CI expectations
SECRET_KEY=insecure_test_key \
APPLICATION_CRYPTO_SECRET_KEY=insecure_test_key \
SERVICE_ACCOUNT_EMAIL=test_email@email.com \
SERVICE_ACCOUNT_PRIVATE_KEY=test_private_key \
HARVEST_API_KEY=local_development_fake_key \
RECAPTCHA_SITE_KEY=test \
PORT=8002 \
dotrun

QA

  • Open the DEMO
  • Alternatively, check out this feature branch
  • Run the site using the command dotrun
  • View the site locally in your web browser at: http://127.0.0.1:8002/
  • Run through the following QA steps
  • Review AGENTS.md and confirm it covers:
    • repo overview and code layout
    • validated run/build/test commands
    • Python dependency upgrade instructions
    • relevant environment variables and when they are needed
    • repository-specific pitfalls and preferred workflows

Issue / Card

Original issue: add AGENTS.md to onboard the repository for Copilot coding agent use.

Screenshots

Not applicable.

@webteam-app
Copy link
Copy Markdown

Copilot is not a collaborator of the repo

Copilot AI linked an issue May 12, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/canonical/canonical.com/sessions/f00387c8-57b9-4b2b-9795-895305ed9ee6

Co-authored-by: muhammad-ali-pk <60434613+muhammad-ali-pk@users.noreply.github.com>
Copilot AI changed the title [WIP] Add AGENTS.md to improve coding agent onboarding Add AGENTS.md with validated repo onboarding guidance May 12, 2026
Copilot AI requested a review from muhammad-ali-pk May 12, 2026 10:27
Copy link
Copy Markdown
Contributor

@muhammad-ali-pk muhammad-ali-pk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Please address my feedback.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Agent-Logs-Url: https://github.com/canonical/canonical.com/sessions/ff8aa617-3059-4d2e-a87f-20e12ca73fd9

Co-authored-by: muhammad-ali-pk <60434613+muhammad-ali-pk@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented May 12, 2026

@copilot Please address my feedback.

Addressed the review feedback in 50cb74d.

Copilot AI requested a review from muhammad-ali-pk May 12, 2026 11:09
@muhammad-ali-pk muhammad-ali-pk marked this pull request as ready for review May 12, 2026 11:12
Copy link
Copy Markdown
Contributor

@anthonydillon anthonydillon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments in the code

Comment thread AGENTS.md
On a fresh clone, this was the most reliable full-stack path:

```bash
yarn install --immutable
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this required locally?

Comment thread AGENTS.md
Comment on lines +54 to +60
SECRET_KEY=insecure_test_key \
APPLICATION_CRYPTO_SECRET_KEY=insecure_test_key \
SERVICE_ACCOUNT_EMAIL=test_email@email.com \
SERVICE_ACCOUNT_PRIVATE_KEY=test_private_key \
HARVEST_API_KEY=local_development_fake_key \
RECAPTCHA_SITE_KEY=test \
PORT=8002 \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be set in the .env.local file

Comment thread AGENTS.md
Comment on lines +52 to +53
dotrun install
dotrun build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not required

Comment thread AGENTS.md
Comment on lines +65 to +66
- The first `dotrun` command may take longer than expected because it checks/pulls the dotrun image and creates `.venv`.
- Always run `dotrun install` before the first `dotrun build`/`dotrun` in a fresh clone.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems strange

Comment thread AGENTS.md

### Docker helper

- `./run --help` works and documents the old Docker workflow.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./run is deprecated

Comment thread AGENTS.md
### LLM-related work

- This repo does not contain a checked-in LLM provider/runtime configuration for application features.
- If you add any new LLM configuration, prefer GitHub Models unless the task explicitly requires something else.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is false

Comment thread AGENTS.md
Comment on lines +195 to +201
SECRET_KEY=insecure_test_key
HARVEST_API_KEY=local_development_fake_key
APPLICATION_CRYPTO_SECRET_KEY=insecure_test_key
SERVICE_ACCOUNT_EMAIL=test_email@email.com
SERVICE_ACCOUNT_PRIVATE_KEY=test_private_key
RECAPTCHA_SITE_KEY=test
PORT=8002
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repeated several times and incorrectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AGENTS.md to this repository

4 participants