Skip to content

Comments

chore: implement linting and formatting compliance#5

Closed
agent-runner-bot[bot] wants to merge 6 commits intomainfrom
fix/compliance-lint-format
Closed

chore: implement linting and formatting compliance#5
agent-runner-bot[bot] wants to merge 6 commits intomainfrom
fix/compliance-lint-format

Conversation

@agent-runner-bot
Copy link
Contributor

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.

@agent-runner-bot
Copy link
Contributor Author

Implemented ESLint and Prettier, updated CI workflow, and synchronized AGENTS.md with the local ruleset.

@agent-runner-bot
Copy link
Contributor Author

Agent runner idle completed.

Repo: metyatech/compose-agentsmd
Engine: gemini-flash

Summary:
Implemented ESLint and Prettier for linting and formatting compliance with AGENTS.md. Updated CI workflow to run a comprehensive check suite (lint, typecheck, format check, and audit). Updated agent-ruleset.json to include missing local release rules and regenerated AGENTS.md.

  • Changes made:
    • Installed eslint, prettier, typescript-eslint, and related plugins.
    • Added eslint.config.js, .prettierrc, and .prettierignore.
    • Updated package.json scripts: lint, format, typecheck, and check.
    • Updated .github/workflows/ci.yml to use npm run check.
    • Updated agent-ruleset.json to include agent-rules-local/release.md.
    • Regenerated AGENTS.md.
    • Formatted entire codebase using Prettier.
  • Tests run: npm test, npm run check.
  • Commit hashes: db1b6f3 (chore: implement linting and formatting compliance with AGENTS.md)
  • PR URL: chore: implement linting and formatting compliance #5

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 check pipeline.
  • 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.

Comment on lines 3 to 12
@@ -11,6 +12,7 @@ npm test
```
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.
README.md Outdated
"extra": ["agent-rules-local/custom.md"],
// Output file name.
"output": "AGENTS.md"
"output": "AGENTS.md",
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 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).

Suggested change
"output": "AGENTS.md",
"output": "AGENTS.md"

Copilot uses AI. Check for mistakes.
README.md Outdated
Comment on lines 134 to 137
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.

```
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 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.

Copilot uses AI. Check for mistakes.
## Changes
-

-
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 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>.

Suggested change
-
- <describe change>

Copilot uses AI. Check for mistakes.
Comment on lines 13 to 15
1.
2.
3.
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 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).

Suggested change
1.
2.
3.
1.
2.
3.

Copilot uses AI. Check for mistakes.

## Testing

- [ ] npm run lint
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.

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).

Suggested change
- [ ] npm run lint
- [ ] npm run check

Copilot uses AI. Check for mistakes.
@metyatech metyatech added the agent:running Agent is executing this request. label Feb 11, 2026
@metyatech
Copy link
Owner

Agent runner started review follow-up (review) on 2026-02-11T01:39:45.124Z. Concurrency 8.

@metyatech metyatech added agent:failed Agent failed to complete the request. and removed agent:running Agent is executing this request. labels Feb 11, 2026
@metyatech
Copy link
Owner

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

@metyatech metyatech added agent:running Agent is executing this request. and removed agent:failed Agent failed to complete the request. labels Feb 13, 2026
@metyatech
Copy link
Owner

Agent runner started review follow-up (review) on 2026-02-13T08:23:44.172Z. Concurrency 8.

@metyatech metyatech requested a review from Copilot February 13, 2026 08:44
@metyatech metyatech added agent:done Agent completed successfully. and removed agent:running Agent is executing this request. labels Feb 13, 2026
@metyatech
Copy link
Owner

Agent runner completed review follow-up successfully.

Log: D:\ghws\agent-runner\logs\compose-agentsmd-issue-5-1770972159699.log

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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",
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"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",

Copilot uses AI. Check for mistakes.
Comment on lines 49 to 58
"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"
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@metyatech metyatech added agent:running Agent is executing this request. and removed agent:done Agent completed successfully. labels Feb 13, 2026
@metyatech
Copy link
Owner

Agent runner started review follow-up (review) on 2026-02-13T10:32:34.918Z. Concurrency 8.

@metyatech metyatech requested a review from Copilot February 13, 2026 11:20
@metyatech metyatech added agent:done Agent completed successfully. and removed agent:running Agent is executing this request. labels Feb 13, 2026
@metyatech
Copy link
Owner

Agent runner completed review follow-up successfully.

Summary:
PR review comments addressed:

  • Updated CONTRIBUTING.md and README.md to guide contributors to use npm run check.
  • Fixed invalid JSON syntax in README.md example.
  • Improved Markdown formatting in PR and Issue templates.
  • Scoped npm audit in package.json to prevent CI failures from low-priority dev-dependency vulnerabilities.
  • Removed redundant devDependencies from package.json.
  • Verified all changes with npm run check and npm test.
  • Committed and pushed changes to fix/compliance-lint-format.

Tests run: npm run check, npm test (PASS)
Commit hash: e86347781a74d2a138290235334c9f16d9dfd074 (local hash, pushed to origin)

Log: D:\ghws\agent-runner\logs\compose-agentsmd-issue-5-1770981155323.log

@metyatech metyatech added agent:review-followup Managed PR review follow-up is queued. agent:review-followup:waiting Managed PR review follow-up is waiting for idle engine availability. agent:running Agent is executing this request. and removed agent:done Agent completed successfully. agent:review-followup Managed PR review follow-up is queued. agent:review-followup:waiting Managed PR review follow-up is waiting for idle engine availability. labels Feb 17, 2026
@metyatech
Copy link
Owner

Agent runner started review follow-up (review) on 2026-02-17T02:17:12.298Z. Concurrency 8.

@metyatech metyatech requested a review from Copilot February 17, 2026 02:22
@metyatech metyatech added agent:done Agent completed successfully. and removed agent:running Agent is executing this request. labels Feb 17, 2026
@metyatech
Copy link
Owner

Agent runner completed review follow-up successfully.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +135 to +137
npm run check
npm run format
npm run typecheck
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.
Comment on lines +514 to +518
# 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.
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.

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.

Copilot uses AI. Check for mistakes.
@metyatech metyatech added agent:review-followup Managed PR review follow-up is queued. agent:review-followup:waiting Managed PR review follow-up is waiting for idle engine availability. agent:running Agent is executing this request. and removed agent:done Agent completed successfully. agent:review-followup Managed PR review follow-up is queued. agent:review-followup:waiting Managed PR review follow-up is waiting for idle engine availability. labels Feb 17, 2026
@metyatech
Copy link
Owner

Agent runner started review follow-up (review) on 2026-02-17T23:00:05.450Z. Concurrency 8.

@metyatech metyatech added agent:failed Agent failed to complete the request. and removed agent:running Agent is executing this request. labels Feb 17, 2026
@metyatech
Copy link
Owner

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).
The runner will automatically resume at or after that time.

Log: D:\ghws\agent-runner\logs\compose-agentsmd-issue-5-1771369208698.log

@metyatech
Copy link
Owner

Closing: superseded by #9.

@metyatech metyatech closed this Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:failed Agent failed to complete the request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant