architecture

A project map describing where a codebase starts running and how work moves through it. It lists the main files, command-line and GitHub Action entry points, and the use-case modules they call.

In plain words
What is it for?
Use it to understand the application flow, locate handlers for issues, pull requests, pushes, and single actions, and find related source files.
Why use it?
It helps developers find the right files before changing unfamiliar code. It reduces time spent tracing execution through the project.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/vypdev/copilot/architecture
Clone the repo
git clone --depth 1 https://github.com/vypdev/copilot

Made for: Cursor.

Per session 1,464 This file is loaded in full into every session.
When invoked 1,464 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01464 $0.01464
Opus 5 $0.00732 $0.00732
Sonnet 5 $0.00293 $0.00293
Haiku 4.5 $0.00146 $0.00146

Measured yesterday against content hash 3b2d879ce1f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/architecture.mdc · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architecture & Key Paths

Entry and main flow

  1. GitHub Action: src/actions/github_action.ts reads inputs, builds Execution, calls mainRun(execution) from common_action.ts.
  2. CLI: src/actions/local_action.ts same flow with CLI/config inputs.
  3. common_action.ts: Sets up; calls waitForPreviousRuns(execution) (sequential workflow); then:
    • Single actionSingleActionUseCase
    • IssueIssueCommentUseCase or IssueUseCase
    • Pull requestPullRequestReviewCommentUseCase or PullRequestUseCase
    • PushCommitUseCase

Key paths

Area Path Purpose
Action entry src/actions/github_action.ts Reads inputs, builds Execution
CLI entry src/cli.tslocal_action.ts Same flow, local inputs
Shared flow src/actions/common_action.ts mainRun, waitForPreviousRuns, dispatch to use cases
Use cases src/usecase/ issue_use_case, pull_request_use_case, commit_use_case, single_action_use_case
Single actions src/usecase/actions/ check_progress, detect_errors, recommend_steps, think, initial_setup, create_release, create_tag, publish_github_action, deployed_action
Steps (issue) src/usecase/steps/issue/ check_permissions, close_not_allowed_issue, assign_members, update_title, update_issue_type, link_issue_project, check_priority_issue_size, prepare_branches, remove_issue_branches, remove_not_needed_branches, label_deploy_added, label_deployed_added, move_issue_to_in_progress, answer_issue_help_use_case (question/help on open). On issue opened: RecommendStepsUseCase (non release/question/help) or AnswerIssueHelpUseCase (question/help).
Steps (PR) src/usecase/steps/pull_request/ update_title, assign_members (issue), assign_reviewers_to_issue, link_pr_project, link_pr_issue, sync_size_and_progress_from_issue, check_priority_pull_request_size, update_description (AI), close_issue_after_merging
Steps (commit) src/usecase/steps/commit/ notify commit, check size
Steps (issue comment) src/usecase/steps/issue_comment/ check_issue_comment_language (translation)
Steps (PR review comment) src/usecase/steps/pull_request_review_comment/ check_pull_request_comment_language (translation)
Bugbot autofix & user request src/usecase/steps/commit/bugbot/ + user_request_use_case.ts detect_bugbot_fix_intent_use_case (plan agent: is_fix_request, is_do_request, target_finding_ids), BugbotAutofixUseCase + runBugbotAutofixCommitAndPush (fix findings), DoUserRequestUseCase + runUserRequestCommitAndPush (generic “do this”). Permission: ProjectRepository.isActorAllowedToModifyFiles (org member or repo owner).
Manager (content) src/manager/ description handlers, configuration_handler, markdown_content_hotfix_handler (PR description, hotfix changelog content)
Models src/data/model/ Execution, Issue, PullRequest, SingleAction, etc.
Repos src/data/repository/ branch_repository, issue_repository, workflow_repository, ai_repository (OpenCode), file_repository, project_repository
Config src/utils/constants.ts INPUT_KEYS, ACTIONS, defaults
Metadata action.yml Action inputs and defaults

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 71 lines · 1,464 tokens per session scan A 3b2d879ce1f2

Subscribe to this mod's changes

architecture is a cursor rule published in the GitHub repository vypdev/copilot (2 stars, last pushed yesterday), licensed MIT. It adds 1,464 tokens to every session, about $0.0073 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.