Skip to content

Add lint script and CLAUDE.md for autonomous workflow#2

Merged
conorbronsdon merged 5 commits into
mainfrom
claude/autonomous-setup
Apr 23, 2026
Merged

Add lint script and CLAUDE.md for autonomous workflow#2
conorbronsdon merged 5 commits into
mainfrom
claude/autonomous-setup

Conversation

@conorbronsdon

@conorbronsdon conorbronsdon commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds lint script (tsc --noEmit) for fast local type-checking (CI's build step already runs tsc with emit, so no separate lint step is needed in CI)
  • Creates CLAUDE.md with architecture docs and agent contribution rules

Part of autonomous repo setup.

Test plan

  • CI passes (build + test) on Node 20 and 22
  • npm run lint succeeds locally
  • CLAUDE.md renders correctly

Add type-checking step to CI pipeline and project documentation
to support autonomous agent development with clear contribution rules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

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 adds a TypeScript type-check “lint” step to the project’s CI pipeline and introduces a CLAUDE.md file describing repo architecture and autonomous/agent contribution workflow.

Changes:

  • Add npm run lint script (tsc --noEmit) for type-checking.
  • Run the new lint step in GitHub Actions CI (Node 20/22).
  • Add CLAUDE.md with architecture notes, constraints, and agent workflow rules.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
package.json Adds lint script to run TypeScript type-checking without emitting artifacts.
.github/workflows/ci.yml Inserts npm run lint into the CI job before build/test across Node 20 and 22.
CLAUDE.md Adds agent-facing documentation: architecture map, constraints, dev commands, and workflow rules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md Outdated
@@ -0,0 +1,37 @@
# substack-mcp

MCP server for Substack — read posts, manage drafts, create notes. No publish or delete by design.

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

The intro line says "No publish or delete by design", but this repo does publish Substack Notes immediately (e.g., create_note / create_note_with_link in src/server.ts and README). This wording is misleading for agents; consider clarifying it to "cannot publish or delete posts" while calling out that notes are published immediately.

Copilot uses AI. Check for mistakes.
Comment thread CLAUDE.md Outdated
Comment on lines +14 to +16
## Key constraints
- Read and draft operations only — no publish or delete capabilities by design
- Uses `connect.sid` session cookie for auth (not `substack.sid` on custom domains)

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

In "Key constraints", the bullets claim there are no publish capabilities and that auth uses connect.sid (not substack.sid on custom domains). The implementation actually sends both cookies (connect.sid and substack.sid) and the server does publish notes immediately. Please update these bullets to match the current behavior so agent guidance is accurate.

Copilot uses AI. Check for mistakes.
… auth

- Intro: clarify that notes publish immediately (Substack has no
  note-draft state), while posts remain read/draft-only
- Key constraints: split the publish bullet (posts vs notes) and
  correct the auth bullet — client sends both connect.sid and
  substack.sid cookies set to the same session token

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

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 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run lint

Copilot AI Apr 23, 2026

Copy link

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 lint (tsc --noEmit) and then npm run build (tsc). Since tsc already type-checks and fails the job on TS errors, this adds a second full compile and will slow CI. Consider keeping the lint script for local usage but removing the CI lint step, or alternatively making build include --noEmitOnError and relying on the build step for type-checking.

Suggested change
- run: npm run lint

Copilot uses AI. Check for mistakes.
npm run build already runs tsc (with emit), which fails on type
errors same as tsc --noEmit. Keeping npm run lint in package.json
for fast local type-checking without emitting build artifacts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

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 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md Outdated

## Agent workflow
- Always work on a branch. Never push directly to main.
- Create PRs targeting main. CI must pass (lint + build + test on Node 20 and 22).

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

CLAUDE.md states CI must pass “lint + build + test”, but the current CI workflow (.github/workflows/ci.yml) only runs npm run build and npm test (no lint step). Either update the workflow to run npm run lint (as described in the PR summary) or adjust this documentation line to match reality.

Copilot uses AI. Check for mistakes.
After dropping the redundant lint step from CI, CLAUDE.md still
claimed CI ran "lint + build + test". Correct it to "build + test"
and call out that local lint remains available as a faster
type-check during development.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

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 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
},
"scripts": {
"build": "tsc",
"lint": "tsc --noEmit",

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

PR description says a CI step was added for type-checking/lint, but the current GitHub Actions workflow only runs npm run build and npm test and does not call npm run lint. Either update the workflow to run the new lint script (or replace the build step if appropriate), or adjust the PR description/docs to match actual CI behavior.

Copilot uses AI. Check for mistakes.

Copilot AI left a comment

Copy link
Copy Markdown

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 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines 10 to 12
"build": "tsc",
"lint": "tsc --noEmit",
"test": "vitest run",

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

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

PR title mentions adding lint to CI, but this change only adds a local lint script; the CI workflow still runs npm run build and npm test without a lint step. Consider updating the PR title/description to match the actual change, or add npm run lint to CI if that’s the intent.

Copilot uses AI. Check for mistakes.
@conorbronsdon conorbronsdon changed the title Add lint to CI and CLAUDE.md for autonomous workflow Add lint script and CLAUDE.md for autonomous workflow Apr 23, 2026
@conorbronsdon conorbronsdon requested a review from Copilot April 23, 2026 21:07

Copilot AI left a comment

Copy link
Copy Markdown

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 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@conorbronsdon conorbronsdon merged commit 97486b0 into main Apr 23, 2026
10 checks passed
@conorbronsdon conorbronsdon deleted the claude/autonomous-setup branch April 23, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants