Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2261e35
docs(decisions): accept ADR-0003
albertospelta Nov 19, 2026
6559001
docs: move the release and CI notes of the layout plan
albertospelta Nov 19, 2026
313afc6
docs(agents): add the workflow, signing key and samples rules
albertospelta Nov 19, 2026
953ce4b
docs(backlog): record the follow-ups of the layout plan
albertospelta Nov 19, 2026
40cd92c
docs(decisions): allow link and typo fixes in any record
albertospelta Nov 19, 2026
727f50c
docs: delete the language-first layout plan
albertospelta Nov 19, 2026
55c4f0c
docs: replace the release guide with the version commands
albertospelta Nov 19, 2026
eab7140
docs: move the documentation map into AGENTS.md
albertospelta Nov 19, 2026
db3421b
docs(agents): rule out plans and tighten the root AGENTS.md
albertospelta Nov 19, 2026
996dd52
docs(agents): move build notes and the NBGV rule to language folders
albertospelta Nov 19, 2026
46a1846
docs(design): keep only what the code doesn't show in the architecture
albertospelta Nov 19, 2026
cedc67b
docs(backlog): shorten the items and drop Now
albertospelta Nov 19, 2026
0324227
docs: reduce CONTRIBUTING.md to what contributors need
albertospelta Nov 19, 2026
3fa18a0
docs(decisions): link the NBGV caveat in its new home from ADR-0003
albertospelta Nov 19, 2026
37ac69b
docs(readme): drop the duplicate link to CONTRIBUTING.md
albertospelta Nov 19, 2026
19db489
docs(agents): name the version command in the new-package rule
albertospelta Nov 19, 2026
e319c9c
docs(backlog): land the Node.js LTS item before the next MCP release
albertospelta Nov 19, 2026
a328fd2
docs(backlog): give every item an ID
albertospelta Nov 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AGENTS.md

Client packages for the DAX Formatter service, organized by language: the .NET client library `Dax.Formatter` (NuGet) in `dotnet/`, and the MCP server `@sqlbi/daxformatter-mcp` (npm), which carries its own TypeScript port of the client, in `typescript/packages/daxformatter-mcp/`. The service, its REST API and its remote MCP server are maintained outside this repository. Documentation map: [`docs/README.md`](docs/README.md).
Client packages for the DAX Formatter service, organized by language: the .NET client library `Dax.Formatter` (NuGet) in `dotnet/`, and the MCP server `@sqlbi/daxformatter-mcp` (npm), which carries its own TypeScript port of the client, in `typescript/packages/daxformatter-mcp/`. The service, its REST API and its remote MCP server are maintained outside this repository.

## Commands

There is no build at the root: each language builds and tests from its own folder, with the commands and rules in [`dotnet/AGENTS.md`](dotnet/AGENTS.md) and [`typescript/AGENTS.md`](typescript/AGENTS.md).
There is no build at the root: each language folder builds and tests on its own, with the commands and rules in [`dotnet/AGENTS.md`](dotnet/AGENTS.md) and [`typescript/AGENTS.md`](typescript/AGENTS.md).

## Done means

Expand All @@ -15,23 +15,31 @@ There is no build at the root: each language builds and tests from its own folde

## Boundaries

- Always: work on a branch, never on `master`; one logical change per commit; keep each fact in one home and link to it ([`docs/README.md`](docs/README.md)).
- Always: work on a branch, never on `master`; one logical change per commit; keep each fact in one home ([Documentation](#documentation)) and link to it.
- Ask first: changes to `.github/workflows/`, `.github/dependabot.yml` or `.github/CODEOWNERS`; any `version.json`; package ids, tags or release conventions; the wire format of a request or response; a new dependency.
- Never: commit secrets, tokens or signing keys; rewrite published history (force-push `master`, move or delete tags); run a release workflow without being asked.
- Never: add `docs/plans/`; the state of work in progress stays outside this repository.
- Never, because this repository is public: name private repositories, internal hosts, cloud resources, private package feeds or secret values in any file, commit message or pull request.

## When you change X, update Y

- The REST contract (an endpoint, a field, an enum value, the hashing, the caller identity) → [`docs/design/rest-api.md`](docs/design/rest-api.md) and every implementation its [Implementations](docs/design/rest-api.md#implementations) section lists.
- A workflow file renamed or added → follow the naming rule of [ADR-0001](docs/decisions/0001-organize-the-repository-by-language.md) (`<language>-ci.yml`, `<language>-release-<package>.yml`), with a `name:` equal to the file name without `.yml`, and CI job ids prefixed with the language (`dotnet-build-and-test`), so that each pull request check, named after its job, is unique across workflows; update [`docs/guides/release.md`](docs/guides/release.md); for the .NET CI workflow, the CI badge in `dotnet/README.md`; for the .NET release workflow, a maintainer adds the nuget.org Trusted Publishing policy for the new file name before the next release.
- A new package → its language folder ([ADR-0001](docs/decisions/0001-organize-the-repository-by-language.md)); its own `version.json` ([ADR-0004](docs/decisions/0004-version-tag-and-release-each-package-independently.md); where a second NuGet package's goes is still open, see the proposed [ADR-0003](docs/decisions/0003-keep-one-net-solution-with-role-folders.md)); its release workflow `<language>-release-<package>.yml`; an entry in `.github/dependabot.yml` when no entry covers its folder; the component dropdown of the issue forms; the package table of the root `README.md`; [`docs/design/architecture.md`](docs/design/architecture.md); the release guide.
- How the packages fit together, version or release → [`docs/design/architecture.md`](docs/design/architecture.md); a release step → [`docs/guides/release.md`](docs/guides/release.md).
- A workflow file renamed or added → its file name follows [ADR-0001](docs/decisions/0001-organize-the-repository-by-language.md) (`<language>-ci.yml`, `<language>-release-<package>.yml`), its `name:` is the file name without `.yml`, and its CI job ids start with the language, such as `dotnet-build-and-test` ([why](docs/design/architecture.md#deployment)); for the .NET CI workflow, the CI badge in `dotnet/README.md`; for the .NET release workflow, a maintainer adds the nuget.org Trusted Publishing policy for the new file name before the next release.
- A new package → its language folder ([ADR-0001](docs/decisions/0001-organize-the-repository-by-language.md)); its own `version.json` at its toolchain root ([ADR-0004](docs/decisions/0004-version-tag-and-release-each-package-independently.md)), or, for a second NuGet package, in its project folder ([ADR-0003](docs/decisions/0003-keep-one-net-solution-with-role-folders.md)) with a record that supersedes that rule of ADR-0004; its release workflow `<language>-release-<package>.yml`; the command that prints its version in its language folder's `AGENTS.md`; an entry in `.github/dependabot.yml` when no entry covers its folder; the component dropdown of the issue forms; the package table of `README.md`; [`docs/design/architecture.md`](docs/design/architecture.md).
- How the packages fit together, version or release → [`docs/design/architecture.md`](docs/design/architecture.md).
- An architectural decision → a new record in [`docs/decisions/`](docs/decisions/README.md), in the same pull request.
- How to connect an AI client to the MCP servers → SQLBI Docs ([remote](https://docs.sqlbi.com/dax-formatter/mcp-http), [stdio](https://docs.sqlbi.com/dax-formatter/mcp-stdio)), which are maintained outside this repository; this repository only links them.
- Work planned, open decisions, known debt → [`docs/backlog.md`](docs/backlog.md); a large piece of work in progress → its plan in `docs/plans/`, with its Progress updated in every pull request.
- How to connect an AI client to the MCP servers → SQLBI Docs ([remote](https://docs.sqlbi.com/dax-formatter/mcp-http), [stdio](https://docs.sqlbi.com/dax-formatter/mcp-stdio)), maintained outside this repository, which only links them.
- Work planned, open decisions, known debt → [`docs/backlog.md`](docs/backlog.md).

## Conventions

- Accepted records in [`docs/decisions/`](docs/decisions/README.md) are binding: when a change contradicts one, stop and ask. Proposed records are context.
- Commits and pull requests follow [`CONTRIBUTING.md`](CONTRIBUTING.md#commits-and-pull-requests).
- Workflows follow GitHub's [secure use reference](https://docs.github.com/en/actions/reference/security/secure-use): actions pinned to a full commit SHA with the version in a comment on the same line, which [Dependabot updates](https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories#github-actions) with the SHA; `permissions: contents: read` at the top, and write permissions only on the job that needs them; expressions passed to scripts through `env`, never written into `run`; `persist-credentials: false` on every checkout.
- Documents are in plain English, describe the present, and link within the repository with relative links. Package READMEs are written for their registry, with only what a package user needs: the npm README uses absolute URLs only.

## Documentation

- [`docs/design/`](docs/design/README.md): how the packages work, call the service, version and release. Read before changing a package's boundaries, the REST contract, a `version.json` or a workflow.
- [`docs/decisions/`](docs/decisions/README.md): why it is so, one record per decision. Read the titles before proposing a design choice.
- [`docs/backlog.md`](docs/backlog.md): what comes next, open decisions and known debt. Read before picking up work; a new item takes the `Next ID`, and IDs are never reused.
67 changes: 1 addition & 66 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,15 @@ Thank you for helping with DAX Formatter. This repository holds the client packa
- Report a security vulnerability privately, as the [security policy](SECURITY.md) explains, never in a public issue.
- For a change larger than a fix, open an issue first, so that the approach is agreed before the work starts.

## Where code goes

The repository is organized by language ([ADR-0001](docs/decisions/0001-organize-the-repository-by-language.md)):

- `dotnet/`: the .NET client library `Dax.Formatter`, its tests and samples ([ADR-0003](docs/decisions/0003-keep-one-net-solution-with-role-folders.md)).
- `typescript/packages/daxformatter-mcp/`: the MCP server `@sqlbi/daxformatter-mcp`, with its own TypeScript port of the client.
- `docs/`: documentation for contributors and maintainers; [`docs/README.md`](docs/README.md) says where each kind of fact lives. The user documentation is on [SQLBI Docs](https://docs.sqlbi.com/dax-formatter/).

## Build and test

### .NET

Run the commands from `dotnet/`: the `dotnet` CLI looks for `global.json` from the current folder upward, so only there does it use the SDK that `dotnet/global.json` pins.

```bash
cd dotnet
dotnet build
dotnet test
dotnet pack
```

- The tests call the live DAX Formatter service: they need network access, and they fail when the service is unreachable.
- The test project also targets .NET Framework 4.7.2, which runs only on Windows, where CI runs; on other systems, run `dotnet test --framework net10.0`.
- Local builds are not strong-named: the signing key exists only in the release workflow.

### TypeScript

Run the commands from the package folder; each npm package has its own lockfile.

```bash
cd typescript/packages/daxformatter-mcp
npm ci
npm run typecheck
npm run build
npm test
```

The tests replace `fetch` with a mock and run offline. Build and test with a current release of the Node.js major version that `.github/workflows/typescript-ci.yml` sets: the build and test tools need a newer Node.js than the published package, which supports the versions in the `engines` field of `package.json`.
Each language folder builds and tests on its own: the commands and their requirements are in [`dotnet/AGENTS.md`](dotnet/AGENTS.md) and [`typescript/AGENTS.md`](typescript/AGENTS.md).

## Commits and pull requests

- Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/): `type(scope): summary`, in the imperative, lowercase start, at most 72 characters, for example `docs(mcp): link client setup on SQLBI Docs`. Usual types: `feat`, `fix`, `docs`, `refactor`, `test`, `build` (also dependencies, as Dependabot writes them), `ci`, `chore`.
- One logical change per commit; the body says what changed and why, in `-` bullets wrapped at 72 columns.
- Pull requests are squash-merged into `master`, so the pull request title becomes the commit subject: write it as a Conventional Commits subject. The description is plain text with `-` bullets, without headings or tables.
- CI builds and tests the language folders that a pull request changes, and again after the merge into `master`.
- A change updates the documents it affects in the same pull request; a change to the REST contract starts from [`docs/design/rest-api.md`](docs/design/rest-api.md) and updates both clients. An architectural decision is recorded in [`docs/decisions/`](docs/decisions/README.md).

## Versions, tags and releases

- Each package gets its version from Nerdbank.GitVersioning and its own `version.json` ([ADR-0004](docs/decisions/0004-version-tag-and-release-each-package-independently.md)): don't set versions in project files or in `package.json`.
- The maintainers release each package with its release workflow; the [release guide](docs/guides/release.md) gives the steps and the tags.

## Reading history across the move

On 2026-11-17 the repository moved to the language-first layout in one commit, `6df1bf0` (#53). To follow a file across the move, use `git log --follow`:

```bash
git log --follow -- dotnet/src/Dax.Formatter/DaxFormatterClient.cs
```

Commits before the move use the old paths:

| Before the move | After the move |
|---|---|
| `src/Dax.Formatter/` | `dotnet/src/Dax.Formatter/` |
| `src/Dax.Formatter.Tests/` | `dotnet/tests/Dax.Formatter.Tests/` |
| `src/Dax.Formatter.sln`, `src/Directory.Build.props` | `dotnet/` |
| `samples/getting-started/` | `dotnet/samples/GettingStarted/` |
| `version.json`, `global.json`, `nuget.config`, `package-icon.png`, `README.md` at the root | `dotnet/` |
| `mcp/` | `typescript/packages/daxformatter-mcp/` |
| `.github/workflows/ci.yml`, `release.yml` | `dotnet-ci.yml`, `dotnet-release-dax-formatter.yml` |
| `.github/workflows/ci-mcp.yml`, `publish-mcp.yml` | `typescript-ci.yml`, `typescript-release-daxformatter-mcp.yml` |

For a folder, or for commands that don't follow renames, give both paths, for example `git log -- src/Dax.Formatter dotnet/src/Dax.Formatter`.

## License

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ The service also hosts a remote MCP server, which needs nothing installed.

- User documentation: [SQLBI Docs](https://docs.sqlbi.com/dax-formatter/).
- Connecting an AI client: to the [remote MCP server](https://docs.sqlbi.com/dax-formatter/mcp-http) or to the [stdio MCP server](https://docs.sqlbi.com/dax-formatter/mcp-stdio).
- For contributors and maintainers: [`docs/`](docs/README.md).

## Support

Expand Down
11 changes: 0 additions & 11 deletions docs/README.md

This file was deleted.

Loading
Loading