Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 10 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,29 @@ labels: bug
---

## Summary

A clear and concise description of the problem.

## Steps to reproduce
1.
2.
3.

1. <step 1>
2. <step 2>
3. <step 3>

## Expected behavior

What you expected to happen.

## Actual behavior

What actually happened.

## Environment

- OS:
- Node.js:
- Version:

## Additional context
Add any other context, logs, or screenshots here.

Add any other context, logs, or screenshots here.
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ labels: enhancement
---

## Summary

A clear and concise description of the feature.

## Problem / motivation

What problem does this solve?

## Proposed solution

Describe the solution you'd like.

## Alternatives considered

Describe any alternative solutions or features you've considered.

## Additional context
Add any other context or screenshots about the feature request here.

Add any other context or screenshots about the feature request here.
10 changes: 7 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
## Summary

Describe the change and why it is needed.

## Changes
-

- <describe change>

## Testing
- [ ] npm run lint

- [ ] npm run check
- [ ] npm test
- [ ] npm pack --dry-run (if publishing-related)

## Checklist

- [ ] README.md updated or not needed (explain why)
- [ ] No generated artifacts committed
- [ ] Changes are scoped to the affected repository only
- [ ] Changes are scoped to the affected repository only
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
- name: Check
run: npm run check

- name: Test
run: npm test
run: npm test
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
node_modules/
AGENTS.md
package-lock.json
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2
}
136 changes: 117 additions & 19 deletions AGENTS.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,73 @@
All notable changes to this project will be documented in this file.

## 3.2.4 - 2026-02-02

- Refactored CLI argument value parsing to reduce duplication.

## 3.2.3 - 2026-02-01

- Restored shared tool rules to use `compose-agentsmd` and moved the repo-specific compose instruction into a local rule.
- Added a local rules file and wired it into the ruleset, then regenerated `AGENTS.md`.

## 3.2.2 - 2026-02-01

- Normalized AGENTS.md Source paths to GitHub-style refs for remote rules and project-relative paths for local rules, with matching test updates.
- Added a pre-commit hook to run lint/test/build.
- Updated the ruleset to use `github:metyatech/agent-rules` with `cli`/`release` domains, removing the local release extra and regenerating AGENTS.md with the shared rules.
- Clarified tool rules location and rule-update diff requirements, and switched this repo to generate rules via `npm run compose`.
- Bumped @types/node to ^25.1.0.

## 3.2.1 - 2026-01-27

- Regenerated `AGENTS.md` to exclude the `AGENTS.md` file from rule diff output.

## 1.0.1 - 2026-01-25

- Switched the package to ESM (`"type": "module"`, NodeNext compiler options).
- Hardened npm publish settings (`publishConfig.access`, `files`, `prepare`).
- Expanded test coverage for rules root precedence and ruleset validation.
- Added GitHub community health files and CI workflow.
- Regenerated `AGENTS.md` from the updated rule modules.

## 1.1.0 - 2026-01-26

- Added JSON Schema validation for rulesets with an explicit schema file.
- Prepended tool guidance rules to generated `AGENTS.md` files.
- Updated shared rule modules for JSON schema validation and English rule writing guidance.

## 1.1.1 - 2026-01-26

- Clarified that README updates must be edited at the same time as code changes in shared rules.

## 1.1.2 - 2026-01-26

- Clarified that version bumps must include both release creation and package publishing.

## 2.0.0 - 2026-01-26

- Switched ruleset format to `source/global/domains/extra` with remote GitHub sources and cache support in `~/.agentsmd`.
- Added `--refresh` and `--clear-cache` cache management commands.
- Updated ruleset schema, tests, and README to match the new format.

## 2.0.1 - 2026-01-26

- Moved the publish/global-update rule into local rules for this repository.

## 2.0.2 - 2026-01-26

- Externalized tool-inserted rules and usage text into `tools/`.
- Added rule guidance to externalize long embedded strings/templates when possible.

## 3.0.0 - 2026-01-26

- Removed recursive ruleset discovery; only the project root ruleset is composed unless `--ruleset` is provided.

## 3.1.0 - 2026-01-26

- Added `--version`/`-V` and `--verbose`/`-v` flags with verbose diagnostics output.

## 3.2.0 - 2026-01-26

- Added `init` to bootstrap rulesets with dry-run, confirmation, and compose options.
- Allowed ruleset files to include line/block comments (JSON with comments).
- Updated init defaults to use generic GitHub sources and omit global/domains/extra unless specified.
7 changes: 6 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
# Code of Conduct

## Our pledge

We are committed to providing a friendly, safe, and welcoming environment for everyone.

## Expected behavior

- Be respectful and considerate.
- Assume good intent and collaborate constructively.
- Provide and accept feedback gracefully.

## Unacceptable behavior

- Harassment, discrimination, or hateful conduct.
- Personal attacks, trolling, or intimidation.
- Publishing private information without permission.

## Enforcement

Maintainers may remove, edit, or reject contributions that violate this Code of Conduct.

## Reporting
Report issues to the maintainers via GitHub Security Advisories or a private channel when possible.

Report issues to the maintainers via GitHub Security Advisories or a private channel when possible.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Contributing

## Development setup

1. Install dependencies.
2. Run lint and tests before submitting changes.
2. Run checks and tests before submitting changes.

```sh
npm ci
npm run lint
npm run check
npm test
```
Comment on lines 3 to 12
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contributor setup still instructs running only npm run lint + npm test, but this PR introduces typecheck/format and CI now runs npm run check. Consider updating this section to point contributors at npm run check (or list the additional commands) so local verification matches CI.

Copilot uses AI. Check for mistakes.

## Rules composition workflow

This repository treats `AGENTS.md` as a generated file.

- Do not edit `AGENTS.md` directly.
Expand All @@ -22,6 +24,7 @@ npm run compose
```

## Pull requests

- Keep changes scoped to the affected repository.
- Include tests for behavioral changes.
- Update `README.md` when usage or behavior changes.
- Update `README.md` when usage or behavior changes.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ compose-agentsmd apply-rules

Ruleset files accept JSON with `//` or `/* */` comments.

<!-- prettier-ignore -->
```jsonc
{
// Rules source. Use github:owner/repo@ref or a local path.
Expand Down Expand Up @@ -131,14 +132,16 @@ Remote sources are cached under `~/.agentsmd/cache/<owner>/<repo>/<ref>/`. Use `

```sh
npm install
npm run lint
npm run build
npm run check
npm run format
npm run typecheck
Comment on lines +135 to +137
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Development snippet suggests running npm run check (which includes prettier --check and npm run typecheck) before npm run format, and then runs npm run typecheck again. This is likely to confuse contributors and can lead to an avoidable failure if formatting is needed. Consider either documenting a single canonical workflow (e.g., format first, then check+test) or removing the redundant typecheck line and clarifying when format is required.

Suggested change
npm run check
npm run format
npm run typecheck
npm run format
npm run check

Copilot uses AI. Check for mistakes.
npm test
```

## Overview
This repository contains the compose-agentsmd project.

## Requirements and Configuration
- No required environment variables are documented.

```

## Overview

This repository contains the compose-agentsmd project.

## Requirements and Configuration

- No required environment variables are documented.
5 changes: 4 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Security Policy

## Supported versions

The latest published version is supported.

## Reporting a vulnerability

Please report vulnerabilities privately via GitHub Security Advisories or by opening a private report to the maintainers. Do not file public issues for security-sensitive reports.

When reporting, include:

- A clear description of the vulnerability
- Steps to reproduce or a proof of concept
- Impact assessment
- Suggested mitigations (if known)

We will acknowledge receipt and work on a fix as quickly as possible.
We will acknowledge receipt and work on a fix as quickly as possible.
6 changes: 6 additions & 0 deletions agent-rules-local/operations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Local operations rules

- After any change that requires a process or task restart to take effect, restart the affected local components before concluding.
- Verify post-restart state and report which components were restarted and their final status.
- For agent-runner behavior changes, identify the responsible runtime component (Scheduled Task `AgentRunner` / `dist/cli.js run`, webhook, UI) and restart the correct one(s) before concluding.
- Do not claim a restart occurred unless verified by deterministic evidence (new PID, port check, and/or the latest task-run log showing the expected new behavior).
2 changes: 1 addition & 1 deletion agent-rules-local/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Distribution and release

- After publishing this repository, update the globally installed CLI to the latest version.
- After publishing this repository, update the globally installed CLI to the latest version.
12 changes: 5 additions & 7 deletions agent-ruleset.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
{
"source": "github:metyatech/agent-rules",
"domains": [
"cli",
"node",
"release"
],
"domains": ["cli", "node", "release"],
"extra": [
"agent-rules-local/compose-agentsmd-local.md"
"agent-rules-local/compose-agentsmd-local.md",
"agent-rules-local/release.md",
"agent-rules-local/operations.md"
],
"output": "AGENTS.md"
}
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-config-prettier';
import globals from 'globals';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['src/**/*.ts'],
languageOptions: {
parserOptions: {
project: './tsconfig.json',
},
},
},
{
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ESLint configuration only specifies type-aware linting for TypeScript files in 'src/**/*.ts' (line 18), but the test files are JavaScript (.js) files in the 'test/' directory. Consider adding a separate configuration block for test files to ensure they are properly linted. For example:

{
  files: ['test/**/*.js'],
  languageOptions: {
    globals: {
      ...globals.node,
    },
  },
}

This ensures test files have appropriate linting rules applied and are not accidentally skipped.

Suggested change
{
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{

Copilot uses AI. Check for mistakes.
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
ignores: ['dist/**', 'node_modules/**', 'AGENTS.md'],
},
);
Loading