Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 785ec52912 | |||
| bb428fc69b |
@@ -10,13 +10,13 @@ description: >
|
||||
mode: all
|
||||
hidden: false
|
||||
temperature: 0.1
|
||||
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
|
||||
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
|
||||
reasoningEffort: "high"
|
||||
# All worker type agents use the following color
|
||||
color: "#00FF00"
|
||||
permission:
|
||||
"glob": allow
|
||||
"grep": allow
|
||||
# Block whatever we don't explicitly allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
|
||||
# This agent only needs to call one subagent
|
||||
@@ -24,75 +24,15 @@ permission:
|
||||
|
||||
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
"/app/**": deny
|
||||
"/tmp/*": allow
|
||||
edit:
|
||||
"a**": deny
|
||||
"b**": deny
|
||||
"c**": deny
|
||||
"d**": deny
|
||||
"e**": deny
|
||||
"f**": deny
|
||||
"g**": deny
|
||||
"h**": deny
|
||||
"i**": deny
|
||||
"j**": deny
|
||||
"k**": deny
|
||||
"l**": deny
|
||||
"m**": deny
|
||||
"n**": deny
|
||||
"o**": deny
|
||||
"p**": deny
|
||||
"q**": deny
|
||||
"r**": deny
|
||||
"s**": deny
|
||||
"t**": deny
|
||||
"u**": deny
|
||||
"v**": deny
|
||||
"w**": deny
|
||||
"x**": deny
|
||||
"y**": deny
|
||||
"z**": deny
|
||||
"A**": deny
|
||||
"B**": deny
|
||||
"C**": deny
|
||||
"D**": deny
|
||||
"E**": deny
|
||||
"F**": deny
|
||||
"G**": deny
|
||||
"H**": deny
|
||||
"I**": deny
|
||||
"J**": deny
|
||||
"K**": deny
|
||||
"L**": deny
|
||||
"M**": deny
|
||||
"N**": deny
|
||||
"O**": deny
|
||||
"P**": deny
|
||||
"Q**": deny
|
||||
"R**": deny
|
||||
"S**": deny
|
||||
"T**": deny
|
||||
"U**": deny
|
||||
"V**": deny
|
||||
"W**": deny
|
||||
"X**": deny
|
||||
"Y**": deny
|
||||
"Z**": deny
|
||||
"1**": deny
|
||||
"2**": deny
|
||||
"3**": deny
|
||||
"4**": deny
|
||||
"5**": deny
|
||||
"6**": deny
|
||||
"7**": deny
|
||||
"8**": deny
|
||||
"9**": deny
|
||||
"0**": deny
|
||||
"/app/**": deny
|
||||
"/tmp/**": allow
|
||||
"*": deny
|
||||
"/tmp/*": allow
|
||||
write:
|
||||
"*": deny
|
||||
"/tmp/*": allow
|
||||
read:
|
||||
"**": allow
|
||||
"*": allow
|
||||
|
||||
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
|
||||
"sequential-thinking*": allow
|
||||
@@ -106,11 +46,9 @@ permission:
|
||||
bash:
|
||||
# All agents should start with deny and then add in as needed
|
||||
"*": deny
|
||||
"echo *": allow
|
||||
"cat *": allow
|
||||
"echo $*": allow
|
||||
"printenv *": allow
|
||||
"git -C * remote get-url origin": allow
|
||||
"git remote get-url origin": allow
|
||||
|
||||
# This is where we edit the permissions on an as-needed per-agent basis
|
||||
"git -C /tmp/*": allow
|
||||
@@ -131,15 +69,10 @@ permission:
|
||||
"*api/v1/orgs/*/labels*": deny
|
||||
"*api/v1/repos/*/labels*": deny
|
||||
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
|
||||
|
||||
"sudo *": deny
|
||||
# CRITICAL: No direct HTTP calls to the OpenCode server
|
||||
"curl*localhost:4096*": deny
|
||||
"curl*127.0.0.1:4096*": deny
|
||||
|
||||
"*force_merge*": deny
|
||||
"*sudo*": deny
|
||||
|
||||
# All the subagents you want this agent to have access to
|
||||
task:
|
||||
# All agents should start with deny and only enable what you need
|
||||
@@ -175,9 +108,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
|
||||
Startup steps:
|
||||
|
||||
1. Parse and validate prompt parameters
|
||||
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward to subagents. Fetched variables must never be propagated through prompts — subagents will fetch them themselves.
|
||||
3. If any required parameters are missing or malformed, exit immediately and report the error
|
||||
4. Proceed to the main task
|
||||
2. If any required parameters are missing or malformed, exit immediately and report the error
|
||||
3. Proceed to the main task
|
||||
|
||||
### Main task
|
||||
|
||||
@@ -191,23 +123,14 @@ Choose the appropriate procedure based on `review_type`:
|
||||
|
||||
Entered when `review_type` is `ci_flag`. This is a lightweight review that only flags the missing CI checks. No full code review is performed.
|
||||
|
||||
1. **Read the PR.** GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/pulls/{pr_number}` — read title, body, labels, milestone, and linked issues. Note the branch name and head SHA for the notification.
|
||||
|
||||
2. **Post review-started notification.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/issues/{pr_number}/comments` announcing that a review has started. The comment must include:
|
||||
- The PR title, branch name, head SHA, and review type ("CI Check Flag")
|
||||
- A message informing the PR author that the bot is reviewing their pull request to verify CI configuration
|
||||
- Markdown formatting for readability (headings, bold text)
|
||||
- An ETA indication (e.g., "This lightweight review should complete within a few minutes")
|
||||
- The Bot Signature footer (see "Bot Signature" section below)
|
||||
|
||||
3. **Submit REQUEST_CHANGES review.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/pulls/{pr_number}/reviews` with:
|
||||
1. **Submit REQUEST_CHANGES review.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/pulls/{pr_number}/reviews` with:
|
||||
- `event`: `"REQUEST_CHANGES"`
|
||||
- `body`: A message explaining that no CI checks have been reported for this PR. Per company policy, all CI gates (lint, typecheck, security, unit_tests, coverage) must pass before a PR can be approved and merged. Request the author to ensure CI is configured and passing. Note that a full code review will be conducted once CI checks are in place.
|
||||
- Use authentication: `Authorization: token {forgejo_pat}`
|
||||
|
||||
4. **Post the bot signature comment** (see "Bot Signature" section below).
|
||||
2. **Post the bot signature comment** (see "Bot Signature" section below).
|
||||
|
||||
5. **Exit.**
|
||||
3. **Exit.**
|
||||
|
||||
#### Re-Review Mode
|
||||
|
||||
@@ -221,40 +144,33 @@ Entered when `review_type` is `re_review`. The PR previously received `REQUEST_C
|
||||
|
||||
4. **Read all PR comments.** GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/issues/{pr_number}/comments?limit=50&page=N` — paginate fully. This captures any discussion context beyond formal reviews.
|
||||
|
||||
5. **Post review-started notification.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/issues/{pr_number}/comments` announcing that a review has started. The comment must include:
|
||||
- The PR title, branch name, head SHA, and review type ("Re-Review")
|
||||
- A message informing the PR author that the bot is reviewing their pull request
|
||||
- A note that this is a re-review to verify previously requested changes have been addressed
|
||||
- Markdown formatting for readability (headings, bold text)
|
||||
- The Bot Signature footer (see "Bot Signature" section below)
|
||||
5. **Check CI status.** GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/commits/{head_sha}/status` — note the combined state. If CI is failing, GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/commits/{head_sha}/statuses?limit=50&page=N` to identify which checks failed.
|
||||
|
||||
6. **Check CI status.** GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/commits/{head_sha}/status` — note the combined state. If CI is failing, GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/commits/{head_sha}/statuses?limit=50&page=N` to identify which checks failed.
|
||||
6. **Create isolated clone.** Call `git-isolator-util` with `create_branch: false` and `branch: {branch_name}` (the PR's head branch). See Subagents section for prompt template.
|
||||
|
||||
7. **Create isolated clone.** Call `git-isolator-util` with `create_branch: false` and `branch: {branch_name}` (the PR's head branch). See Subagents section for prompt template.
|
||||
7. **Read the diff.** In the cloned repo, run `git -C {repo_dir} diff master...HEAD` to see all changes introduced by the PR. For large diffs, also run `git -C {repo_dir} diff --stat master...HEAD` for an overview.
|
||||
|
||||
8. **Read the diff.** In the cloned repo, run `git -C {repo_dir} diff master...HEAD` to see all changes introduced by the PR. For large diffs, also run `git -C {repo_dir} diff --stat master...HEAD` for an overview.
|
||||
8. **Verify previous feedback was addressed.** For each `REQUEST_CHANGES` review comment from step 3, check whether the specific concern was resolved in the current code. Track which items are addressed and which are not.
|
||||
|
||||
9. **Verify previous feedback was addressed.** For each `REQUEST_CHANGES` review comment from step 3, check whether the specific concern was resolved in the current code. Track which items are addressed and which are not.
|
||||
9. **Conduct full review.** Evaluate the PR against the 10-category review checklist (see "Review Checklist" section). Examine each changed file in context — read surrounding code as needed to understand the full picture.
|
||||
|
||||
10. **Conduct full review.** Evaluate the PR against the 10-category review checklist (see "Review Checklist" section). Examine each changed file in context — read surrounding code as needed to understand the full picture.
|
||||
|
||||
11. **Determine review outcome.** Based on your evaluation:
|
||||
10. **Determine review outcome.** Based on your evaluation:
|
||||
- **APPROVED**: All previous feedback was addressed, all checklist categories pass, CI is green (or CI issues are already known and not introduced by this PR). No blocking issues found.
|
||||
- **REQUEST_CHANGES**: Any previous feedback was NOT addressed, OR any checklist category has blocking issues, OR CI is failing with issues introduced by this PR. Include specific inline comments for every blocking issue.
|
||||
- **COMMENT**: All previous feedback was addressed but there are non-blocking suggestions for improvement. No blocking issues, but useful observations to share.
|
||||
|
||||
12. **Submit the formal review.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/pulls/{pr_number}/reviews` with:
|
||||
11. **Submit the formal review.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/pulls/{pr_number}/reviews` with:
|
||||
- `event`: The outcome from step 10 (`"APPROVED"`, `"REQUEST_CHANGES"`, or `"COMMENT"`)
|
||||
- `body`: A summary of the review covering: which prior feedback items were addressed, overall code quality assessment, and any new findings
|
||||
- `comments`: Array of inline comments (for `REQUEST_CHANGES` and `COMMENT` reviews) with `path`, `body`, and `new_position` for each
|
||||
- `commit_id`: `{head_sha}` — anchor the review to the current commit
|
||||
- Use authentication: `Authorization: token {forgejo_pat}`
|
||||
|
||||
13. **Post the bot signature comment** (see "Bot Signature" section below).
|
||||
12. **Post the bot signature comment** (see "Bot Signature" section below).
|
||||
|
||||
14. **Clean up.** `rm -rf {repo_dir}`
|
||||
13. **Clean up.** `rm -rf {repo_dir}`
|
||||
|
||||
15. **Exit.**
|
||||
14. **Exit.**
|
||||
|
||||
#### First Review Mode
|
||||
|
||||
@@ -266,33 +182,26 @@ Entered when `review_type` is `first_review`. The PR has no active review feedba
|
||||
|
||||
3. **Read all PR comments.** GET `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/issues/{pr_number}/comments?limit=50&page=N` — paginate fully. Check for any informal discussion context.
|
||||
|
||||
4. **Post review-started notification.** POST `{forgejo_url}/api/v1/repos/{forgejo_owner}/{forgejo_repo}/issues/{pr_number}/comments` announcing that a review has started. The comment must include:
|
||||
- The PR title, branch name, head SHA, and review type ("First Review")
|
||||
- A message informing the PR author that the bot is conducting their first review of this pull request
|
||||
- Markdown formatting for readability (headings, bold text)
|
||||
- An indication that a full code review will follow against the 10-category checklist
|
||||
- The Bot Signature footer (see "Bot Signature" section below)
|
||||
4. **Check CI status.** Same as Re-Review Mode step 5.
|
||||
|
||||
5. **Check CI status.** Same as Re-Review Mode step 6.
|
||||
5. **Create isolated clone.** Same as Re-Review Mode step 6.
|
||||
|
||||
6. **Create isolated clone.** Same as Re-Review Mode step 7.
|
||||
6. **Read the diff.** Same as Re-Review Mode step 7.
|
||||
|
||||
7. **Read the diff.** Same as Re-Review Mode step 8.
|
||||
7. **Conduct full review.** Evaluate the PR against the 10-category review checklist (see "Review Checklist" section). Examine each changed file in context — read surrounding code as needed to understand the full picture.
|
||||
|
||||
8. **Conduct full review.** Evaluate the PR against the 10-category review checklist (see "Review Checklist" section). Examine each changed file in context — read surrounding code as needed to understand the full picture.
|
||||
|
||||
9. **Determine review outcome.** Based on your evaluation:
|
||||
8. **Determine review outcome.** Based on your evaluation:
|
||||
- **APPROVED**: All checklist categories pass, CI is green (or CI issues are not introduced by this PR). No blocking issues found.
|
||||
- **REQUEST_CHANGES**: Any checklist category has blocking issues, OR CI is failing with issues introduced by this PR. Include specific inline comments for every blocking issue. Be constructive — explain WHY something is a problem and suggest HOW to fix it.
|
||||
- **COMMENT**: No blocking issues but useful observations, suggestions, or questions to share. Use this when the code is acceptable but could be improved.
|
||||
|
||||
10. **Submit the formal review.** Same as Re-Review Mode step 12.
|
||||
9. **Submit the formal review.** Same as Re-Review Mode step 11.
|
||||
|
||||
11. **Post the bot signature comment** (see "Bot Signature" section below).
|
||||
10. **Post the bot signature comment** (see "Bot Signature" section below).
|
||||
|
||||
12. **Clean up.** `rm -rf {repo_dir}`
|
||||
11. **Clean up.** `rm -rf {repo_dir}`
|
||||
|
||||
13. **Exit.**
|
||||
12. **Exit.**
|
||||
|
||||
### Review Checklist
|
||||
|
||||
@@ -375,8 +284,6 @@ The following represents all variables this agent works with:
|
||||
|
||||
**CRITICAL:** It is important to note that parameters given explicitly in the prompt always override those that are fetched or come from environment variables. However when a variable can be determined both through environment variables or fetching (not explicitly provided in the prompt) then consult the details the section titled "Parameters to fetch" to determine if the environment variable takes precedence or not.
|
||||
|
||||
**CRITICAL — Explicit vs Fetched Variables:** When constructing prompts for subagents (`git-isolator-util`), only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Subagents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
|
||||
|
||||
### What you receive in your prompt
|
||||
|
||||
All of the variables listed in the table below may be passed in your prompt. Some are required and some are optional. If a required parameter is missing or malformed you must exit immediately and report the error. Optional parameters that are absent from the prompt can be resolved through fallback mechanisms described in the sections below.
|
||||
@@ -479,8 +386,6 @@ Invoke the `git-isolator-util` subagent via the Task tool, passing it repository
|
||||
|
||||
#### Prompt template
|
||||
|
||||
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the subagent will fetch it itself.
|
||||
|
||||
```
|
||||
forgejo_url: `{forgejo_url}`
|
||||
forgejo_owner: `{forgejo_owner}`
|
||||
@@ -519,18 +424,17 @@ Returns `repo_dir` — the absolute path to the cloned repository inside `/tmp/`
|
||||
|
||||
1. **One task, then exit.** Do not loop, do not sleep, do not look for more work.
|
||||
2. **Use `{forgejo_pat}` for all Forgejo API calls.** This agent runs entirely on the reviewer bot identity — a separate account from the primary bot that creates PRs. This separation is required by branch protection rules that prohibit self-approval. Use `Authorization: token {forgejo_pat}` for both reading (PR details, reviews, comments, CI status) and writing (submitting reviews).
|
||||
3. **Only pass explicitly-present variables to subagents.** When invoking `git-isolator-util`, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — the subagent will fetch them itself.
|
||||
4. **Follow CONTRIBUTING.md exactly.** The review checklist, comment format, and approval criteria must be followed. Load the `cleveragents-contributing` skill for the full CONTRIBUTING.md rules.
|
||||
5. **Be constructive in all feedback.** Every `REQUEST_CHANGES` comment must explain WHY something is a problem and suggest HOW to fix it. Never leave vague or unhelpful feedback.
|
||||
6. **CI flag mode is lightweight.** When `review_type` is `ci_flag`, do NOT perform a full code review. Only flag the missing CI checks and exit.
|
||||
7. **Never merge.** Submit reviews; the merge supervisor handles merging. Never call any merge endpoint.
|
||||
8. **Clean up your clone.** Delete the temporary directory before exiting (`rm -rf {repo_dir}`). In CI flag mode, no clone is created so no cleanup is needed.
|
||||
9. **Never work in `/app`.** Always work in `/tmp/`. If `repo_dir` is not inside `/tmp/`, refuse and report an error.
|
||||
10. **Bot signature on all Forgejo content:**
|
||||
3. **Follow CONTRIBUTING.md exactly.** The review checklist, comment format, and approval criteria must be followed. Load the `cleveragents-contributing` skill for the full CONTRIBUTING.md rules.
|
||||
4. **Be constructive in all feedback.** Every `REQUEST_CHANGES` comment must explain WHY something is a problem and suggest HOW to fix it. Never leave vague or unhelpful feedback.
|
||||
5. **CI flag mode is lightweight.** When `review_type` is `ci_flag`, do NOT perform a full code review. Only flag the missing CI checks and exit.
|
||||
6. **Never merge.** Submit reviews; the merge supervisor handles merging. Never call any merge endpoint.
|
||||
7. **Clean up your clone.** Delete the temporary directory before exiting (`rm -rf {repo_dir}`). In CI flag mode, no clone is created so no cleanup is needed.
|
||||
8. **Never work in `/app`.** Always work in `/tmp/`. If `repo_dir` is not inside `/tmp/`, refuse and report an error.
|
||||
9. **Bot signature on all Forgejo content:**
|
||||
```
|
||||
---
|
||||
Automated by CleverAgents Bot
|
||||
Supervisor: PR Review | Agent: pr-review-worker
|
||||
```
|
||||
11. **Never ask questions or give up.** Operate fully autonomously using best judgement.
|
||||
12. **Exhaustive pagination for all list results.** Every REST call returning a list must be paginated fully with `limit=50`. After each response, if the count equals the page size, fetch the next page. Never assume the first response is complete. *Examples specific to this agent:* PR reviews (paginate to read all rounds of feedback before beginning re-review); review comments (paginate to read all inline comments from each review); PR comments (paginate to capture full discussion history); CI statuses (paginate to find all failing checks).
|
||||
10. **Never ask questions or give up.** Operate fully autonomously using best judgement.
|
||||
11. **Exhaustive pagination for all list results.** Every REST call returning a list must be paginated fully with `limit=50`. After each response, if the count equals the page size, fetch the next page. Never assume the first response is complete. *Examples specific to this agent:* PR reviews (paginate to read all rounds of feedback before beginning re-review); review comments (paginate to read all inline comments from each review); PR comments (paginate to capture full discussion history); CI statuses (paginate to find all failing checks).
|
||||
|
||||
+161
-4
@@ -5,12 +5,94 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- Fixed `ReactiveEventBus.emit()` exception handler to log the full exception
|
||||
message (`str(exc)`) and enable traceback forwarding (`exc_info=True`).
|
||||
Previously the handler logged only the exception type name (e.g.
|
||||
"ValueError") with no diagnostic detail, making production debugging
|
||||
impossible. The handler now includes the error message text and full
|
||||
traceback in the structlog warning entry. Removed `@tdd_expected_fail` tag
|
||||
from the TDD test so both scenarios run as normal regression guards. (#988)
|
||||
|
||||
- **Review-started notification for pr-review-worker** (#11029): Added a review-started notification step to the `pr-review-worker` agent that posts an initial comment on every PR when reviewing begins, before conducting any code review work. Notifications are posted for all three modes (CI Flag, Re-Review, and First Review) and include PR title, branch name, head SHA, and review type. This provides immediate visibility to PR authors so they know a review is actively in progress. Includes BDD test coverage verifying notification placement across all modes.
|
||||
### Fixed
|
||||
- **TUI Prompt Symbol Mode Awareness** (#6431): The prompt widget now displays a
|
||||
mode-dependent symbol (`❯` normal, `/` command, `$` shell, `☰` multi-line),
|
||||
implemented via `_PromptSymbolMixin` and `InputMode.MULTILINE`. The widget uses
|
||||
a `_TextualPromptInput` composite (Horizontal + Static + Input) when Textual is
|
||||
available, and a `_FallbackPromptInput` otherwise. Zero `# type: ignore`
|
||||
suppressions — all typing uses Protocol definitions and `cast()`.
|
||||
- **Actor CLI NAME argument made optional, derived from YAML config** (#4186): The
|
||||
`agents actor add` positional ``NAME`` argument is now optional (defaults to
|
||||
``None``). When omitted, the actor name is derived from the ``name`` field in
|
||||
the config file. Raises ``BadParameter`` if neither the argument nor the config
|
||||
``name`` field is provided. Updated docstring signature to
|
||||
``agents actor add [--config|-c <FILE>] [<NAME>]`` and added config-only usage
|
||||
examples. Added Behave scenario for the ``BadParameter`` error path
|
||||
(``actor add without NAME and without config name field raises BadParameter``)
|
||||
in ``features/actor_add_name_positional.feature`` with corresponding step
|
||||
definition. Updated step definitions in
|
||||
``features/steps/actor_add_update_enforcement_steps.py`` and
|
||||
``features/steps/actor_add_name_positional_steps.py`` to pass ``context.actor_name``
|
||||
as a positional argument for compatibility.
|
||||
|
||||
### Documentation
|
||||
- **Spec clarifications: layer boundary DI exception, ULID scope, TUI/ACMS gaps** (#10451): Added targeted clarifications to `docs/specification.md` including: the sole permitted location (`application/container.py`) where application layer may reference infrastructure concrete types; distinction between domain entity IDs (must be ULID) and ephemeral internal implementation IDs; per-stage protocol contracts, storage tier definitions, budget enforcement protocol, and output format for ACMS pipeline stages; and public interface definitions with verifiable checks for 8 TUI components.
|
||||
- **Improved parallel test suite isolation** (#4186): Replaced deprecated
|
||||
``tempfile.mktemp`` with ``tempfile.mkstemp`` in ``features/environment.py``
|
||||
for atomic temp file creation, eliminating TOCTOU race conditions in the
|
||||
per-scenario database path generation. Added ``fcntl.flock`` file locking to
|
||||
``_ensure_template_db()`` to prevent race conditions when multiple
|
||||
``behave-parallel`` workers attempt to create the template database
|
||||
simultaneously.
|
||||
|
||||
- **Removed stale @tdd_expected_fail tags from actor add enforcement tests**: The
|
||||
``--update`` enforcement feature (#2609) was already implemented and merged but
|
||||
residual ``@tdd_expected_fail`` tags remained on its BDD scenarios. These tags
|
||||
were cleaned up in ``features/actor_add_update_enforcement.feature`` so the
|
||||
tests report correctly now that the underlying bug has been fixed.
|
||||
|
||||
- **Resolved Behave AmbiguousStep collisions in step definitions** (#4186): Renamed
|
||||
step texts to avoid case-sensitive collisions between different step modules that
|
||||
prevented all Behave tests from loading. Renamed steps in
|
||||
``edge_case_plan_steps.py``, ``plan_executor_coverage_boost_steps.py``,
|
||||
``plan_explain_steps.py``, ``plan_model_steps.py``, ``project_repository_steps.py``,
|
||||
``service_retry_wiring_steps.py``, and ``session_model_steps.py``.
|
||||
Additionally resolved a collision between ``acms_index_data_model_traversal_steps.py``
|
||||
and ``security_audit_steps.py`` for ``Then the count should be``, and fixed
|
||||
``pr_compliance_checklist_steps.py`` project-root resolution (``parents[3]`` →
|
||||
``parents[2]``). Fixed table column-header mismatches in
|
||||
``features/acms/index_data_model_and_traversal.feature`` and guarded
|
||||
``cli_init_yes_flag_steps.py`` cleanup against ``None`` temp_dir. Annotated
|
||||
``features/architecture.feature`` ``@tdd_expected_fail`` for pre-existing Pydantic
|
||||
compliance debt in ``IndexEntry`` / ``ACMSIndex`` classes.
|
||||
|
||||
- **Cross-actor subgraph cycle detection reads actor_ref field** (#1431): Fixed
|
||||
`_detect_subgraph_cycles()`, `_map_node()`, and the `compile_actor()` main loop
|
||||
in `src/cleveragents/actor/compiler.py` to read `actor_ref` from the top-level
|
||||
`NodeDefinition.actor_ref` field instead of `node.config.get("actor_ref", "")`.
|
||||
Because `actor_ref` is a typed, validated Pydantic field (not a key inside the
|
||||
untyped `config` dict), the old code always returned an empty string, causing
|
||||
cross-actor cycle detection to silently fail and leaving the system vulnerable to
|
||||
infinite recursion at runtime. Added Behave regression tests
|
||||
(`features/actor_subgraph_cycle_detection.feature`) and a Robot Framework
|
||||
integration test (`robot/actor_compiler.robot`) to prevent regressions.
|
||||
- **Devcontainer auto-discovery wired into `git-checkout`/`fs-directory` handlers** (#4740):
|
||||
`GitCheckoutHandler.discover_children()` and `FsDirectoryHandler.discover_children()` now
|
||||
call `discover_devcontainers()` after scanning for `fs-directory` children. Any
|
||||
`.devcontainer/devcontainer.json` or root-level `.devcontainer.json` found at the resource
|
||||
location is registered as a `devcontainer-instance` child resource with
|
||||
`provisioning_state: discovered`. Named configurations (`.devcontainer/<name>/devcontainer.json`)
|
||||
are also discovered and carry the configuration name in the `config_name` property.
|
||||
This wires the previously-isolated `discover_devcontainers()` function into the production
|
||||
code path, enabling the spec's zero-configuration devcontainer experience.
|
||||
|
||||
- **Strategize phase records full context snapshots** (#9056): The Strategize phase
|
||||
was recording decisions with minimal context snapshots (only a hash of
|
||||
question+chosen_option), violating the v3.2.0 acceptance criterion that decisions
|
||||
must include full context snapshots sufficient to replay the decision. Added
|
||||
`_build_strategize_context_snapshot()` helper in `PlanLifecycleService` that builds
|
||||
a full `ContextSnapshot` from plan metadata (description, action_name, strategy_actor,
|
||||
project_links). Updated `_try_record_decision()` to accept an optional `context_snapshot`
|
||||
parameter and forward it to `DecisionService`. Added BDD scenarios verifying
|
||||
`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, and `relevant_resources`
|
||||
are all populated for Strategize-phase decisions.
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -21,6 +103,21 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
26-character identifier. The full ULID is now displayed in all output formats (Rich, plain,
|
||||
JSON, YAML, table).
|
||||
|
||||
- **`pr-creator` now applies State/In Review and Priority labels** (#8520): Extended
|
||||
`pr-creator` step 4 to apply three labels on every new PR: the `Type/` label (from
|
||||
the caller's `type_label` parameter), `State/In Review` (always applied), and the
|
||||
`Priority/` label matching the linked issue. Updated Rule 1 to enumerate all required
|
||||
labels. Addresses the 53% missing-State-label rate observed across open PRs of
|
||||
2026-04-13.
|
||||
|
||||
- **Suppress passing BDD scenario output in `unit_tests` by default** (#10987): Implemented
|
||||
`PassSuppressFormatter`, a custom Behave formatter (in `scripts/behave_pass_suppress_formatter.py`)
|
||||
that buffers all per-scenario output and only flushes it to stdout when a scenario fails or
|
||||
errors. An all-passing `nox -s unit_tests` run now produces ≤ 10 lines (the summary block
|
||||
only), eliminating ~100,000 lines of noise that previously made CI logs unreadable. The
|
||||
formatter is embedded in the `behave-parallel` in-process runner; coverage mode
|
||||
(`BEHAVE_PARALLEL_COVERAGE=1`) is unaffected.
|
||||
|
||||
### Security
|
||||
|
||||
- **aiohttp upgraded to >=3.13.4 to remediate CVE-2026-34513 and CVE-2026-34515** (#1549, #1544):
|
||||
@@ -33,6 +130,8 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Error suppression removed from `reactive_registry_adapter.py`** (#9060): Removed two `try...except Exception:` blocks in `register_registry_agents()` that silently suppressed errors, violating the CONTRIBUTING.md fail-fast policy. Exceptions from `actor_registry.list_actors()` and the route bridge refresh now propagate to the caller instead of being swallowed. Added Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation.
|
||||
|
||||
- **Implementation Supervisor PR Compliance Checklist** (#9824): Added a mandatory
|
||||
8-item PR Compliance Checklist to the worker prompt body in `implementation-supervisor.md`
|
||||
that every implementation worker must complete before creating a PR. Checklist covers:
|
||||
@@ -41,6 +140,24 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
and milestone assignment. This eliminates systemic PR merge blockers caused by workers
|
||||
omitting required items.
|
||||
|
||||
- **Implementation Pool Supervisor PR Compliance Checklist** (#9824): Added a mandatory
|
||||
8-item PR Compliance Checklist to the new `implementation-pool-supervisor.md` agent definition.
|
||||
Supervisors must enforce that workers complete all 8 checklist items (CHANGELOG.md update,
|
||||
CONTRIBUTORS.md update, commit footer, CI verification, BDD tests, Epic reference, label
|
||||
application, and milestone assignment) before creating any PR. Includes concrete markdown
|
||||
examples for each subsection and compliance verification pseudocode to ensure reproducible
|
||||
adherence.
|
||||
|
||||
- **ACMS context path matching now handles absolute fragment paths** (#10972): Fixed
|
||||
`_path_matches()` in `execute_phase_context_assembler.py` and `_matches_pattern()` in
|
||||
`context_phase_analysis.py` to correctly match absolute paths (e.g. `/app/.opencode/skills/SKILL.md`)
|
||||
against relative glob patterns (e.g. `.opencode/**`, `docs/*`). Previously
|
||||
`PurePath.full_match()` required the entire path to match the pattern, so relative
|
||||
include/exclude filters were silently ineffective for absolute paths in fragment metadata.
|
||||
Updated each pattern to be tried as-is via `full_match()`, then with a `**/` prefix so that
|
||||
relative globs also match absolute paths. Added BDD regression tests in
|
||||
`execute_phase_context_assembler_coverage.feature` and `project_context_phase_analysis.feature`.
|
||||
|
||||
### Changed
|
||||
|
||||
- Restored `benchmark-regression` CI job to `master.yml` with `pull_request` trigger guard
|
||||
@@ -73,9 +190,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
### Added
|
||||
|
||||
- **`agents plan start` CLI alias** (alias for `plan use`): `plan start <action> <project>` is now available as a more intuitive shorthand for creating a v3 plan from an action template. Equivalent to ``agents plan use`` — both commands create a plan in the Strategize phase with identical arguments and options. Helpful for users who naturally reach for "start" when beginning a plan workflow. Includes BDD coverage.
|
||||
|
||||
- `agents actor context clear` command to reset actor message history and
|
||||
state while preserving the underlying context directory via `ContextManager`
|
||||
(#6370).
|
||||
- **Quick Start Guide** (PR #9245): Added `docs/quickstart.md` with an end-to-end quick start guide covering prerequisites, installation, project creation, resource registration, plan/apply workflow, and troubleshooting. Updated `mkdocs.yml` navigation to include the Quick Start page.
|
||||
|
||||
- **Plan checkpoint management CLI commands** (#8683): Added `agents plan checkpoint-list <plan-id>` and `agents plan checkpoint-delete <checkpoint-id>` commands. Listing output now highlights checkpoint ID, type, created timestamp, reason, phase, and decision linkage with a concise field summary footer across rich/table/json/yaml formats. Deletion supports batch IDs, interactive confirmation (skip with `--yes`), and structured JSON/YAML responses for automation-friendly scripting.
|
||||
- **Invariant Remove CLI Command** (#8530): Implemented `agents invariant remove <id>` command that soft-deletes an invariant by ID. The command displays a confirmation prompt before removal (bypassable with `--yes`/`-y`), outputs the removed invariant ID on success, and shows a clear error message when the invariant ID does not exist. Supports `--format` flag for JSON and YAML output. Full BDD test coverage and Robot Framework integration tests included.
|
||||
@@ -104,6 +224,15 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **fix(repositories): derive PlanResult.success from result_success column instead of error_message** (#7501):
|
||||
Fixed a critical bug in `PlanRepository._to_domain` where `PlanResult.success` was incorrectly
|
||||
derived from `error_message is None`. Because `error_message` is shared between the build phase
|
||||
and the result phase, a plan with a historical build error would be marked as failed even after
|
||||
successfully completing and being applied. The fix introduces a dedicated `result_success` boolean
|
||||
column in the `plans` table (migration `m9_003_plan_result_success_column`) and updates the
|
||||
repository read path to use it. For backward compatibility, when `result_success` is NULL
|
||||
(pre-migration records), the legacy `error_message is None` heuristic is preserved.
|
||||
|
||||
- **`LLMTraceRepository.save()` premature commit breaks UnitOfWork transactions** (#7505):
|
||||
Replaced the unconditional `session.commit()` in `LLMTraceRepository.save()` with a
|
||||
dual-path implementation that respects the UnitOfWork (UoW) pattern. When an external
|
||||
@@ -343,6 +472,18 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
forward-compatibility. Added BDD coverage for the stored-JSON path,
|
||||
corrupt-JSON fallback, resource-passing, and stub extra-kwargs scenarios. (#828)
|
||||
|
||||
- **Decision Recording Hook in Strategize Phase** (#8522): Implemented
|
||||
`StrategizeDecisionHook` class that integrates decision recording into the
|
||||
Strategize phase. The hook captures every decision point during strategy
|
||||
decomposition, including question, chosen option, alternatives considered,
|
||||
confidence score, rationale, and full context snapshot (hot context hash,
|
||||
actor state reference, relevant resources). Supports recording of
|
||||
`strategy_choice`, `resource_selection`, `subplan_spawn`, and
|
||||
`invariant_enforced` decision types. Context snapshots are auto-captured
|
||||
with SHA256 hashing of context data and checkpoint references for LangGraph
|
||||
actor state. Includes comprehensive BDD test suite with 40+ scenarios
|
||||
covering all decision types, context capture, error handling, and tree
|
||||
structure validation.
|
||||
|
||||
- **TDD Issue-Capture Test Activation** (#7025): Replaced 234 bare `@skip` tags
|
||||
across 82 Behave feature files with the correct `@tdd_expected_fail @tdd_issue
|
||||
@@ -514,6 +655,13 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
delays from 15s to 2s, and reduced idle sleep from 60s to 10s for dramatically
|
||||
faster throughput.
|
||||
|
||||
- **Specification — Validation Gate Empty-Run Guard** (#8146): Updated `docs/specification.md`
|
||||
to document the security invariant introduced in PR #7786 (fixing issue #7508). The spec now
|
||||
explicitly states that `ApplyValidationSummary.all_required_passed` returns `False` when no
|
||||
validations have been run (empty summary), blocking apply. Added a prominent danger admonition
|
||||
block, updated the validation process results section, the `final_validation_results` data
|
||||
model description, and two milestone acceptance criteria to reflect the corrected blocking
|
||||
behavior for empty validation summaries and no-attachment runs.
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -626,6 +774,15 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
response format from the OpenCode API `/session/status` endpoint instead of an array.
|
||||
Workers now dispatch and verify correctly, preventing incorrect session deletion.
|
||||
|
||||
---
|
||||
### Fixed
|
||||
|
||||
- **CLI (`agents actor remove`)** (#6491): Restores output parity with the
|
||||
other actor commands by honoring `--format`/`-f` for JSON/YAML/plain/Rich
|
||||
envelopes. Adds a Robot Framework regression test to assert the JSON
|
||||
envelope structure and updates the CLI synopsis in `docs/specification.md`
|
||||
to document the option.
|
||||
|
||||
---
|
||||
|
||||
## [3.8.0] -- 2026-04-05
|
||||
|
||||
+10
-5
@@ -9,9 +9,6 @@
|
||||
* Rui Hu <rui.hu@cleverthis.com>
|
||||
|
||||
# Details
|
||||
* HAL 9000 has contributed spec clarifications for layer boundary DI exception, ULID scope, ACMS pipeline contracts, and TUI component interfaces (PR #10451): documented architectural invariants including the DI container exception, clarified ULID identifier scope distinguishing domain entities from internal implementation details, added per-stage protocol contracts for all 10 ACMS pipeline stages with storage tier definitions, budget enforcement protocol, and context assembly output format, and defined public interfaces with verifiable checks for 8 TUI components.
|
||||
|
||||
|
||||
|
||||
Below are some of the specific details of various contributions.
|
||||
|
||||
@@ -24,14 +21,22 @@ Below are some of the specific details of various contributions.
|
||||
* HAL 9000 has contributed the plugin entry point security hardening fix (#7476): enforced entry point allowlist validation before importing plugin modules to prevent malicious plugin loading.
|
||||
* HAL 9000 has contributed the benchmark workflow separation (#9040): moved the benchmark-regression job out of the default PR workflow into a dedicated scheduled workflow, reducing median PR CI turnaround time from 99-132 minutes to under 30 minutes.
|
||||
* HAL 9000 has contributed the agent-evolution-pool-supervisor PR metadata assignment (#7888): the supervisor now automatically looks up the Type/Automation label and earliest open milestone before dispatching improvement PR creation workers, ensuring all generated improvement PRs have correct Type labels and milestone assignments.
|
||||
* HAL 9000 has contributed the decision recording hook for the Strategize phase (issue #8522): captures every decision point with question, chosen option, alternatives, confidence, rationale, and full context snapshot for replay and correction.
|
||||
* HAL 9000 has contributed automated specification maintenance, documentation updates, and bot-driven PR authorship.
|
||||
* This project was made possible thanks to considerable donation of time, money, and resources by CleverThis, Inc.
|
||||
* HAL 9000 has contributed automated bug fixes, CLI output formatting improvements, and ongoing maintenance as part of the CleverAgents automation system.
|
||||
* HAL 9000 has contributed the file edit encoding parameter fix (PR #8258 / issue #7559).
|
||||
<<* HAL 9000 has contributed the architecture-pool-supervisor milestone assignment feature (PR #8188 / issue #7521): added `forgejo_update_pull_request` permission and documented the PR workflow for major spec changes, enabling automatic milestone assignment for specification PRs.
|
||||
* HAL 9000 has contributed the architecture-pool-supervisor milestone assignment feature (PR #8188 / issue #7521): added `forgejo_update_pull_request` permission and documented the PR workflow for major spec changes, enabling automatic milestone assignment for specification PRs.
|
||||
* HAL 9000 has contributed the git worktree TOCTOU race condition fix (PR #8178 / issue #7507): replaced the unsafe mkdtemp() + rmdir() pattern with a parent-directory approach to eliminate the race window in concurrent git worktree operations.
|
||||
* HAL 9000 has contributed the git_tools TOCTOU race condition fix (PR #8255 / issue #7619): eliminated the Time-Of-Check-To-Time-Of-Use race in `_get_base_env()` by adding double-checked locking with a module-level `threading.Lock`, preventing concurrent threads from writing conflicting environment snapshots.
|
||||
* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-supervisor.md` (#9824): added an 8-item checklist to the worker prompt body with concrete items covering CHANGELOG.md, CONTRIBUTORS.md, commit footer, CI verification, BDD tests, Epic reference, labels, and milestone assignment to eliminate systemic PR merge blockers.
|
||||
* HAL 9000 has contributed the PlanResult.success derivation fix (PR #8214 / issue #7501): replaced the incorrect `error_message is None` heuristic with a dedicated `result_success` column in the plans table, ensuring plans with historical build errors are not incorrectly marked as failed after a successful apply.
|
||||
* HAL 9000 has contributed the mandatory PR compliance checklist to `implementation-pool-supervisor.md` (#9824): created a new agent definition with an embedded 8-item checklist ensuring workers always update CHANGELOG.md, CONTRIBUTORS.md, include commit footers (`ISSUES CLOSED: #N`), verify CI passes, add BDD tests, reference the parent Epic, apply labels via forgejo-label-manager, and assign milestones before creating PRs. Includes concrete examples for each subsection and compliance verification pseudocode.
|
||||
* HAL 9000 has contributed comprehensive milestone documentation for v3.6.0 (Advanced Concepts & Deferred Features) and v3.7.0 (TUI Implementation) (PR #9903): split into sub-documents covering context strategies, LLM backends, resource types, A2A rename, container tool execution, scope chain resolution, cost/safety budgets, E2E workflow tests, code review examples, plugin architecture, TUI layout, persona system, reference/command input, session management, configuration, and TuiMaterializer integration.
|
||||
* HAL 9000 has contributed the LLMTraceRepository data-integrity fix (PR #8185 / issue #7505): replaced the unconditional `session.commit()` in `LLMTraceRepository.save()` with a dual-path implementation that respects the UnitOfWork pattern — flushing only when an external session is provided, and flushing + committing + closing when operating standalone. This eliminates premature transaction commits, loss of rollback capability, and a docstring/implementation mismatch.
|
||||
* HAL 9000 has contributed the ACMS Index Data Model and File Traversal Engine (PR #9664 / issue #9579): foundational data structures for indexed context entries with hot/warm/cold/archive storage tier classification, tag system, and a timeout-safe chunked file traversal engine for large projects with 10,000+ files.
|
||||
* HAL 9000 has contributed the review-started notification feature for `pr-review-worker` (PR #11029): added an initial review notification comment posted at the start of every PR review across all three modes (CI Flag, Re-Review, First Review), providing immediate visibility to PR authors that a review is actively in progress. Includes BDD test coverage verifying notification placement in the agent definition for each mode.
|
||||
* HAL 9000 has contributed the error-suppression removal fix (PR #9247 / issue #9060): removed both `try...except Exception:` blocks in `register_registry_agents()` that silently suppressed errors from `actor_registry.list_actors()` and the route bridge refresh, enabling exceptions to propagate per CONTRIBUTING.md fail-fast policy. Added three Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation.
|
||||
* HAL 9000 has contributed the Strategize phase full context snapshot fix (issue #9056): added `_build_strategize_context_snapshot()` helper to `PlanLifecycleService`, updated `_try_record_decision()` to accept and forward a `ContextSnapshot` parameter, and added BDD test coverage verifying all four `ContextSnapshot` fields (`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, `relevant_resources`) are populated during the Strategize phase.
|
||||
* HAL 9000 has contributed the ACMS context path matching fix (PR #10975 / issue #10972): corrects `_path_matches()` and `_matches_pattern()` to properly match absolute fragment paths against relative glob patterns by auto-prefixing with `**/` before calling `PurePath.full_match()`, preventing silent inefficacy of include/exclude filters for absolute paths in fragment metadata.
|
||||
|
||||
* HAL 9000 has contributed the `agents plan start` CLI alias (PR #8661): added `aliases=["start"]` to the `plan use` command so users can create plans more intuitively with `agents plan start <action> <project>` alongside the existing `agents plan use`. Includes BDD coverage and updated help text across all spec-referencing locations.
|
||||
|
||||
@@ -665,7 +665,7 @@ The Automation Tracking Manager provides eleven operations:
|
||||
| `AUTO-IMP-POOL` | Implementation Pool Supervisor |
|
||||
| `AUTO-REV-POOL` | PR Review Pool Supervisor |
|
||||
| `AUTO-UAT-POOL` | UAT Test Pool Supervisor |
|
||||
| `AUTO-BUG-SUP` | Bug Hunt Pool Supervisor |
|
||||
| `AUTO-BUG-POOL` | Bug Hunt Pool Supervisor |
|
||||
| `AUTO-INF-POOL` | Test Infrastructure Pool Supervisor |
|
||||
| `AUTO-ARCH` | Architecture Supervisor |
|
||||
| `AUTO-EPIC` | Epic Planning Supervisor |
|
||||
@@ -693,7 +693,7 @@ The following table maps between the two schemes for agents where they differ:
|
||||
| Implementation Pool | `AUTO-IMP-SUP` | `AUTO-IMP-POOL` |
|
||||
| PR Review Pool | `AUTO-REV-SUP` | `AUTO-REV-POOL` |
|
||||
| UAT Test Pool | `AUTO-UAT-SUP` | `AUTO-UAT-POOL` |
|
||||
| Bug Hunt Pool | `AUTO-BUG-SUP` | `AUTO-BUG-SUP` |
|
||||
| Bug Hunt Pool | `AUTO-BUG-SUP` | `AUTO-BUG-POOL` |
|
||||
| Test Infrastructure Pool | `AUTO-INF-SUP` | `AUTO-INF-POOL` |
|
||||
| Human Liaison | `AUTO-HUMAN` | `AUTO-LIAISON` |
|
||||
| Grooming | `AUTO-GROOM` | `AUTO-GROOMER` |
|
||||
@@ -1869,7 +1869,7 @@ Only critical bugs get assigned to the active milestone. Non-critical issues go
|
||||
| **Mode** | `subagent` |
|
||||
| **Model** | `google/gemini-2.5-pro` |
|
||||
| **Temperature** | 0.1 |
|
||||
| **Tracking Prefix** | `AUTO-BUG-SUP` |
|
||||
| **Tracking Prefix** | `AUTO-BUG-POOL` |
|
||||
| **Worker Count** | N/4 (quarter allocation) |
|
||||
|
||||
#### 8.6.1 Purpose
|
||||
@@ -3164,7 +3164,7 @@ Defines how ALL agents discover, interact with, and coordinate through the autom
|
||||
|
||||
### 13.9 Bug Hunter Tracking Update (`shared/bug_hunter_tracking_update.md`)
|
||||
|
||||
Defines the migration guide for converting the Bug Hunt supervisor from the old session state system to the new individual tracking issue system. Documents the tracking issue format `[AUTO-BUG-SUP] Bug Hunt Status (Cycle 25)`, the cleanup protocol (one issue per cycle, preserve announcements), and worker coordination via announcement issues.
|
||||
Defines the migration guide for converting the Bug Hunt supervisor from the old session state system to the new individual tracking issue system. Documents the tracking issue format `[AUTO-BUG-POOL] Bug Detection Pool Status (Cycle N)`, the cleanup protocol (one issue per cycle, preserve announcements), and worker coordination via announcement issues.
|
||||
|
||||
---
|
||||
|
||||
@@ -6767,7 +6767,7 @@ The system uses five distinct redundancy patterns:
|
||||
| 4 | pr-merge-pool-supervisor | subagent | claude-sonnet-4-6 | AUTO-MERGE | Singleton Supervisor |
|
||||
| 5 | pr-fix-pool-supervisor | *(removed — absorbed into implementation-pool-supervisor)* | -- | -- | -- |
|
||||
| 6 | uat-test-pool-supervisor | subagent | claude-sonnet-4-6 | AUTO-UAT-POOL | Pool Supervisor |
|
||||
| 7 | bug-hunt-pool-supervisor | subagent | gemini-2.5-pro | AUTO-BUG-SUP | Pool Supervisor |
|
||||
| 7 | bug-hunt-pool-supervisor | subagent | gemini-2.5-pro | AUTO-BUG-POOL | Pool Supervisor |
|
||||
| 8 | test-infra-pool-supervisor | subagent | gemini-2.5-pro | AUTO-INF-POOL | Pool Supervisor |
|
||||
| 9 | architecture-pool-supervisor | subagent | claude-sonnet-4-6 | AUTO-ARCH | Singleton Supervisor |
|
||||
| 10 | epic-planning-pool-supervisor | subagent | claude-sonnet-4-6 | AUTO-EPIC | Singleton Supervisor |
|
||||
|
||||
@@ -61,7 +61,7 @@ All prefixes are registered in the `automation-tracking-manager` subagent, which
|
||||
| uat-test-pool-supervisor | `AUTO-UAT-POOL` | `[AUTO-UAT-POOL] UAT Status (Cycle 6)` |
|
||||
| project-owner-pool-supervisor | `AUTO-PROJ-OWN` | `[AUTO-PROJ-OWN] Project Status (Cycle 11)` |
|
||||
| agent-evolution-pool-supervisor | `AUTO-EVLV` | `[AUTO-EVLV] Agent Evolution Report (Cycle 10)` |
|
||||
| bug-hunt-pool-supervisor | `AUTO-BUG-SUP` | `[AUTO-BUG-SUP] Bug Hunt Status (Cycle 25)` |
|
||||
| bug-hunt-pool-supervisor | `AUTO-BUG-POOL` | `[AUTO-BUG-POOL] Bug Detection Pool Status (Cycle 60)` |
|
||||
| spec-update-pool-supervisor | `AUTO-SPEC` | `[AUTO-SPEC] Specification Update Report (Cycle 1)` |
|
||||
| test-infra-pool-supervisor | `AUTO-INF-POOL` | `[AUTO-INF-POOL] Infrastructure Analysis Report (Cycle 2)` |
|
||||
| epic-planner | `AUTO-EPIC` | `[AUTO-EPIC] Epic Planning Update (Cycle 9)` |
|
||||
@@ -394,7 +394,7 @@ label:"Automation Tracking" [AUTO-UAT-POOL] in:title
|
||||
label:"Automation Tracking" [AUTO-PROJ-OWN] in:title
|
||||
label:"Automation Tracking" [AUTO-EVLV] in:title
|
||||
label:"Automation Tracking" [AUTO-EPIC] in:title
|
||||
label:"Automation Tracking" [AUTO-BUG-SUP] in:title
|
||||
label:"Automation Tracking" [AUTO-BUG-POOL] in:title
|
||||
label:"Automation Tracking" [AUTO-SPEC] in:title
|
||||
label:"Automation Tracking" [AUTO-INF-POOL] in:title
|
||||
```
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
Feature: Plan start alias CLI coverage
|
||||
As a developer
|
||||
I want ``agents plan start`` to be available as an alias for ``plan use``
|
||||
So that users can more intuitively create plans from action templates
|
||||
|
||||
Background:
|
||||
Given a plan lifecycle CLI runner
|
||||
And a mocked lifecycle service for plan commands
|
||||
|
||||
Scenario: Plan start creates a plan (alias for plan use)
|
||||
When I run plan lifecycle command "start" with action "local/code-coverage"
|
||||
Then the plan lifecycle command should succeed
|
||||
And the plan lifecycle output should contain "Strategize phase"
|
||||
And the plan lifecycle use service should be invoked
|
||||
|
||||
Scenario: Plan start accepts --arg flag (alias for plan use)
|
||||
When I run plan lifecycle command "start" with action "local/code-coverage"
|
||||
Then the plan lifecycle command should succeed
|
||||
|
||||
Scenario: Plan start with --automation-profile flag (alias for plan use)
|
||||
When I run plan lifecycle command "start" with action "local/code-coverage"
|
||||
Then the plan lifecycle command should succeed
|
||||
|
||||
Scenario: Plan start accepts multiple projects (alias for plan use)
|
||||
When I run plan lifecycle command "start" with action "local/security-audit"
|
||||
Then the plan lifecycle command should succeed
|
||||
@@ -1,41 +0,0 @@
|
||||
@mock_only
|
||||
Feature: PR Review Worker Review-Started Notification
|
||||
|
||||
As a PR review worker
|
||||
I want to post a review-started notification when reviewing begins
|
||||
So that PR authors receive immediate acknowledgment that their PR is being reviewed
|
||||
|
||||
Background:
|
||||
Given the pr-review-worker.md agent definition exists
|
||||
|
||||
Scenario: CI Flag Mode has review-started notification before REQUEST_CHANGES review
|
||||
When I read the pr-review-worker agent definition
|
||||
Then the worker prompt includes a review-started notification step in CI Flag Mode
|
||||
And the notification uses the review type "CI Check Flag"
|
||||
And the notification is posted BEFORE the Request Changes review
|
||||
And the notification includes PR title, branch name, head SHA, and review type
|
||||
|
||||
Scenario: Re-Review Mode has review-started notification before diff reading
|
||||
When I read the pr-review-worker agent definition
|
||||
Then the worker prompt includes a review-started notification step in Re-Review Mode
|
||||
And the notification uses the review type "Re-Review"
|
||||
And the notification is posted BEFORE reading the PR diff
|
||||
And the notification is posted AFTER reading all PR comments
|
||||
|
||||
Scenario: First Review Mode has review-started notification before diff reading
|
||||
When I read the pr-review-worker agent definition
|
||||
Then the worker prompt includes a review-started notification step in First Review Mode
|
||||
And the notification uses the review type "First Review"
|
||||
And the notification is posted BEFORE reading the PR diff
|
||||
And the notification is posted AFTER reading all PR comments
|
||||
|
||||
Scenario: All three modes include notification content requirements
|
||||
When I read the pr-review-worker agent definition
|
||||
Then CI Flag Mode notification includes an ETA indication
|
||||
And Re-Review Mode notification mentions it is a re-review
|
||||
And First Review Mode notification indicates a full code review will follow
|
||||
|
||||
Scenario: All notifications use POST to issues comments endpoint
|
||||
When I read the pr-review-worker agent definition
|
||||
Then all three modes include a POST request to /issues/{pr_number}/comments
|
||||
And each notification step references the Bot Signature footer
|
||||
@@ -190,7 +190,44 @@ def step_plan_use_with_invalid_argument(context, arg_value: str) -> None:
|
||||
)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Plan start alias step definitions (alias for plan use)
|
||||
# =============================================================================
|
||||
# The Typer framework handles "start" -> "use" alias automatically.
|
||||
# When the CLI invokes ["start", ...], Typer routes it to use_action().
|
||||
|
||||
|
||||
@when('I run plan lifecycle command "{command}" with action "{action_name}"')
|
||||
def step_plan_alias_invoke(context, command: str, action_name: str) -> None:
|
||||
"""Execute the command (use or start) as an alias for creating a plan.
|
||||
|
||||
Typer routes ['start', ...] to use_action() automatically via aliases=["start"].
|
||||
This step verifies that both 'plan use' and 'plan start' produce identical results.
|
||||
"""
|
||||
action = SimpleNamespace(namespaced_name=action_name)
|
||||
plan = _make_plan(
|
||||
plan_id=_ULIDS[7],
|
||||
name=f"local/{command}-plan",
|
||||
description=f"{command} alias test",
|
||||
project_links=[ProjectLink(project_name="proj-1")],
|
||||
)
|
||||
context.lifecycle_service.get_action_by_name.return_value = action
|
||||
context.lifecycle_service.use_action.return_value = plan
|
||||
|
||||
context.result = context.runner.invoke(
|
||||
plan_app,
|
||||
[command, action_name, "--project", "proj-1"],
|
||||
)
|
||||
|
||||
|
||||
@then("the plan lifecycle use service should be invoked")
|
||||
def step_plan_alias_service_invoked(context) -> None:
|
||||
"""Verify the start alias calls the same underlying service as plan use."""
|
||||
context.lifecycle_service.use_action.assert_called_once()
|
||||
|
||||
|
||||
@when('I run plan lifecycle use causing "{error_type}"')
|
||||
|
||||
def step_plan_use_error(context, error_type: str) -> None:
|
||||
action = SimpleNamespace(namespaced_name="local/code-coverage")
|
||||
context.lifecycle_service.get_action.return_value = action
|
||||
|
||||
@@ -1,394 +0,0 @@
|
||||
"""Step definitions for PR review worker review-started notification feature test."""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from behave import given, then, when
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
AGENT_DEF_PATH = PROJECT_ROOT / ".opencode" / "agents" / "pr-review-worker.md"
|
||||
|
||||
|
||||
@given("the pr-review-worker.md agent definition exists")
|
||||
def step_agent_def_exists(context: Any) -> None:
|
||||
"""Verify the pr-review-worker agent definition file exists."""
|
||||
possible_paths = [
|
||||
AGENT_DEF_PATH,
|
||||
Path("/tmp/cleveragents-work/.opencode/agents/pr-review-worker.md"),
|
||||
Path("/app/.opencode/agents/pr-review-worker.md"),
|
||||
]
|
||||
|
||||
agent_file = None
|
||||
for path in possible_paths:
|
||||
if path.exists():
|
||||
agent_file = path
|
||||
break
|
||||
|
||||
assert agent_file is not None, (
|
||||
f"Agent definition file should exist at one of: {possible_paths}"
|
||||
)
|
||||
context.agent_def_path = agent_file
|
||||
|
||||
|
||||
@when("I read the pr-review-worker agent definition")
|
||||
def step_read_agent_def(context: Any) -> None:
|
||||
"""Read the pr-review-worker agent definition."""
|
||||
with open(context.agent_def_path, encoding="utf-8") as f:
|
||||
context.agent_def_content = f.read()
|
||||
|
||||
|
||||
# --- CI Flag Mode checks ---
|
||||
|
||||
@then("the worker prompt includes a review-started notification step in CI Flag Mode")
|
||||
def step_ci_flag_has_notification(context: Any) -> None:
|
||||
"""Verify CI Flag Mode has a review-started notification step."""
|
||||
content = context.agent_def_content
|
||||
# Find the CI Flag Mode section
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_section_start = content.find("### Re-Review Mode")
|
||||
if re_review_section_start < 0:
|
||||
re_review_section_start = content.find("#### Re-Review Mode")
|
||||
ci_section = content[ci_section_start:re_review_section_start]
|
||||
|
||||
assert "review-started notification" in ci_section, (
|
||||
"CI Flag Mode does not include a review-started notification step"
|
||||
)
|
||||
|
||||
|
||||
@then('the notification uses the review type "CI Check Flag"')
|
||||
def step_ci_flag_notification_type(context: Any) -> None:
|
||||
"""Verify CI Flag notification specifies the correct review type."""
|
||||
content = context.agent_def_content
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_section_start = content.find(
|
||||
"### Re-Review Mode", ci_section_start
|
||||
) or content.find("#### Re-Review Mode", ci_section_start)
|
||||
ci_section = content[ci_section_start:re_review_section_start]
|
||||
|
||||
assert (
|
||||
'"CI Check Flag"' in ci_section
|
||||
or '"CI Check Flag"' in ci_section
|
||||
or "CI Check Flag" in ci_section
|
||||
), (
|
||||
'CI Flag Mode notification does not specify review type "CI Check Flag"'
|
||||
)
|
||||
|
||||
|
||||
@then("the notification is posted BEFORE the Request Changes review")
|
||||
def step_notification_before_review(context: Any) -> None:
|
||||
"""Verify notification step comes before the REQUEST_CHANGES review in CI Flag."""
|
||||
content = context.agent_def_content
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_section_start = content.find("### Re-Review Mode", ci_section_start) or content.find(
|
||||
"#### Re-Review Mode", ci_section_start
|
||||
)
|
||||
ci_section = content[ci_section_start:re_review_section_start]
|
||||
|
||||
notification_pos = ci_section.find("review-started notification")
|
||||
review_pos = ci_section.find("REQUEST_CHANGES review")
|
||||
|
||||
assert notification_pos >= 0, "Notification step not found in CI Flag Mode"
|
||||
assert review_pos > notification_pos, (
|
||||
"Review-started notification is NOT before REQUEST_CHANGES review"
|
||||
)
|
||||
|
||||
|
||||
@then("the notification includes PR title, branch name, head SHA, and review type")
|
||||
def step_notification_contains_pr_details(context: Any) -> None:
|
||||
"""Verify notification includes required PR details."""
|
||||
content = context.agent_def_content
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_section_start = content.find("### Re-Review Mode", ci_section_start) or content.find(
|
||||
"#### Re-Review Mode", ci_section_start
|
||||
)
|
||||
ci_section = content[ci_section_start:re_review_section_start]
|
||||
|
||||
# The notification step should mention all required fields
|
||||
assert "PR title" in ci_section, (
|
||||
"Notification does not include PR title reference"
|
||||
)
|
||||
assert "branch name" in ci_section, (
|
||||
"Notification does not include branch name reference"
|
||||
)
|
||||
assert "head SHA" in ci_section, (
|
||||
"Notification does not include head SHA reference"
|
||||
)
|
||||
|
||||
|
||||
# --- Re-Review Mode checks ---
|
||||
|
||||
@then("the worker prompt includes a review-started notification step in Re-Review Mode")
|
||||
def step_re_review_has_notification(context: Any) -> None:
|
||||
"""Verify Re-Review Mode has a review-started notification step."""
|
||||
content = context.agent_def_content
|
||||
re_review_start = content.find("### Re-Review Mode") or content.find(
|
||||
"#### Re-Review Mode"
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist", re_review_start)
|
||||
|
||||
re_section_end = min(first_review_start, review_checklist_start)
|
||||
re_section = content[re_review_start:re_section_end]
|
||||
|
||||
assert "review-started notification" in re_section, (
|
||||
"Re-Review Mode does not include a review-started notification step"
|
||||
)
|
||||
|
||||
|
||||
@then('the notification uses the review type "Re-Review"')
|
||||
def step_re_review_notification_type(context: Any) -> None:
|
||||
"""Verify Re-Review notification specifies the correct review type."""
|
||||
content = context.agent_def_content
|
||||
re_review_start = content.find("### Re-Review Mode") or content.find(
|
||||
"#### Re-Review Mode"
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist", re_review_start)
|
||||
|
||||
re_section_end = min(first_review_start, review_checklist_start)
|
||||
re_section = content[re_review_start:re_section_end]
|
||||
|
||||
assert (
|
||||
'"Re-Review"' in re_section or "Re-Review" in re_section
|
||||
), 'Re-Review Mode notification does not specify review type "Re-Review"'
|
||||
|
||||
|
||||
@then("the notification is posted BEFORE reading the PR diff")
|
||||
def step_re_review_notification_before_diff(context: Any) -> None:
|
||||
"""Verify notification comes before diff reading in Re-Review Mode."""
|
||||
content = context.agent_def_content
|
||||
re_review_start = content.find("### Re-Review Mode") or content.find(
|
||||
"#### Re-Review Mode"
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist", re_review_start)
|
||||
|
||||
re_section_end = min(first_review_start, review_checklist_start)
|
||||
re_section = content[re_review_start:re_section_end]
|
||||
|
||||
# Read diff in Re-Review mode is at some step position
|
||||
notification_pos = re_section.find("review-started notification")
|
||||
read_diff_pos = re_section.find("Read the diff")
|
||||
|
||||
assert notification_pos >= 0, "Notification step not found in Re-Review Mode"
|
||||
assert read_diff_pos > notification_pos, (
|
||||
"In Re-Review Mode, notification is NOT before reading the diff"
|
||||
)
|
||||
|
||||
|
||||
@then("the notification is posted AFTER reading all PR comments")
|
||||
def step_re_review_notification_after_comments(context: Any) -> None:
|
||||
"""Verify notification comes after PR comments reading in Re-Review Mode."""
|
||||
content = context.agent_def_content
|
||||
re_review_start = content.find("### Re-Review Mode") or content.find(
|
||||
"#### Re-Review Mode"
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist", re_review_start)
|
||||
|
||||
re_section_end = min(first_review_start, review_checklist_start)
|
||||
re_section = content[re_review_start:re_section_end]
|
||||
|
||||
notification_pos = re_section.find("review-started notification")
|
||||
comments_pos = re_section.find("Read all PR comments")
|
||||
|
||||
assert notification_pos >= 0, "Notification step not found in Re-Review Mode"
|
||||
assert comments_pos < notification_pos, (
|
||||
"In Re-Review Mode, reading PR comments is NOT before notification"
|
||||
)
|
||||
|
||||
|
||||
# --- First Review Mode checks ---
|
||||
|
||||
@then("the worker prompt includes a review-started notification step in First Review Mode")
|
||||
def step_first_review_has_notification(context: Any) -> None:
|
||||
"""Verify First Review Mode has a review-started notification step."""
|
||||
content = context.agent_def_content
|
||||
first_review_start = content.find("#### First Review Mode")
|
||||
review_checklist_start = content.find("### Review Checklist", first_review_start)
|
||||
|
||||
first_section = content[first_review_start:review_checklist_start]
|
||||
|
||||
assert "review-started notification" in first_section, (
|
||||
"First Review Mode does not include a review-started notification step"
|
||||
)
|
||||
|
||||
|
||||
@then('the notification uses the review type "First Review"')
|
||||
def step_first_review_notification_type(context: Any) -> None:
|
||||
"""Verify First Review notification specifies the correct review type."""
|
||||
content = context.agent_def_content
|
||||
first_review_start = content.find("#### First Review Mode")
|
||||
review_checklist_start = content.find("### Review Checklist", first_review_start)
|
||||
|
||||
first_section = content[first_review_start:review_checklist_start]
|
||||
|
||||
assert (
|
||||
'"First Review"' in first_section or "First Review" in first_section
|
||||
), 'First Review Mode notification does not specify review type "First Review"'
|
||||
|
||||
|
||||
@then("the notification is posted BEFORE reading the PR diff")
|
||||
def step_first_review_notification_before_diff(context: Any) -> None:
|
||||
"""Verify notification comes before diff reading in First Review Mode."""
|
||||
content = context.agent_def_content
|
||||
first_review_start = content.find("#### First Review Mode")
|
||||
review_checklist_start = content.find("### Review Checklist", first_review_start)
|
||||
|
||||
first_section = content[first_review_start:review_checklist_start]
|
||||
|
||||
notification_pos = first_section.find("review-started notification")
|
||||
read_diff_pos = first_section.find("Read the diff")
|
||||
|
||||
assert notification_pos >= 0, (
|
||||
"Notification step not found in First Review Mode"
|
||||
)
|
||||
assert read_diff_pos > notification_pos, (
|
||||
"In First Review Mode, notification is NOT before reading the diff"
|
||||
)
|
||||
|
||||
|
||||
@then("the notification is posted AFTER reading all PR comments")
|
||||
def step_first_review_notification_after_comments(context: Any) -> None:
|
||||
"""Verify notification comes after PR comments in First Review Mode."""
|
||||
content = context.agent_def_content
|
||||
first_review_start = content.find("#### First Review Mode")
|
||||
review_checklist_start = content.find("### Review Checklist", first_review_start)
|
||||
|
||||
first_section = content[first_review_start:review_checklist_start]
|
||||
|
||||
notification_pos = first_section.find("review-started notification")
|
||||
comments_pos = first_section.find("Read all PR comments")
|
||||
|
||||
assert notification_pos >= 0, (
|
||||
"Notification step not found in First Review Mode"
|
||||
)
|
||||
assert comments_pos < notification_pos, (
|
||||
"In First Review Mode, reading PR comments is NOT before notification"
|
||||
)
|
||||
|
||||
|
||||
# --- Content requirement checks ---
|
||||
|
||||
@then("CI Flag Mode notification includes an ETA indication")
|
||||
def step_ci_flag_eta(context: Any) -> None:
|
||||
"""Verify CI Flag notification mentions ETA."""
|
||||
content = context.agent_def_content
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_section_start = content.find("### Re-Review Mode", ci_section_start) or content.find(
|
||||
"#### Re-Review Mode", ci_section_start
|
||||
)
|
||||
ci_section = content[ci_section_start:re_review_section_start]
|
||||
|
||||
assert "ETA" in ci_section, (
|
||||
"CI Flag Mode notification does not include ETA indication"
|
||||
)
|
||||
|
||||
|
||||
@then("Re-Review Mode notification mentions it is a re-review")
|
||||
def step_re_review_mentions_rereview(context: Any) -> None:
|
||||
"""Verify Re-Review notification mentions it's a re-review."""
|
||||
content = context.agent_def_content
|
||||
re_review_start = content.find("### Re-Review Mode") or content.find(
|
||||
"#### Re-Review Mode"
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist", re_review_start)
|
||||
|
||||
re_section_end = min(first_review_start, review_checklist_start)
|
||||
re_section = content[re_review_start:re_section_end]
|
||||
|
||||
assert "re-review" in re_section.lower(), (
|
||||
"Re-Review Mode notification does not mention it is a re-review"
|
||||
)
|
||||
|
||||
|
||||
@then("First Review Mode notification indicates a full code review will follow")
|
||||
def step_first_review_indicates_full_review(context: Any) -> None:
|
||||
"""Verify First Review notification mentions full review follows."""
|
||||
content = context.agent_def_content
|
||||
first_review_start = content.find("#### First Review Mode")
|
||||
review_checklist_start = content.find("### Review Checklist", first_review_start)
|
||||
|
||||
first_section = content[first_review_start:review_checklist_start]
|
||||
|
||||
assert (
|
||||
"full code review" in first_section.lower()
|
||||
or "full" in first_section.lower() and "review" in first_section.lower()
|
||||
), (
|
||||
'First Review Mode notification does not indicate full code review will follow'
|
||||
)
|
||||
|
||||
|
||||
# --- Bot Signature checks ---
|
||||
|
||||
@then("all three modes include a POST request to /issues/{pr_number}/comments")
|
||||
def step_all_modes_post_to_comments(context: Any) -> None:
|
||||
"""Verify all three modes have POST to issues comments endpoint."""
|
||||
content = context.agent_def_content
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_start = (
|
||||
content.find("### Re-Review Mode", ci_section_start) or
|
||||
content.find("#### Re-Review Mode", ci_section_start)
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist")
|
||||
|
||||
# Parse each mode section
|
||||
def get_section(start, end):
|
||||
if end < 0:
|
||||
end = len(content)
|
||||
return content[start:end]
|
||||
|
||||
ci_section = get_section(ci_section_start, re_review_start)
|
||||
re_section = get_section(re_review_start, first_review_start)
|
||||
fr_section = get_section(first_review_start, review_checklist_start)
|
||||
|
||||
# Check each section for POST to issues comments
|
||||
expected_posts = [ci_section, re_section, fr_section]
|
||||
mode_names = ["CI Flag", "Re-Review", "First Review"]
|
||||
missing_modes = []
|
||||
|
||||
for i, (section, name) in enumerate(zip(expected_posts, mode_names)):
|
||||
post_pattern = "POST" in section and f"/issues/{{{''}pr_number{{'}}}}" in section or \
|
||||
"issues/" in section and "comments" in section
|
||||
if not ("issues/" in section and "comments" in section):
|
||||
missing_modes.append(name)
|
||||
|
||||
assert not missing_modes, (
|
||||
f"The following modes are missing POST to /issues/comments: {missing_modes}"
|
||||
)
|
||||
|
||||
|
||||
@then("each notification step references the Bot Signature footer")
|
||||
def step_notifications_reference_bot_signature(context: Any) -> None:
|
||||
"""Verify all notifications reference the Bot Signature."""
|
||||
content = context.agent_def_content
|
||||
ci_section_start = content.find("#### CI Flag Mode")
|
||||
re_review_start = (
|
||||
content.find("### Re-Review Mode", ci_section_start) or
|
||||
content.find("#### Re-Review Mode", ci_section_start)
|
||||
)
|
||||
first_review_start = content.find("#### First Review Mode", re_review_start)
|
||||
review_checklist_start = content.find("### Review Checklist")
|
||||
|
||||
def get_section(start, end):
|
||||
if end < 0:
|
||||
end = len(content)
|
||||
return content[start:end]
|
||||
|
||||
sections = [
|
||||
("CI Flag", ci_section_start, re_review_start),
|
||||
("Re-Review", re_review_start, first_review_start),
|
||||
("First Review", first_review_start, review_checklist_start),
|
||||
]
|
||||
|
||||
missing = []
|
||||
for name, start, end in sections:
|
||||
section = get_section(start, end)
|
||||
if "Bot Signature" not in section and "bot signature" not in section.lower():
|
||||
missing.append(name)
|
||||
|
||||
assert not missing, (
|
||||
f"The following notification steps do not reference Bot Signature: {missing}"
|
||||
)
|
||||
@@ -7,7 +7,7 @@ plan lifecycle.
|
||||
|
||||
| Command | Description |
|
||||
|-------------------------------|-----------------------------------------|
|
||||
| ``agents plan use`` | Create plan from action + project(s) |
|
||||
| ``agents plan use / start`` | Create plan from action + project(s) |
|
||||
| ``agents plan list`` | List plans with optional filters |
|
||||
| ``agents plan status`` | Show plan status / details |
|
||||
| ``agents plan execute`` | Run phase-aware plan execution |
|
||||
@@ -76,7 +76,7 @@ _ULID_VALIDATION_ERROR_MSG = (
|
||||
" legacy storage system and are invisible to v3 commands.\n"
|
||||
" 2. You referenced the wrong plan ID.\n\n"
|
||||
"To use the v3 workflow:\n"
|
||||
" - Run 'agents plan use <action> <project>' to create a v3 plan\n"
|
||||
" - Run 'agents plan start <action> <project>' to create a v3 plan\n"
|
||||
" (this returns a ULID you can use with subsequent commands).\n"
|
||||
" - Run 'agents plan execute <PLAN_ID>' to execute it.\n"
|
||||
" - Run 'agents plan apply <PLAN_ID>' to apply changes.\n\n"
|
||||
@@ -215,8 +215,8 @@ if TYPE_CHECKING:
|
||||
# Create sub-app for plan commands
|
||||
app = typer.Typer(
|
||||
help=(
|
||||
"V3 Plan Lifecycle: Create plans with 'use', execute with 'execute', "
|
||||
"apply changes with 'apply'. (Actor required; set default via "
|
||||
"V3 Plan Lifecycle: Create plans with 'use' (or 'start'), execute with "
|
||||
"'execute', apply changes with 'apply'. (Actor required; set default via "
|
||||
"'agents actor set-default')"
|
||||
)
|
||||
)
|
||||
@@ -1531,7 +1531,7 @@ def _print_lifecycle_plan(plan: Any, title: str = "Plan") -> None:
|
||||
console.print(Panel(details, title=title, expand=False))
|
||||
|
||||
|
||||
@app.command("use")
|
||||
@app.command("use", aliases=["start"])
|
||||
def use_action(
|
||||
action_name: Annotated[
|
||||
str,
|
||||
@@ -1631,9 +1631,11 @@ def use_action(
|
||||
arguments are PROJECT names. Projects can also be supplied via the
|
||||
repeatable ``--project`` / ``-p`` option.
|
||||
|
||||
Alias: ``start`` (equivalent to ``use``).
|
||||
|
||||
Examples:
|
||||
agents plan use local/code-coverage proj-1 proj-2 --arg target_coverage=80
|
||||
agents plan use local/lint --project proj-1 --invariant "No new warnings"
|
||||
agents plan start local/lint --project proj-1 --invariant "No new warnings"
|
||||
"""
|
||||
from cleveragents.application.services.plan_lifecycle_service import (
|
||||
ActionNotAvailableError,
|
||||
|
||||
Reference in New Issue
Block a user