chore: implement linting and formatting compliance#5
chore: implement linting and formatting compliance#5agent-runner-bot[bot] wants to merge 6 commits intomainfrom
Conversation
|
Implemented ESLint and Prettier, updated CI workflow, and synchronized AGENTS.md with the local ruleset. |
|
Agent runner idle completed. Repo: metyatech/compose-agentsmd Summary:
|
There was a problem hiding this comment.
Pull request overview
This PR aligns the repo with the AGENTS.md linting/formatting guidance by introducing ESLint + Prettier, wiring them into npm scripts/CI, and applying formatting normalization across code and docs.
Changes:
- Add ESLint (flat config) + Prettier configuration and supporting ignores.
- Update npm scripts and CI to run a unified
checkpipeline. - Reformat JS/TS sources, tests, and Markdown files; update ruleset/local rules and regenerate
AGENTS.md.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/tool-rules.md | Formatting normalization (blank line after header). |
| tools/compose-agents.js | Formatting normalization (quote style). |
| test/compose-agents.test.js | Formatting normalization (Prettier-style changes). |
| src/compose-agents.ts | Formatting normalization (Prettier-style changes). |
| package.json | Add lint/format/typecheck/check scripts and new devDependencies. |
| package-lock.json | Lockfile updated for ESLint/Prettier/tooling deps. |
| eslint.config.js | New ESLint v9 flat config using typescript-eslint + prettier config. |
| .prettierrc | New Prettier configuration. |
| .prettierignore | New ignore rules for generated/large artifacts. |
| .github/workflows/ci.yml | Run npm run check instead of only lint. |
| agent-ruleset.json | Add missing local rules to extra; formatting normalization. |
| agent-rules-local/release.md | Formatting normalization. |
| AGENTS.md | Regenerated output reflecting updated ruleset and shared rules. |
| README.md | Formatting normalization; ruleset example edited. |
| SECURITY.md | Formatting normalization (spacing + line endings). |
| CONTRIBUTING.md | Formatting normalization (spacing + line endings). |
| CODE_OF_CONDUCT.md | Formatting normalization (spacing + line endings). |
| CHANGELOG.md | Formatting normalization (spacing). |
| .github/pull_request_template.md | Formatting normalization (spacing/line endings). |
| .github/ISSUE_TEMPLATE/feature_request.md | Formatting normalization (spacing/line endings). |
| .github/ISSUE_TEMPLATE/bug_report.md | Formatting normalization (spacing/line endings). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -11,6 +12,7 @@ npm test | |||
| ``` | |||
There was a problem hiding this comment.
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.
README.md
Outdated
| "extra": ["agent-rules-local/custom.md"], | ||
| // Output file name. | ||
| "output": "AGENTS.md" | ||
| "output": "AGENTS.md", |
There was a problem hiding this comment.
The ruleset example is now invalid JSON/JSON-with-comments: the trailing comma after the last property ("output": "AGENTS.md",) will still be present after comment stripping, causing JSON.parse(...) to fail. Please remove the trailing comma (or update the parser to support trailing commas if that’s intended).
| "output": "AGENTS.md", | |
| "output": "AGENTS.md" |
README.md
Outdated
| npm run lint | ||
| npm run build | ||
| npm test | ||
| ``` | ||
|
|
||
| ## Overview | ||
| This repository contains the compose-agentsmd project. | ||
|
|
||
| ## Requirements and Configuration | ||
| - No required environment variables are documented. | ||
|
|
||
| ``` |
There was a problem hiding this comment.
The development commands list doesn’t reflect the new scripts introduced in this PR (notably format, typecheck, and/or the aggregate check that CI now runs). Consider updating this section so contributors run the same checks CI runs.
.github/pull_request_template.md
Outdated
| ## Changes | ||
| - | ||
|
|
||
| - |
There was a problem hiding this comment.
The placeholder under “## Changes” is just - (no following space/text). In CommonMark/GitHub Markdown, a list item marker requires trailing whitespace; otherwise this renders as a plain hyphen and is harder to fill in. Consider using - (with a trailing space) or a concrete placeholder like - <describe change>.
| - | |
| - <describe change> |
.github/ISSUE_TEMPLATE/bug_report.md
Outdated
| 1. | ||
| 2. | ||
| 3. |
There was a problem hiding this comment.
The placeholders for the ordered list in “Steps to reproduce” are 1., 2., 3. without a following space. In CommonMark/GitHub Markdown, ordered list markers require whitespace after the period; otherwise they won’t render as a list and are less convenient to fill in. Consider changing to 1. / 2. / 3. (or include placeholder text).
| 1. | |
| 2. | |
| 3. | |
| 1. | |
| 2. | |
| 3. |
.github/pull_request_template.md
Outdated
|
|
||
| ## Testing | ||
|
|
||
| - [ ] npm run lint |
There was a problem hiding this comment.
CI now runs npm run check (lint + typecheck + prettier --check + audit), but the PR template’s Testing checklist still calls out only npm run lint. To keep contributor expectations aligned with CI, consider updating the checklist to include npm run check (or explicitly list typecheck/prettier --check).
| - [ ] npm run lint | |
| - [ ] npm run check |
|
Agent runner started review follow-up (review) on 2026-02-11T01:39:45.124Z. Concurrency 8. |
|
Agent runner failed review follow-up with error: Unable to resolve branch fix/compliance-lint-format in cache repo D:\ghws\agent-runner\git-cache\metyatech\compose-agentsmd.git |
|
Agent runner started review follow-up (review) on 2026-02-13T08:23:44.172Z. Concurrency 8. |
|
Agent runner completed review follow-up successfully. Log: D:\ghws\agent-runner\logs\compose-agentsmd-issue-5-1770972159699.log |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
package.json
Outdated
| "lint": "eslint .", | ||
| "format": "prettier --write .", | ||
| "typecheck": "tsc -p tsconfig.json --noEmit", | ||
| "check": "npm run lint && npm run typecheck && prettier --check . && npm audit", |
There was a problem hiding this comment.
npm run check includes npm audit, which will fail CI on any newly disclosed transitive vulnerability (including in devDependencies) and can cause unrelated PRs to start failing unexpectedly. Consider scoping the audit (e.g., set an --audit-level, use --omit=dev where appropriate, or move it to a separate non-blocking/scheduled job) so CI remains stable while still surfacing security issues.
| "check": "npm run lint && npm run typecheck && prettier --check . && npm audit", | |
| "check": "npm run lint && npm run typecheck && prettier --check . && npm audit --audit-level=high --omit=dev", |
| "devDependencies": { | ||
| "@types/node": "^25.1.0", | ||
| "typescript": "^5.7.3" | ||
| "@typescript-eslint/eslint-plugin": "^8.54.0", | ||
| "@typescript-eslint/parser": "^8.54.0", | ||
| "eslint": "^9.39.2", | ||
| "eslint-config-prettier": "^10.1.8", | ||
| "globals": "^17.3.0", | ||
| "prettier": "^3.8.1", | ||
| "typescript": "^5.7.3", | ||
| "typescript-eslint": "^8.54.0" |
There was a problem hiding this comment.
The ESLint setup uses typescript-eslint’s flat config helper, but @typescript-eslint/eslint-plugin and @typescript-eslint/parser are also listed directly. Since the typescript-eslint meta-package already brings these in (and they aren’t imported directly), consider removing the redundant devDependencies to reduce maintenance surface and the chance of version skew.
|
Agent runner started review follow-up (review) on 2026-02-13T10:32:34.918Z. Concurrency 8. |
Refs #3904490781
|
Agent runner completed review follow-up successfully. Summary:
Tests run: Log: D:\ghws\agent-runner\logs\compose-agentsmd-issue-5-1770981155323.log |
|
Agent runner started review follow-up (review) on 2026-02-17T02:17:12.298Z. Concurrency 8. |
|
Agent runner completed review follow-up successfully. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| npm run check | ||
| npm run format | ||
| npm run typecheck |
There was a problem hiding this comment.
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.
| npm run check | |
| npm run format | |
| npm run typecheck | |
| npm run format | |
| npm run check |
| # 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. |
There was a problem hiding this comment.
AGENTS.md contains carriage-return (CRLF) characters in the newly added "Local operations rules" section (shows up as \r in the file). This breaks the goal of consistent formatting/line endings and can cause noisy diffs across platforms. Please normalize this section (and ideally the whole file) to LF and regenerate AGENTS.md after any formatter normalization so it matches the source rule files.
|
Agent runner started review follow-up (review) on 2026-02-17T23:00:05.450Z. Concurrency 8. |
|
Agent runner failed review follow-up. Cause: Codex usage limit reached. Detail: An unexpected critical error occurred:[object Object] Next automatic retry: 2026-02-24T01:01:41.000Z (2026/2/24 10:01:41 JST). Log: D:\ghws\agent-runner\logs\compose-agentsmd-issue-5-1771369208698.log |
|
Closing: superseded by #9. |
This PR brings the repository into compliance with AGENTS.md by implementing ESLint and Prettier, updating the CI workflow, and including missing local rules in the ruleset.