docs: Update README for WeChat Expansion Pack
This commit updates the documentation for the WeChat Mini-Game expansion pack to reflect the latest refinements. The README.md now includes: - The new `@wechat-game-dev` agent in the components list. - The refined, two-phase quick-start workflow provided by the user, which correctly utilizes the specialized agents.
This commit is contained in:
parent
ab70baca59
commit
314077930e
|
|
@ -0,0 +1,67 @@
|
||||||
|
# BMad Expansion Pack: WeChat Mini-Game Development
|
||||||
|
|
||||||
|
**Version:** 1.1.0
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This expansion pack provides specialized agents, templates, and tasks to accelerate the development of games for the WeChat Mini-Game platform using the BMad Method.
|
||||||
|
|
||||||
|
It is designed to help you plan your game's structure, mechanics, and integration with WeChat's unique social and monetization features, as well as to speed up common development tasks.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
### Specialist Agents
|
||||||
|
|
||||||
|
* **`@wechat-game-designer`**
|
||||||
|
* An expert agent for planning and designing your WeChat mini-game. Its persona is optimized for the technical challenges of the Mini Game platform.
|
||||||
|
* **`@wechat-game-dev`**
|
||||||
|
* A specialized developer agent fluent in the WeChat Mini Game framework, its APIs, and performance optimizations. This agent should be used for all implementation tasks.
|
||||||
|
|
||||||
|
### Document Template
|
||||||
|
|
||||||
|
* **`gdd-wechat-template.yaml`**
|
||||||
|
* A YAML-based template for a Game Design Document that includes special sections for WeChat-specific features like social login, sharing, and monetization.
|
||||||
|
|
||||||
|
### Tasks
|
||||||
|
|
||||||
|
* **`scaffold-wechat-page`**
|
||||||
|
* A task that can be used by the `@wechat-game-dev` agent to quickly create the four necessary files (`.js`, `.wxml`, `.wxss`, `.json`) for a new page in your mini-game.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick-Start Workflow
|
||||||
|
|
||||||
|
### 1. Plan Phase
|
||||||
|
|
||||||
|
1. **Create the Game Design Document:** Use the specialized designer to plan your game (e.g., for a Tetris game).
|
||||||
|
```bash
|
||||||
|
@wechat-game-designer *create-doc {template: 'gdd-wechat-template.yaml', game_name: 'Tetris'}
|
||||||
|
```
|
||||||
|
2. **Shard the GDD:** Use the Product Owner to break the design into actionable stories.
|
||||||
|
```bash
|
||||||
|
@po shard docs/gdd.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Development Phase
|
||||||
|
|
||||||
|
This phase is an iterative cycle for building each feature of your game.
|
||||||
|
|
||||||
|
1. **Initial Scaffolding (Optional):** If you need to create new pages, use the specialized dev agent.
|
||||||
|
```bash
|
||||||
|
@wechat-game-dev *scaffold-wechat-page
|
||||||
|
```
|
||||||
|
2. **Development Cycle:** Repeat the following steps for each story.
|
||||||
|
* **Draft Story:**
|
||||||
|
```bash
|
||||||
|
@sm *draft
|
||||||
|
```
|
||||||
|
* **Implement Story:** Use the specialized developer agent.
|
||||||
|
```bash
|
||||||
|
@wechat-game-dev *develop-story {path/to/story.md}
|
||||||
|
```
|
||||||
|
* **Review Story:** Get a quality review from the Test Architect.
|
||||||
|
```bash
|
||||||
|
@qa *review {path/to/story.md}
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
agent_id: wechat-game-designer
|
||||||
|
name: Wei
|
||||||
|
persona: >
|
||||||
|
You are Wei, an expert Game Designer specializing in the WeChat Mini Game ecosystem.
|
||||||
|
Your expertise includes not only core game design principles (mechanics, loops, balancing)
|
||||||
|
but also the unique technical challenges of this platform. You have a deep understanding of
|
||||||
|
performance trade-offs for canvas-based rendering, common game engines used in the
|
||||||
|
Mini Game environment (like Cocos, LayaAir, and Egret), and best practices for
|
||||||
|
asset loading and memory management. You are familiar with WeChat's APIs, UI/UX
|
||||||
|
conventions, social sharing features, and monetization through WeChat Pay. Your
|
||||||
|
primary goal is to help users create a comprehensive Game Design Document (GDD)
|
||||||
|
that is technically sound and perfectly tailored for a successful WeChat Mini Game.
|
||||||
|
dependencies:
|
||||||
|
templates:
|
||||||
|
- gdd-wechat-template.yaml
|
||||||
|
tasks:
|
||||||
|
- create-doc.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
- Guide users through the creation of a WeChat-specific Game Design Document.
|
||||||
|
- Provide expert advice on integrating WeChat's social and monetization features.
|
||||||
|
- Help define game mechanics that are well-suited for the mini-game platform.
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
agent_id: wechat-game-dev
|
||||||
|
name: Wen
|
||||||
|
persona: >
|
||||||
|
You are Wen, a senior software developer specializing in the WeChat Mini Game framework.
|
||||||
|
You are an expert in writing clean, efficient, and maintainable code using the
|
||||||
|
platform's specific JavaScript environment. You have deep knowledge of the WeChat
|
||||||
|
Mini Game APIs, component-based architecture, performance optimization techniques,
|
||||||
|
and best practices for state management. Your primary role is to take user stories
|
||||||
|
and implement them accurately and robustly.
|
||||||
|
dependencies:
|
||||||
|
tasks:
|
||||||
|
- scaffold-wechat-page.md
|
||||||
|
- execute-checklist.md # A core task for implementing stories
|
||||||
|
---
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
- Implement user stories for WeChat Mini-Games.
|
||||||
|
- Write code that is optimized for the WeChat Mini Game environment.
|
||||||
|
- Use the `scaffold-wechat-page` task to quickly create new pages.
|
||||||
|
- Follow best practices for the platform's lifecycle and state management.
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
# Task: Scaffold New WeChat Mini-Game Page
|
||||||
|
|
||||||
|
**ID:** `scaffold-wechat-page`
|
||||||
|
**Name:** Scaffold WeChat Page
|
||||||
|
**Description:** Creates the standard four files (`.wxml`, `.wxss`, `.js`, `.json`) for a new WeChat mini-game page with basic boilerplate content.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Instructions
|
||||||
|
|
||||||
|
You are the `@dev` agent. Your task is to scaffold a new page for a WeChat Mini-Game.
|
||||||
|
|
||||||
|
1. **Get Page Name:**
|
||||||
|
- Ask the user for the name of the new page (e.g., `index`, `profile`, `level-select`).
|
||||||
|
- The path will be `pages/{{page_name}}/`.
|
||||||
|
|
||||||
|
2. **Create Files:**
|
||||||
|
- Create the following four files within the specified path.
|
||||||
|
|
||||||
|
---
|
||||||
|
**File: `pages/{{page_name}}/index.js`**
|
||||||
|
```javascript
|
||||||
|
// pages/{{page_name}}/index.js
|
||||||
|
Page({
|
||||||
|
data: {},
|
||||||
|
onLoad(options) {},
|
||||||
|
onReady() {},
|
||||||
|
onShow() {},
|
||||||
|
onHide() {},
|
||||||
|
onUnload() {}
|
||||||
|
})
|
||||||
|
```
|
||||||
|
---
|
||||||
|
**File: `pages/{{page_name}}/index.wxml`**
|
||||||
|
```html
|
||||||
|
<!--pages/{{page_name}}/index.wxml-->
|
||||||
|
<view class="container">
|
||||||
|
<text>This is the {{page_name}} page.</text>
|
||||||
|
</view>
|
||||||
|
```
|
||||||
|
---
|
||||||
|
**File: `pages/{{page_name}}/index.wxss`**
|
||||||
|
```css
|
||||||
|
/**pages/{{page_name}}/index.wxss**/
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 200rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
**File: `pages/{{page_name}}/index.json`**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
|
||||||
|
3. **Confirmation:**
|
||||||
|
- Inform the user that the four files for the `{{page_name}}` page have been created successfully.
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
template:
|
||||||
|
id: gdd-wechat-template
|
||||||
|
name: WeChat Mini-Game GDD
|
||||||
|
version: 1.0.0
|
||||||
|
description: A comprehensive Game Design Document tailored for WeChat Mini-Games.
|
||||||
|
output:
|
||||||
|
format: markdown
|
||||||
|
filename: "docs/gdd.md"
|
||||||
|
|
||||||
|
workflow:
|
||||||
|
mode: incremental # Can be 'incremental' or 'rapid'
|
||||||
|
|
||||||
|
sections:
|
||||||
|
- id: header
|
||||||
|
title: Game Design Document - {{game_name}}
|
||||||
|
instruction: "Let's start with the basics. What is the name of your game?"
|
||||||
|
fields:
|
||||||
|
- id: game_name
|
||||||
|
type: text
|
||||||
|
|
||||||
|
- id: overview
|
||||||
|
title: "1. Game Overview"
|
||||||
|
instruction: "Provide a high-level pitch for your game. What's the core concept in a few sentences?"
|
||||||
|
content: |
|
||||||
|
### 1.1. Core Concept
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
### 1.2. Target Audience
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
### 1.3. Unique Selling Points (USPs)
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
- id: core_mechanics
|
||||||
|
title: "2. Core Gameplay & Mechanics"
|
||||||
|
instruction: "Describe the core gameplay loop. What does the player do moment-to-moment? What are the main mechanics (e.g., jumping, matching, building)?"
|
||||||
|
content: |
|
||||||
|
### 2.1. Gameplay Loop
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
### 2.2. Player Actions
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
- id: wechat_integration
|
||||||
|
title: "3. WeChat Platform Integration"
|
||||||
|
instruction: "Now let's focus on the WeChat-specific features. This is crucial for success on the platform."
|
||||||
|
sections:
|
||||||
|
- id: wechat_login
|
||||||
|
title: "3.1. WeChat Login & User Identity"
|
||||||
|
instruction: "How will users log in? Will you just use their basic WeChat profile (avatar, nickname), or do you need more information via `wx.getUserProfile`?"
|
||||||
|
content: |
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
- id: social_sharing
|
||||||
|
title: "3.2. Social Sharing"
|
||||||
|
instruction: "Describe the social sharing features. What content can be shared (e.g., high scores, achievements)? Will there be incentives for sharing?"
|
||||||
|
content: |
|
||||||
|
- **Share to Chat:** {{...}}
|
||||||
|
- **Share to Moments:** {{...}}
|
||||||
|
- **Invite Mechanics:** {{...}}
|
||||||
|
|
||||||
|
- id: monetization
|
||||||
|
title: "3.3. Monetization & WeChat Pay"
|
||||||
|
instruction: "How will the game make money? Will you use banner ads, rewarded video ads, or in-app purchases (IAP) via WeChat Pay for virtual goods?"
|
||||||
|
content: |
|
||||||
|
- **Ad Strategy:** {{...}}
|
||||||
|
- **IAP Catalog:** {{...}}
|
||||||
|
|
||||||
|
- id: ui_ux
|
||||||
|
title: "4. UI/UX & Controls"
|
||||||
|
instruction: "Describe the user interface and controls, keeping in mind the conventions of the WeChat platform."
|
||||||
|
content: |
|
||||||
|
### 4.1. Screen Flow
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
### 4.2. Control Scheme
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
- id: art_sound
|
||||||
|
title: "5. Art & Sound Direction"
|
||||||
|
instruction: "What is the desired visual style and audio theme for the game?"
|
||||||
|
content: |
|
||||||
|
### 5.1. Visual Style
|
||||||
|
{{...}}
|
||||||
|
|
||||||
|
### 5.2. Audio Design
|
||||||
|
{{...}}
|
||||||
Loading…
Reference in New Issue