agentleFS
MicrosoftKnown publishermicrosoft/Huabu/.github/copilot-instructions.md

Huabu

Copilot instructions157 starsChanged 9 months agoMITView on GitHub

The file

We split this copilot-instructions.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Tracked File Moves: Always use git mv when moving or renaming files already tracked by Git.

    line 4
  2. Distinctive:

    Code Comments: Always use English for all code comments and documentation, regardless of the user's language.

    line 5
  3. Distinctive:

    Documentation: Ensure all generated documentation strings (JSDoc, TSDoc, etc.) are in English.

    line 6
  4. Very specific:

    Pre-PR CI Checks: Before handing a pull request off for review, run the repository-level pnpm typecheck, pnpm format, and pnpm lint:fix …

    line 11

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

GitHub Copilot Instructions

  • Docs-First Workflow: docs/architecture/ is the source of truth for how each subsystem works. Before implementing a feature or refactor, read the relevant docs/architecture/*.md (start from docs/README.md) to understand the current design, then act. After changing architecture, behaviour, or a documented contract, update the matching doc in the same change — fold shipped behavior into docs/architecture/, keep formally reviewed designs under docs/proposals/ with a lifecycle Status: header, keep uncommitted ideas under docs/backlog/, and reserve docs/archive/ for abandoned or superseded designs. Never leave a doc describing code that no longer exists.
  • Tracked File Moves: Always use git mv when moving or renaming files already tracked by Git. Do not recreate a tracked file at a new path and delete the original as separate filesystem operations.
  • Code Comments: Always use English for all code comments and documentation, regardless of the user's language.
  • Documentation: Ensure all generated documentation strings (JSDoc, TSDoc, etc.) are in English.
  • Markdown Formatting: In Markdown files (docs, prompts, READMEs) write one line per paragraph (soft-wrap) — do not hard-wrap prose at ~80 columns. Let the editor wrap; only insert a real line break to start a new paragraph or list item. Tables, code blocks, and ASCII diagrams are exempt.
  • Common UI Primitives: Before creating UI elements, inspect apps/web/src/components/Common and use or extend a suitable component. Treat each component's exported props and implementation as its current contract. Always use <Button> instead of a custom native <button>; use <TextInput> for styled text-like form controls; reserve the low-level <Input> for intentionally caller-styled inputs. Native inputs remain appropriate for non-text controls such as checkbox, radio, range, color, and file inputs. Keep feature-specific UI colocated when it is only used by that feature.
  • Reuse Before Implementing: Before adding or changing hooks, helpers, services, business logic, or non-trivial components, search for existing similar implementations first. Prefer reusing, extending, or extracting shared code over creating parallel implementations with slightly different behavior. For implementation tasks, briefly mention what was reused or why a new canonical implementation was necessary.
  • Filesystem Path Safety: Resolve untrusted path segments with resolveDirectChildPath() or safeJoin() from apps/server/src/utils/fs.ts; never rely on filename sanitization, direct path construction, or ad hoc checks. These helpers use CodeQL-recognized path.resolve and root-prefix validation.
  • Pre-PR CI Checks: Before handing a pull request off for review, run the repository-level pnpm typecheck, pnpm format, and pnpm lint:fix scripts. Review and commit any formatter or linter changes, then rerun validation affected by those changes.
  • API Endpoints: When adding or modifying any HTTP / SSE endpoint (route file, web api/*.ts helper, or shared wire type), follow the rules in docs/architecture/api-design.md. In particular: define the contract once in packages/shared/src/types/api/* (zod schema + z.infer type), validate every server input via safeParse, never define wire types inside apps/server or apps/web, and keep the web bundle zod-free by importing schemas as import type only.
  • Color Usage: Always use the semantic design tokens defined in apps/web/src/index.css — never use raw hex values, Tailwind default palette colors (e.g., gray-500, blue-600), or ShadCN aliases (bg-card, text-muted-foreground) in new components. Use text-fg-default / text-fg-muted / text-fg-subtle for text, bg-surface / bg-bg-default / bg-hover / bg-inverse for backgrounds, text-fg-inverse for text on dark surfaces, border-edge-default for borders, and status tokens (text-info, text-danger, text-success, text-warning) for semantic states. Treat the token declarations in apps/web/src/index.css as the source of truth.
  • External Subtree Commits: external/agentlet/ and external/agenetes/ are git subtrees that are pushed back to their own upstream repositories (remotes agentlet-upstream and agenetes-upstream). When a change touches a subtree and Huabu-only files, always create separate commits — one per subtree (so it can be cleanly pushed upstream) and another for the rest.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.