From f9ad723110f71aadbfa07cd60791432ccbce0e2d Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 02:06:25 +0000 Subject: [PATCH 01/14] feat: add HopCode ECC bundle (.claude/ecc-tools.json) --- .claude/ecc-tools.json | 240 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 .claude/ecc-tools.json diff --git a/.claude/ecc-tools.json b/.claude/ecc-tools.json new file mode 100644 index 00000000000..a2ea14c987a --- /dev/null +++ b/.claude/ecc-tools.json @@ -0,0 +1,240 @@ +{ + "version": "1.3", + "schemaVersion": "1.0", + "generatedBy": "ecc-tools", + "generatedAt": "2026-04-19T02:05:59.884Z", + "repo": "https://github.com/TaimoorSiddiquiOfficial/HopCode", + "profiles": { + "requested": "security", + "recommended": "security", + "effective": "developer", + "requestedAlias": "security", + "recommendedAlias": "security", + "effectiveAlias": "developer" + }, + "requestedProfile": "security", + "profile": "developer", + "recommendedProfile": "security", + "effectiveProfile": "developer", + "tier": "free", + "requestedComponents": [ + "repo-baseline", + "workflow-automation", + "security-audits" + ], + "selectedComponents": [ + "repo-baseline", + "workflow-automation" + ], + "requestedAddComponents": [], + "requestedRemoveComponents": [], + "blockedRemovalComponents": [], + "tierFilteredComponents": [ + "security-audits" + ], + "requestedRootPackages": [ + "runtime-core", + "workflow-pack", + "agentshield-pack" + ], + "selectedRootPackages": [ + "runtime-core", + "workflow-pack" + ], + "requestedPackages": [ + "runtime-core", + "workflow-pack", + "agentshield-pack" + ], + "requestedAddPackages": [], + "requestedRemovePackages": [], + "selectedPackages": [ + "runtime-core", + "workflow-pack" + ], + "packages": [ + "runtime-core", + "workflow-pack" + ], + "blockedRemovalPackages": [], + "tierFilteredRootPackages": [ + "agentshield-pack" + ], + "tierFilteredPackages": [ + "agentshield-pack" + ], + "conflictingPackages": [], + "dependencyGraph": { + "runtime-core": [], + "workflow-pack": [ + "runtime-core" + ] + }, + "resolutionOrder": [ + "runtime-core", + "workflow-pack" + ], + "requestedModules": [ + "runtime-core", + "workflow-pack", + "agentshield-pack" + ], + "selectedModules": [ + "runtime-core", + "workflow-pack" + ], + "modules": [ + "runtime-core", + "workflow-pack" + ], + "managedFiles": [ + ".claude/skills/HopCode/SKILL.md", + ".agents/skills/HopCode/SKILL.md", + ".agents/skills/HopCode/agents/openai.yaml", + ".claude/identity.json", + ".codex/config.toml", + ".codex/AGENTS.md", + ".codex/agents/explorer.toml", + ".codex/agents/reviewer.toml", + ".codex/agents/docs-researcher.toml", + ".claude/homunculus/instincts/inherited/HopCode-instincts.yaml", + ".claude/commands/feature-development-with-tests-and-shared-components.md", + ".claude/commands/infrastructure-or-configuration-update.md", + ".claude/commands/merge-upstream-with-conflict-resolution.md" + ], + "packageFiles": { + "runtime-core": [ + ".claude/skills/HopCode/SKILL.md", + ".agents/skills/HopCode/SKILL.md", + ".agents/skills/HopCode/agents/openai.yaml", + ".claude/identity.json", + ".codex/config.toml", + ".codex/AGENTS.md", + ".codex/agents/explorer.toml", + ".codex/agents/reviewer.toml", + ".codex/agents/docs-researcher.toml", + ".claude/homunculus/instincts/inherited/HopCode-instincts.yaml" + ], + "workflow-pack": [ + ".claude/commands/feature-development-with-tests-and-shared-components.md", + ".claude/commands/infrastructure-or-configuration-update.md", + ".claude/commands/merge-upstream-with-conflict-resolution.md" + ] + }, + "moduleFiles": { + "runtime-core": [ + ".claude/skills/HopCode/SKILL.md", + ".agents/skills/HopCode/SKILL.md", + ".agents/skills/HopCode/agents/openai.yaml", + ".claude/identity.json", + ".codex/config.toml", + ".codex/AGENTS.md", + ".codex/agents/explorer.toml", + ".codex/agents/reviewer.toml", + ".codex/agents/docs-researcher.toml", + ".claude/homunculus/instincts/inherited/HopCode-instincts.yaml" + ], + "workflow-pack": [ + ".claude/commands/feature-development-with-tests-and-shared-components.md", + ".claude/commands/infrastructure-or-configuration-update.md", + ".claude/commands/merge-upstream-with-conflict-resolution.md" + ] + }, + "files": [ + { + "moduleId": "runtime-core", + "path": ".claude/skills/HopCode/SKILL.md", + "description": "Repository-specific Claude Code skill generated from git history." + }, + { + "moduleId": "runtime-core", + "path": ".agents/skills/HopCode/SKILL.md", + "description": "Codex-facing copy of the generated repository skill." + }, + { + "moduleId": "runtime-core", + "path": ".agents/skills/HopCode/agents/openai.yaml", + "description": "Codex skill metadata so the repo skill appears cleanly in the skill interface." + }, + { + "moduleId": "runtime-core", + "path": ".claude/identity.json", + "description": "Suggested identity.json baseline derived from repository conventions." + }, + { + "moduleId": "runtime-core", + "path": ".codex/config.toml", + "description": "Repo-local Codex MCP and multi-agent baseline aligned with ECC defaults." + }, + { + "moduleId": "runtime-core", + "path": ".codex/AGENTS.md", + "description": "Codex usage guide that points at the generated repo skill and workflow bundle." + }, + { + "moduleId": "runtime-core", + "path": ".codex/agents/explorer.toml", + "description": "Read-only explorer role config for Codex multi-agent work." + }, + { + "moduleId": "runtime-core", + "path": ".codex/agents/reviewer.toml", + "description": "Read-only reviewer role config focused on correctness and security." + }, + { + "moduleId": "runtime-core", + "path": ".codex/agents/docs-researcher.toml", + "description": "Read-only docs researcher role config for API verification." + }, + { + "moduleId": "runtime-core", + "path": ".claude/homunculus/instincts/inherited/HopCode-instincts.yaml", + "description": "Continuous-learning instincts derived from repository patterns." + }, + { + "moduleId": "workflow-pack", + "path": ".claude/commands/feature-development-with-tests-and-shared-components.md", + "description": "Workflow command scaffold for feature-development-with-tests-and-shared-components." + }, + { + "moduleId": "workflow-pack", + "path": ".claude/commands/infrastructure-or-configuration-update.md", + "description": "Workflow command scaffold for infrastructure-or-configuration-update." + }, + { + "moduleId": "workflow-pack", + "path": ".claude/commands/merge-upstream-with-conflict-resolution.md", + "description": "Workflow command scaffold for merge-upstream-with-conflict-resolution." + } + ], + "workflows": [ + { + "command": "feature-development-with-tests-and-shared-components", + "path": ".claude/commands/feature-development-with-tests-and-shared-components.md" + }, + { + "command": "infrastructure-or-configuration-update", + "path": ".claude/commands/infrastructure-or-configuration-update.md" + }, + { + "command": "merge-upstream-with-conflict-resolution", + "path": ".claude/commands/merge-upstream-with-conflict-resolution.md" + } + ], + "adapters": { + "claudeCode": { + "skillPath": ".claude/skills/HopCode/SKILL.md", + "identityPath": ".claude/identity.json", + "commandPaths": [ + ".claude/commands/feature-development-with-tests-and-shared-components.md", + ".claude/commands/infrastructure-or-configuration-update.md", + ".claude/commands/merge-upstream-with-conflict-resolution.md" + ] + }, + "codex": { + "configPath": ".codex/config.toml", + "agentsGuidePath": ".codex/AGENTS.md", + "skillPath": ".agents/skills/HopCode/SKILL.md" + } + } +} \ No newline at end of file From 87d8ff83d90feb30e583a64ef94f815627551b5f Mon Sep 17 00:00:00 2001 From: "ecc-tools[bot]" <257055122+ecc-tools[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 02:06:26 +0000 Subject: [PATCH 02/14] feat: add HopCode ECC bundle (.claude/skills/HopCode/SKILL.md) --- .claude/skills/HopCode/SKILL.md | 147 ++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 .claude/skills/HopCode/SKILL.md diff --git a/.claude/skills/HopCode/SKILL.md b/.claude/skills/HopCode/SKILL.md new file mode 100644 index 00000000000..bf2dcd06480 --- /dev/null +++ b/.claude/skills/HopCode/SKILL.md @@ -0,0 +1,147 @@ +```markdown +# HopCode Development Patterns + +> Auto-generated skill from repository analysis + +## Overview + +This skill teaches the core development patterns, coding conventions, and collaborative workflows used in the HopCode TypeScript codebase. It covers how to structure features, manage configuration, handle merges, and write effective tests. The repository is organized into packages, uses conventional commits, and emphasizes modular, well-tested code. + +## Coding Conventions + +- **File Naming:** + Use camelCase for file and folder names. + _Example:_ + ``` + packages/core/src/sharedTypes.ts + packages/webui/src/userProfile.tsx + ``` + +- **Import Style:** + Use relative imports within packages. + _Example:_ + ```typescript + import { getUser } from './userService' + import { SharedType } from '../types/sharedTypes' + ``` + +- **Export Style:** + Use named exports for all modules. + _Example:_ + ```typescript + // userService.ts + export function getUser(id: string) { ... } + + // sharedTypes.ts + export type SharedType = { ... } + ``` + +- **Commit Messages:** + Follow [Conventional Commits](https://www.conventionalcommits.org/) with prefixes like `feat`, `fix`, `perf`, `ci`, and `merge`. + _Example:_ + ``` + feat: add user profile component and shared types + fix: correct import path in auth service + ``` + +## Workflows + +### Feature Development with Tests and Shared Components +**Trigger:** When adding a new feature or capability, especially spanning backend, frontend, and shared code +**Command:** `/new-feature` + +1. Design or update the feature plan or documentation in `docs/plans/*.md`. +2. Implement backend logic or services in `packages/*/src/**/*.ts`. +3. Update or create shared types/interfaces in `packages/*/src/types/**/*.ts`. +4. Implement or update frontend/UI components in `packages/*/src/webview/components/**/*.tsx` or `packages/webui/src/components/**/*.tsx`. +5. Write or update corresponding tests in `*.test.ts` or `*.test.tsx` files. +6. Wire up the feature in main entry points, such as `packages/webui/src/index.ts`. + +_Example:_ +```typescript +// packages/core/src/userService.ts +export function getUser(id: string) { ... } + +// packages/core/src/types/userTypes.ts +export type User = { id: string; name: string } + +// packages/core/src/userService.test.ts +import { getUser } from './userService' +import { describe, it, expect } from 'vitest' + +describe('getUser', () => { + it('returns a user object', () => { + expect(getUser('123')).toHaveProperty('id', '123') + }) +}) +``` + +--- + +### Infrastructure or Configuration Update +**Trigger:** When updating build scripts, CI/CD workflows, or project configuration +**Command:** `/update-config` + +1. Edit configuration or workflow files, such as `package.json` or `.github/workflows/*.yml`. +2. Test changes locally or in CI. +3. Document the rationale in the commit message. + +_Example:_ +```yaml +# .github/workflows/ci.yml +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: npm install + - run: npm test +``` + +--- + +### Merge Upstream with Conflict Resolution +**Trigger:** When syncing the fork with upstream changes while preserving local modifications +**Command:** `/merge-upstream` + +1. Fetch and merge the upstream branch. +2. Resolve file conflicts, especially in shared or heavily modified files. +3. Preserve local branding, architecture, and configuration. +4. Summarize merged features and conflict resolutions in the commit message. + +_Example:_ +```bash +git fetch upstream main +git merge upstream/main +# Resolve conflicts in packages/core/src/sharedTypes.ts, etc. +git commit -m "merge: sync with upstream and resolve shared type conflicts" +``` + +## Testing Patterns + +- **Framework:** [Vitest](https://vitest.dev/) +- **Test File Pattern:** Files ending with `.test.ts` or `.test.tsx` +- **Placement:** Tests are located alongside implementation files or in dedicated test directories. + +_Example:_ +```typescript +// packages/webui/src/components/button.test.tsx +import { render } from '@testing-library/react' +import { Button } from './button' + +describe('Button', () => { + it('renders with label', () => { + const { getByText } = render(