WFGY/CONTRIBUTING.md
2025-07-28 13:39:06 +08:00

115 lines
4.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Contributing to **WFGY**
Thank you for helping push semantic reasoning forward!
This guide merges the original workflow with our new FailureTrace and ProblemPage pipelines.
---
## 1 · Reporting Issues
| Step | Detail |
|------|--------|
| 1 Search first | Avoid duplicates—check Issues & Discussions. |
| 2 Pick a template | **Bug / Feature** or **💥Failure Trace**. |
| 3 Provide essentials | • Clear description• Steps to reproduce• Environment (Python3.10, OS, model, WFGY version). |
| 4 Security | Found a vulnerability? Follow `SECURITY.md`; do **not** post details publicly. |
---
## 2 · Failure Trace Workflow (New!)
> **Goal:** capture real prompts / responses that still break WFGY and add them to regression tests.
1. Select **💥Failure Trace** template when opening an Issue.
2. Paste **520 lines** of promptresponse log.
3. Pick the closest **Problem Category** (RAG, MultiAgent, Symbolic, …).
4. Optional: add framework info (LangChain, AutoGen, etc.).
5. Well tag the trace, reproduce it, and add tests / docs.
---
## 3 · Fork & Local Setup
```bash
git clone https://github.com/onestardao/WFGY.git
cd WFGY
python -m venv venv # Python ≥ 3.10
source venv/bin/activate # macOS / Linux
# .\venv\Scripts\Activate.ps1 # Windows
pip install -r requirements.txt
git checkout -b feature/<slug>
````
---
## 4 · Adding / Updating Code
| Task | Command |
| ----------- | ----------------------------------------- |
| Format code | `black .` & `isort .` |
| Run tests | `pytest tests/` |
| Precommit | `pre-commit run --all-files` (if enabled) |
| Add dep | Update `requirements.txt` + note in PR |
---
## 5 · Adding a **Problem Page** (Map entry)
1. Copy `/ProblemMap/_template.md` (or any existing page).
2. Fill the **eightsection** structure: Intro → Root Cause → WFGY Fix → Demo → CheatSheet → Status → Tips → QuickStart.
3. Place under the correct folder, e.g.
* `ProblemMap/multi-agent-chaos/new-issue.md`
4. Add at least **one regression trace** under `/tests/failure-traces/<slug>.txt`.
5. Update the relevant Specialized Map table (`Multi-Agent_Problems.md`) with the new row.
---
## 6 · Submitting a Pull Request
| Item | Detail |
| ----------------- | --------------------------------------------------------------------- |
| **Title** | `Add: <feature>` or `Fix: <bug>` |
| **Description** | Motivation · summary · test steps · `Closes #<issue>` |
| **Target branch** | `main` |
| **Checklist** | Tests pass · docs updated · minimal commits (squash/rebase as needed) |
A **PR template** autoloads—fill the checkboxes before requesting review.
---
## 7 · Documentation & Release Notes
* Update any affected docs (`README`, examples, API) **in the same PR**.
* Maintainers handle version tags; open an Issue titled `[Release Candidate]` if you think a new release is ready.
---
## 8 · Communication Channels
| Channel | Use |
| ---------------------- | ----------------------------------------------------------------------- |
| **GitHub Discussions** | Q\&A, FailureTrace sharing, design RFCs |
| **Telegram** | Quick chat with @PSBigBig |
| **Email** | [hello@onestardao.com](mailto:hello@onestardao.com) for private matters |
Follow the **Code of Conduct**—be respectful.
---
## 9 · Large or Breaking Changes
* Open an **RFC Issue** before coding large refactors.
* Mark the PR as **Draft / WIP** until consensus is met.
* Label accordingly (`architecture`, `breakingchange`).
---
## 10 · Acknowledgements
Every PR—docs, code, examples, bug reports—moves WFGY closer to bulletproof reasoning.
Drop a ⭐ if this repo helps you; it fuels the next feature.
**Thank you for contributing!**