Skip to content
Agentmart
Submit a tool

AGENTS.md · midwayjs/midway

AGENTS.md from midwayjs/midway: 45 lines covering Project overview, Code rules, Docs rules, Practical tips.

Template by midwayjs

IndexedMIT★ 7,760
Write a review

Chalk Labs

Need help deploying AGENTS.md · midwayjs/midway?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/midwayjs/midway/v4-next/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that midwayjs/midway (7,760 stars) keeps for coding agents. It has 45 lines in 4 sections: Project overview; Code rules; Docs rules; Practical tips. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
45 lines
File
AGENTS.md

Sections

  1. Project overview
  2. Code rules
  3. Docs rules
  4. Practical tips

First lines (shown under the repo's MIT license)

<!-- OPENSPEC:START -->
# OpenSpec Instructions

These instructions are for AI assistants working in this project.

Always open `@/openspec/AGENTS.md` when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
- Sounds ambiguous and you need the authoritative spec before coding

Use `@/openspec/AGENTS.md` to learn:
- How to create and apply change proposals
- Spec format and conventions
- Project structure and guidelines

Keep this managed block so 'openspec update' can refresh the instructions.

<!-- OPENSPEC:END -->

# Repository Guide for Agents

## Project overview
- Midway v4 monorepo managed by lerna + pnpm workspace.
- TypeScript 5, built with `tsc`, tested with `jest`.
- IoC container implementation lives in `packages/core` (MidwayContainer, DecoratorManager, MetadataManager).

## Code rules
- Each component is an independent npm package and can communicate via DI.
- New/changed components must include tests. Run `npm run test` in the package.
- Use `mwts` for linting (`npm run lint:fix` when needed).
- After code changes, rerun the relevant lint command and keep necessary lint-fix output in the patch instead of reverting it casually.
- Add meaningful comments for functions/classes/interfaces/enums.

## Docs rules
- Current docs live under `site/docs` (Docusaurus).
- Match existing doc style/tone/structure for consistency.
- Show dependency installation in both bash (npm) and JSON `package.json` forms.
- Doc changes do not require a build check.
- For component docs, write for beginners first: start from what the component solves, when to use it, and the simplest working path, then go deeper into advanced usage, configuration, and extension points. Prefer tutorial-style progression over API-only lists.

## Practical tips
- Prefer `pnpm -C <package> test` to scope tests.
- Keep changes aligned with existing patterns in the targeted package.
- Pull request titles must use standard commit format, such as `feat: xxx` or `fix: xxx`.

Signals

Stars
7,760
Forks
584
Open issues
0
Last commit (this folder)
Jun 7, 2026 (4 months ago)
Last release
Oct 18, 2026 (12 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get AGENTS.md · midwayjs/midway running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying AGENTS.md · midwayjs/midway?

CallGet help
Cite this page

AGENTS.md · midwayjs/midway. Agent Mart. https://agentmart.dev/templates/midwayjs-midway-agents-md (last updated 2026-10-24)