Compare commits
No commits in common. "main" and "implement/hello-world" have entirely different histories.
main
...
implement/
1 changed files with 2 additions and 120 deletions
122
README.md
122
README.md
|
|
@ -1,121 +1,3 @@
|
||||||
# Testbed
|
# testbed
|
||||||
|
|
||||||
This is a test repository for [Fordjent](https://fordjent.wdmn.fr), an AI-powered agent that turns issues into pull requests.
|
Fordjent integration test repo
|
||||||
|
|
||||||
## How to Create Issues for Fordjent
|
|
||||||
|
|
||||||
Fordjent watches for new issues and automatically creates branches, writes code, and opens pull requests. To use it effectively, tag your issues with a **role prefix** so the agent knows what kind of work to perform.
|
|
||||||
|
|
||||||
### Role Tags
|
|
||||||
|
|
||||||
| Tag | Role | Behavior |
|
|
||||||
|-----|------|----------|
|
|
||||||
| `[implementer]` | **Implementer** | Writes code, creates PRs. Best for specific feature requests. |
|
|
||||||
| `[pm]` | **Project Manager** | Decomposes large tasks into smaller labeled issues. Does NOT write code. |
|
|
||||||
| `[reviewer]` | **Reviewer** | Reviews open PRs, suggests fixes, approves or requests changes. |
|
|
||||||
| `[tester]` | **Tester** | Writes tests for existing code, reports bugs. |
|
|
||||||
| `[devops]` | **DevOps** | Sets up CI/CD, Docker, infrastructure. Does not write application code. |
|
|
||||||
|
|
||||||
## Repository Policy (`fordjent-*` Topics)
|
|
||||||
|
|
||||||
You control how much automation Fordjent applies via **repo topics** (Forgejo repo settings → Topics). By default, repos use the safer `plan-first + no-auto-merge` policy. Add an opt-in topic to change behavior.
|
|
||||||
|
|
||||||
| Topic | Policy | Effect |
|
|
||||||
|-------|--------|--------|
|
|
||||||
| (none — default) | `plan-first + no-auto-merge` | Sub-issues cannot be implemented until human adds `plan-approved`. Reviewer cannot auto-merge. |
|
|
||||||
| `fordjent-yolo` | full automation | PM sub-issues fire immediately. Reviewer can auto-merge. Nothing blocks. |
|
|
||||||
| `fordjent-plan-first` | `plan-first` | Sub-issues are created in `planning` state. Human must add `plan-approved` to unblock. |
|
|
||||||
| `fordjent-no-auto-merge` | `no-auto-merge` | Reviewer cannot call `forgejo_merge_pr`. Posts review and waits for human. |
|
|
||||||
| `fordjent-require-review` | `require-review` | PRs must have `approved` label before anyone can merge. |
|
|
||||||
|
|
||||||
Topics can be combined: `fordjent-plan-first` + `fordjent-require-review` = plan approval + PR approval required.
|
|
||||||
|
|
||||||
### The Plan-First Flow (Default)
|
|
||||||
|
|
||||||
With the default policy (plan-first + no-auto-merge):
|
|
||||||
|
|
||||||
1. You create a `[pm]` issue to decompose a feature
|
|
||||||
2. PM analyzes the code and creates `[implementer]` sub-issues in `planning` state
|
|
||||||
3. Sub-issues are blocked — implementation tools cannot write code
|
|
||||||
4. You (human) review the plan and add `plan-approved` label to the parent issue
|
|
||||||
5. Fordjent unblocks all sub-issues (adds `ready`, removes `planning`)
|
|
||||||
6. Implementers pick up the issues, write code, create PRs
|
|
||||||
7. Reviewer posts its review as a comment (cannot auto-merge)
|
|
||||||
8. You (human) add `approved` label to the PR
|
|
||||||
9. Reviewer or you merges
|
|
||||||
|
|
||||||
### The Yolo Flow
|
|
||||||
|
|
||||||
With `fordjent-yolo` topic:
|
|
||||||
|
|
||||||
1. You create a `[pm]` issue
|
|
||||||
2. PM analyzes and creates `[implementer]` sub-issues (automatically unblocked)
|
|
||||||
3. Implementers pick up immediately, write code, create PRs
|
|
||||||
4. Reviewer auto-merges PRs (spot-check code only)
|
|
||||||
|
|
||||||
### Overriding Policy per Repo
|
|
||||||
|
|
||||||
To add a topic to a Forgejo repo:
|
|
||||||
|
|
||||||
1. Go to the repo's **Settings → Topics** tab
|
|
||||||
2. Add a topic like `fordjent-yolo` or `fordjent-plan-first`
|
|
||||||
3. Save
|
|
||||||
|
|
||||||
Topics can be combined: `fordjent-plan-first` + `fordjent-require-review` = both plan approval and PR approval required.
|
|
||||||
|
|
||||||
### Examples
|
|
||||||
|
|
||||||
#### Minimal (yolo)
|
|
||||||
```
|
|
||||||
[implementer] Add a SortDesc function to the utils package
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Plan-first (default)
|
|
||||||
```
|
|
||||||
[pm] Decompose the authentication module into sub-issues
|
|
||||||
```
|
|
||||||
|
|
||||||
Then wait for sub-issues to be created in `planning` state, review the plan, and add `plan-approved` to the parent.
|
|
||||||
|
|
||||||
### Issue Writing Tips
|
|
||||||
|
|
||||||
- **Be specific**: "Add a function `SortDesc(items []string) []string` that sorts in descending order" works much better than "make sorting work".
|
|
||||||
- **Include acceptance criteria**: "The function should pass these test cases: ..."
|
|
||||||
- **One task per issue**: The agent works best with focused, single-purpose issues.
|
|
||||||
- **Mention relevant files**: "Look at `cmd/gogit/main.go` for where to wire this command."
|
|
||||||
|
|
||||||
## FSM Labels
|
|
||||||
|
|
||||||
Fordjent manages these labels automatically. You generally don't need to set them manually:
|
|
||||||
|
|
||||||
| Label | Meaning |
|
|
||||||
|-------|---------|
|
|
||||||
| `planning` | Issue is being analyzed by the PM |
|
|
||||||
| `plan-approved` | Human has approved the plan — unblocks sub-issues |
|
|
||||||
| `implementing` | Agent is actively writing code |
|
|
||||||
| `blocked` | Issue is waiting on a dependency |
|
|
||||||
| `ready` | Issue is unblocked and ready to work on |
|
|
||||||
| `review` | PR is ready for human review |
|
|
||||||
| `approved` | PR has been approved by a human |
|
|
||||||
| `automerge` | Reviewer should merge this PR automatically |
|
|
||||||
| `done` | PR merged, issue closed |
|
|
||||||
|
|
||||||
### Dependency Tracking
|
|
||||||
|
|
||||||
Use `Depends on: #N` in your issue body to declare dependencies. Fordjent's scheduler will automatically unblock issues when their dependencies are merged.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
> This issue depends on the sort function being implemented first.
|
|
||||||
> Depends on: #5
|
|
||||||
|
|
||||||
## Architecture
|
|
||||||
|
|
||||||
- **Forgejo**: https://forgejo.wdmn.fr — Code hosting and issue tracking
|
|
||||||
- **Fordjent**: https://fordjent.wdmn.fr — Agent webhook endpoint
|
|
||||||
- **Status dashboard**: https://fordjent.wdmn.fr/status
|
|
||||||
|
|
||||||
## Repository Setup
|
|
||||||
|
|
||||||
This repo is pre-seeded with `go.mod` and `.gitignore` so that Fordjent's scaffold detection doesn't block the first issue.
|
|
||||||
|
|
||||||
This repo also has the `fordjent-yolo` topic, so all issues get full automation. Remove the topic to use the safer default policy (plan-first + no-auto-merge).
|
|
||||||
Loading…
Reference in a new issue