Skip to content

Commit 5573910

Browse files
CopilotTimHess
andauthored
Set up agent instructions (#426)
* Add agent instructions * Update README metadata for docfx installation process --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TimHess <3947063+TimHess@users.noreply.github.com> Co-authored-by: Tim Hess <tim.hess@broadcom.com>
1 parent 5bf668c commit 5573910

3 files changed

Lines changed: 46 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Agent instructions for Steeltoe Documentation
2+
3+
## Scope and constraints
4+
5+
- **This repo is primarily documentation.** Prefer minimal, surgical edits. Do not change application or build code unless the task explicitly requires it.
6+
- **When editing docs only:** do not modify `.github/workflows/` or `src/`.
7+
- **Version focus:** Steeltoe v4 is current; v2 and v3 are legacy. Prefer v4 paths and examples unless the task targets an older version.
8+
9+
## Do / Don't
10+
11+
| Do | Don't |
12+
| --- | --- |
13+
| Use `.md` extensions for internal links | Use `.html` in internal links |
14+
| Run the docfx build (see [README.md](README.md)) before committing doc changes; fix `InvalidFileLink` and similar warnings | Commit doc changes without validating |
15+
| Add new pages to the relevant `toc.yml` (see [docs/README.md](docs/README.md)) | Add new API version config without updating `build/metadata.conf` and the corresponding build API config files |
16+
| Use [docfx Flavored Markdown](https://dotnet.github.io/docfx/docs/markdown.html) | Change Blazor or workflow files unless the task explicitly requires it |
17+
18+
## Where to find instructions
19+
20+
**Use the READMEs as the source of truth.** Update them when build or content steps change; AGENTS.md only points to them.
21+
22+
- **[README.md](README.md)** — Build order, commands to run the site locally, clean build (`git clean -xdff`). Run docfx before `dotnet run` or you get 404s and `InvalidFileLink` from `docs/api`.
23+
- **[build/README.md](build/README.md)** — API Browser: script, version/source switches, what the script does.
24+
- **[docs/README.md](docs/README.md)** — docfx layout, links and cross-references, YAML front matter options, creating blog posts and doc pages (including `toc.yml` examples).
25+
26+
## Overview and layout
27+
28+
This repository hosts the [Steeltoe website](https://steeltoe.io/): documentation and blog articles, built with ASP.NET Core Blazor and docfx. Key locations:
29+
30+
- **`docs/`** — Content (see [docs/README.md](docs/README.md) for subdirs and content rules).
31+
- **`src/Steeltoe.io/`** — Blazor app; docfx output goes to `wwwroot`.
32+
- **`build/`** — API Browser script and config ([build/README.md](build/README.md)).
33+
- **CI**`.github/workflows/build-and-stage.yml`.
34+
35+
## Linting and config
36+
37+
- Markdown: `.markdownlint.json`
38+
- Editor: `.editorconfig`
39+
40+
## Resources
41+
42+
- **Canonical instructions:** [README.md](README.md), [build/README.md](build/README.md), [docs/README.md](docs/README.md).
43+
- [docfx documentation](https://dotnet.github.io/docfx) · [docfx Flavored Markdown](https://dotnet.github.io/docfx/docs/markdown.html)
44+
- [Steeltoe website](https://steeltoe.io) · [ASP.NET Core Blazor](https://learn.microsoft.com/aspnet/core/blazor/)

build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This process can take a while to complete, will display many warnings and may in
2222
2323
## What does the script do?
2424

25-
1. Install docfx (by running `dotnet tool restore`, which installs tools defined in [dotnet-tools.json](../.config/dotnet-tools.json))
25+
1. Download docfx binaries (temporary workaround for .NET 10 support)
2626
1. Clone several copies of Steeltoe (using [metadata.conf](./metadata.conf) to identify checkout targets)
2727
1. Run `docfx metadata api-v{version}.json` for each copy
2828
1. This command will produce many yaml files and place them in [docs](../docs), alongside the index pages for each API version

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If you are working with API Browser content, view [this README](../build/README.
1414

1515
## Installing docfx
1616

17-
Install docfx by running `dotnet tool restore`, which installs tools defined in [dotnet-tools.json](../.config/dotnet-tools.json).
17+
docfx is automatically downloaded by the [build-metadata.ps1](../build/build-metadata.ps1) script when building API Browser metadata.
1818

1919
## docfx Markdown
2020

0 commit comments

Comments
 (0)