Skip to content

chore: set up Claude (superpowers) collaboration infrastructure#1360

Merged
33cn merged 5 commits into
masterfrom
chore/setup-claude-collaboration
May 19, 2026
Merged

chore: set up Claude (superpowers) collaboration infrastructure#1360
33cn merged 5 commits into
masterfrom
chore/setup-claude-collaboration

Conversation

@vipwzw
Copy link
Copy Markdown
Collaborator

@vipwzw vipwzw commented May 19, 2026

Summary

  • Add CLAUDE.md with chain33-specific conventions for AI-assisted development (Makefile-wrapped git workflow, $GOPATH constraint, layered map of the 18 code modules, testing discipline, pitfall list)
  • Add .claude/settings.json with a team-shared Claude Code permission allowlist (45 entries: make / go / git-read / search / gh-read). Commands that mutate shared state — git push, make push/sync, gh pr create, git reset --hard, rm, make docker — stay outside the allowlist and continue to prompt
  • Add docs/superpowers/ scaffolding: 1-page README describing the brainstorm → spec → plan → execute → verify workflow, plus specs/ and plans/ directories. This PR's own design spec and implementation plan are committed as the first occupants
  • Adjust .gitignore so .claude/settings.json (team config) is tracked while .claude/settings.local.json (personal overrides) stays ignored; also properly ignores coverage_*.out and build/coverage/ test artifacts

Explicitly out of scope (per spec § 2.2): hooks, custom agents in .claude/agents/, and CONTRIBUTING-WITH-CLAUDE.md — to be added if real pain points emerge after 1-2 months of use, not speculatively.

Test Plan

  • CLAUDE.md auto-loads in a new Claude Code session opened in this repo
  • Common make commands (make test, make linter, make fmt, make race, make depends) no longer prompt for permission
  • git push, make push, git reset --hard still prompt every time
  • After make test or make coverage, git status does NOT show coverage_*.out or build/coverage/
  • .claude/settings.local.json (if a developer creates one) is git-ignored
  • All 12 make commands referenced in CLAUDE.md exist in Makefile (verified by acceptance script in plan § Task 4.5)

Notes for reviewers

  • 5 commits, logically grouped (scaffolding → CLAUDE.md → review fix → settings/gitignore → final cleanup)
  • Zero Go files touched — build cannot have been broken by this work
  • Design spec and implementation plan are checked in alongside the deliverables; future spec/plan workflow output will land in the same place

🤖 Generated with Claude Code

king and others added 5 commits May 19, 2026 10:30
Establish docs/superpowers/ as the standard location for design specs
and implementation plans produced via the Claude + superpowers workflow.

- README.md explains the brainstorm → spec → plan → execute → verify flow
- specs/ and plans/ subdirectories with .gitkeep placeholders
- Include the spec and plan for this Claude collaboration setup itself

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Document chain33-specific conventions Claude (and humans new to the
codebase) need to know: Makefile-wrapped git workflow, GOPATH path
constraint, GOPROXY for CN users, layered module map, testing
discipline, and pitfall list.

The conventions cover the chain33 specifics that aren't visible from
code alone — for instance, `make branch` / `make push` wrap git,
`types/*.pb.go` shouldn't be hand-edited, and `.travis.yml` /
`.gitlab-ci.yml` should not be touched without confirmation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two corrections from code review of the initial CLAUDE.md commit:

- 模块计数:目录速查列了 18 个代码模块,文首误标为 19;修正
  并说明 build/ 与 docs/ 不算代码模块
- gg18 TSS 实际位于 system/crypto/tss/gg18/,不在 p2p/ 下;
  移除 p2p 段的错误括注,改在 system/ 段补充指引

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add team-shared Claude Code permissions for chain33. Allowlist covers:
- make targets that are read-only or safely scoped (test, race, lint,
  coverage, fmt, depends, build, cli) — excludes push/sync/docker
- go subcommands that don't mutate remote state
- git read-only commands (status, diff, log, show, blame)
- search/navigation utilities (ls, find, grep, rg, wc, file)
- gh read commands (pr/issue/run view & list)

Commands that mutate shared state (git push, make push, gh pr create,
git reset --hard) stay outside the allowlist and prompt every time.

Adjust .gitignore so .claude/settings.json (team config) is tracked
while .claude/settings.local.json (personal overrides) stays ignored.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Three small corrections from the final code review:

- Add coverage_*.out and build/coverage/ to .gitignore so the claim in
  CLAUDE.md ("已在 .gitignore") becomes factually true; also stops these
  test artifacts from cluttering `git status`.
- Align workflow stage naming: CLAUDE.md said "TDD" where the rest of
  the docs say "execute"; change to "execute(TDD)" to keep TDD visible
  while matching docs/superpowers/README.md.
- Add a back-reference from docs/superpowers/README.md to CLAUDE.md so
  contributors landing on the README know where the entry point is.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@33cn 33cn merged commit fd892c9 into master May 19, 2026
29 of 31 checks passed
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