Skip to content

Feat/opencode support#60

Open
KBryan wants to merge 2 commits into
0xPolygon:mainfrom
KBryan:feat/opencode-support
Open

Feat/opencode support#60
KBryan wants to merge 2 commits into
0xPolygon:mainfrom
KBryan:feat/opencode-support

Conversation

@KBryan

@KBryan KBryan commented Mar 12, 2026

Copy link
Copy Markdown

Work Done:

Add modular opencode configuration for improved AI agent integration:

  • .opencode/config.json - main configuration with project metadata
  • AGENTS.md - comprehensive agent instructions at repo root
  • .opencode/tasks/ - 4 reusable task definitions:
    • build.json - build all packages
    • typecheck.json - TypeScript type checking
    • lint.json - linting and formatting checks
    • cli-dev.json - run CLI in development mode
  • .opencode/workflows/ - 2 workflow compositions:
    • ci.json - full CI pipeline (typecheck + lint + build)
    • new-command.json - interactive new command creation
  • .opencode/README.md - documentation for extending config.

The modular structure allows easy updates by:

  • Separating individual tasks into reusable JSON files
  • Composing workflows from existing tasks
  • Providing clear documentation for future extensions
    This setup enables running: opencode task and opencode workflow
    for common development operations."

KBryan added 2 commits March 12, 2026 08:12
Add modular opencode configuration for improved AI agent integration:
- .opencode/config.json - main configuration with project metadata
- AGENTS.md - comprehensive agent instructions at repo root
- .opencode/tasks/ - 4 reusable task definitions:
  - build.json - build all packages
  - typecheck.json - TypeScript type checking
  - lint.json - linting and formatting checks
  - cli-dev.json - run CLI in development mode
- .opencode/workflows/ - 2 workflow compositions:
  - ci.json - full CI pipeline (typecheck + lint + build)
  - new-command.json - interactive new command creation
- .opencode/README.md - documentation for extending config
The modular structure allows easy updates by:
- Separating individual tasks into reusable JSON files
- Composing workflows from existing tasks
- Providing clear documentation for future extensions
This setup enables running: opencode task <name> and opencode workflow <name>
for common development operations."
Add test suite for opencode configuration files:
- .opencode//config.test.js - test runner with 6 test cases:
  - Validates config.json structure and required fields
  - Verifies AGENTS.md exists at repository root
  - Checks all task files are valid JSON with required properties
  - Validates workflow files (supports both task-based and prompt-based)
  - Ensures workflows only reference existing tasks
  - Confirms README.md documentation exists
- package.json - add test scripts:
  - \"test\": runs opencode config tests
  - \"test:opencode\": specific script for opencode tests
Tests can be run with: pnpm test, pnpm run test:opencode, or node directly
The test suite ensures configuration integrity and prevents broken
references when adding new tasks or agent workflows."
@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown

Code review

Found 4 issues. Checked for bugs and CLAUDE.md compliance.

1. Bug: test script overwrites workspace-wide test runner (package.json:15)
On main, this script is pnpm -r --if-present run test which recursively runs tests across all workspace packages. Replacing it with the opencode config validator means pnpm test at the repo root will no longer execute any real project tests. The test:opencode alias on the next line already provides a dedicated way to run these config checks.

2. CLAUDE.md violation: node instead of tsx (AGENTS.md:42)
CLAUDE.md states tsx packages/polygon-agent-cli/src/index.ts runs the CLI directly from source (tsx handles .js to .ts remapping for workspace packages). Using bare node will not handle this remapping.

3. Factual inaccuracy: stale references (AGENTS.md:9-13)
packages/connector-ui/ does not exist (renamed to packages/agentconnect-ui/). dapp-client.ts no longer exists in src/lib/ (replaced by oms-client.ts in V3 OMS migration). Commands list is missing polymarket.ts. Per team standards: reference file paths, never enumerate contents.

4. Team standard: missing changeset (package.json:16)
This repo uses @changesets/cli with release and ci:publish scripts. Per team standards: Include changesets for workspace package modifications. This PR modifies the root package.json scripts but does not include a changeset file in .changeset/.

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.

1 participant