bindbox-game/AGENTS.md
win 8d1eef2f7f fix(channel): 修复渠道统计GMV重复计数和商城直购误计入
1. 排除商城直购(source_type=1):GMV和成本过滤条件从IN(1,2,3,4)改为IN(2,3,4)
2. 排除次卡免费使用订单(actual_amount=0):避免购买次卡和使用次卡双重计入GMV
   - source_type=4 一番赏使用次卡:1578单 44032元重复
   - source_type=3 对对碰使用次卡:422单 7042元重复
   - 合计去除51074元虚增GMV(29.1%)
3. 成本过滤条件同步修正:source_type IN(2,3,4),total_amount>0

修正后:GMV从175600降至124527元,毛利率从37.4%回到真实的11.8%
2026-03-16 21:41:39 +08:00

3.0 KiB

bindbox_game

Multi-agent orchestration framework for agentic coding

Project Overview

A Claude Flow powered project

Tech Stack: TypeScript, Node.js Architecture: Domain-Driven Design with bounded contexts

Quick Start

Installation

npm install

Build

npm run build

Test

npm test

Development

npm run dev

Agent Coordination

Swarm Configuration

This project uses hierarchical swarm coordination for complex tasks:

Setting Value Purpose
Topology hierarchical Queen-led coordination (anti-drift)
Max Agents 8 Optimal team size
Strategy specialized Clear role boundaries
Consensus raft Leader-based consistency

When to Use Swarms

Invoke swarm for:

  • Multi-file changes (3+ files)
  • New feature implementation
  • Cross-module refactoring
  • API changes with tests
  • Security-related changes
  • Performance optimization

Skip swarm for:

  • Single file edits
  • Simple bug fixes (1-2 lines)
  • Documentation updates
  • Configuration changes

Available Skills

Use $skill-name syntax to invoke:

Skill Use Case
$swarm-orchestration Multi-agent task coordination
$memory-management Pattern storage and retrieval
$sparc-methodology Structured development workflow
$security-audit Security scanning and CVE detection

Agent Types

Type Role Use Case
researcher Requirements analysis Understanding scope
architect System design Planning structure
coder Implementation Writing code
tester Test creation Quality assurance
reviewer Code review Security and quality

Code Standards

File Organization

  • NEVER save to root folder
  • /src - Source code files
  • /tests - Test files
  • /docs - Documentation
  • /config - Configuration files

Quality Rules

  • Files under 500 lines
  • No hardcoded secrets
  • Input validation at boundaries
  • Typed interfaces for public APIs
  • TDD London School (mock-first) preferred

Commit Messages

<type>(<scope>): <description>

[optional body]

Co-Authored-By: claude-flow <ruv@ruv.net>

Types: feat, fix, docs, style, refactor, perf, test, chore

Security

Critical Rules

  • NEVER commit secrets, credentials, or .env files
  • NEVER hardcode API keys
  • Always validate user input
  • Use parameterized queries for SQL
  • Sanitize output to prevent XSS

Path Security

  • Validate all file paths
  • Prevent directory traversal (../)
  • Use absolute paths internally

Memory System

Storing Patterns

npx @claude-flow/cli memory store \
  --key "pattern-name" \
  --value "pattern description" \
  --namespace patterns

Searching Memory

npx @claude-flow/cli memory search \
  --query "search terms" \
  --namespace patterns