Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

122 changes: 46 additions & 76 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,108 +1,78 @@
name: Bug 反馈
title: "[Bug]: "
description: 提交 Bug 反馈以帮助我们改进代码
labels: ["bug"]
name: Bug Report
description: Report a confirmed defect or regression
title: "bug: "
labels:
- bug
body:
- type: checkboxes
id: ensure
- type: markdown
attributes:
label: 确认项
description: 请确认以下选项
options:
- label: 问题的标题明确
required: true
- label: 我翻阅过其他的 issue 并且找不到类似的问题
required: true
- label: 我已经尝试过在最新的代码中修复这个问题
required: false
- type: dropdown
id: env-os
attributes:
label: 操作系统
description: 选择运行 NoneBot 的系统
options:
- Windows
- MacOS
- Linux
- Other
validations:
required: true
value: |
Provide a reproducible report. Include exact commands, config, and observed behavior.

- type: input
id: env-python-ver
id: summary
attributes:
label: Python 版本
description: 填写运行 NoneBot 的 Python 版本
placeholder: e.g. 3.11.0
label: Summary
description: One-sentence description of the bug
placeholder: codex_workdir is ignored by /home and the directory browser Home action
validations:
required: true

- type: input
id: env-nb-ver
attributes:
label: NoneBot 版本
description: 填写 NoneBot 版本
placeholder: e.g. 2.3.0
validations:
required: true

- type: input
id: env-adapter
- type: textarea
id: environment
attributes:
label: 适配器
description: 填写 NoneBot 加载使用的适配器
placeholder: e.g. OneBot V11
label: Environment
description: Python, PDM, NoneBot, adapter, OS, and any relevant Codex setup details
placeholder: |
Python:
PDM:
NoneBot:
Adapter:
OS:
Codex CLI:
validations:
required: true

- type: input
id: env-plugin
- type: textarea
id: reproduce
attributes:
label: 插件版本
description: 填写使用的插件版本
placeholder: e.g. 0.1.0
label: Steps To Reproduce
description: Provide exact steps or commands
placeholder: |
1. Configure codex_workdir = "/tmp/work"
2. Start the bot
3. Run /home
4. Observe the reported workdir
validations:
required: true

- type: textarea
id: describe
id: expected
attributes:
label: 描述问题
description: 清晰简洁地说明问题是什么
label: Expected Behavior
validations:
required: true

- type: textarea
id: reproduction
id: actual
attributes:
label: 复现步骤
description: 提供能复现此问题的详细操作步骤
placeholder: |
1. 首先……
2. 然后……
3. 发生……
label: Actual Behavior
validations:
required: true

- type: textarea
id: expected
id: evidence
attributes:
label: 期望的结果
description: 清晰简洁地描述你期望发生的事情
label: Verification Evidence
description: Include failing tests, logs, screenshots, or command output summaries

- type: textarea
id: logs
id: affected
attributes:
label: 截图或日志
description: 提供有助于诊断问题的任何日志和截图

- type: textarea
id: config
attributes:
label: Nonebot 配置项
description: Nonebot 配置项 (如果你的配置文件中包含敏感信息,请自行删除)
render: dotenv
label: Affected Files Or Commands
placeholder: |
# e.g.
# KEY=VALUE
# KEY2=VALUE2
src/nonebot_plugin_codex/service.py
src/nonebot_plugin_codex/telegram.py
/home
/cd

6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: Repository Plans
url: https://github.com/ttiee/nonebot-plugin-codex/tree/main/docs/plans
about: Review existing design and implementation planning documents before opening broad-scoped requests.

26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

59 changes: 40 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
name: 功能建议
title: "[Feature]: "
description: 提出关于项目新功能的想法
labels: ["enhancement"]
name: Feature Request
description: Propose an improvement or new capability
title: "feat: "
labels:
- enhancement
body:
- type: checkboxes
id: ensure
- type: markdown
attributes:
label: 确认项
description: 请确认以下选项
options:
- label: 新特性的目的明确
required: true
- label: 我已经使用过该插件并且了解其功能
required: true
value: |
Describe the user problem first, then the proposed solution.

- type: input
id: summary
attributes:
label: Summary
placeholder: Add button panels for mode/model/effort/permission commands
validations:
required: true

- type: textarea
id: problem
attributes:
label: 希望能解决的问题
description: 在使用中遇到什么问题而需要新的功能?
label: Problem Statement
description: What is hard, missing, or error-prone today?
validations:
required: true

- type: textarea
id: feature
id: proposal
attributes:
label: 描述所需要的功能
description: 请说明需要的功能或解决方法
label: Proposed Solution
validations:
required: true
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered

- type: textarea
id: scope
attributes:
label: Scope And Constraints
description: Compatibility, migration, UX, or testing constraints that matter

- type: textarea
id: verification
attributes:
label: Verification Plan
description: Tests, manual checks, or rollout validation you expect

21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Summary

-

## Linked Issue

Closes #

## What Changed

-

## Verification

- [ ] `pdm run pytest -q`
- [ ] `pdm run ruff check .`

## Risks / Follow-Ups

-

55 changes: 55 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Repository Guidelines

## Project Scope

`nonebot-plugin-codex` is a NoneBot plugin that exposes local Codex CLI workflows through Telegram. The repository is a Python package using a `src/` layout and PDM for dependency management.

## Repository Layout

- `src/nonebot_plugin_codex/`: plugin source code
- `tests/`: pytest-based automated tests
- `docs/plans/`: design and implementation planning documents
- `docs/maintenance/`: tracked maintenance items and issue-ready notes

## Working Norms

- Keep changes aligned with the current plugin architecture and configuration compatibility.
- Prefer small, reviewable changes with explicit tests for behavior changes.
- Do not silently change documented config semantics; update docs and tests together.
- Preserve backward compatibility for user-facing commands unless the change is explicitly intentional and documented.

## Development Commands

- Install dependencies: `pdm sync -G:all`
- Run tests: `pdm run pytest -q`
- Run focused tests: `pdm run pytest tests/test_service.py tests/test_telegram_handlers.py -q`
- Run lint: `pdm run ruff check .`

Use `pdm run ...` for repository commands so the project environment and `src/` import path are configured correctly.

## Code Change Expectations

- Follow TDD for behavior changes: write or update the failing test first, verify the failure, then implement the minimum fix.
- Reuse existing callback/state patterns before adding new interaction mechanisms.
- Keep repository files ASCII unless an existing file already uses non-ASCII content and it is appropriate to match it.
- Avoid unrelated refactors while fixing a bug or delivering a scoped improvement.

## Issue Expectations

- Every non-trivial change should be traceable to an issue or a documented maintenance note.
- Issue reports should include reproduction steps, expected behavior, actual behavior, and the affected files or commands.
- Use `docs/maintenance/` markdown files as durable issue drafts when preparing GitHub issues from local work.

## Pull Request Expectations

- Link the PR to the relevant issue.
- Summarize user-visible behavior changes and internal refactors separately.
- Include fresh verification evidence, at minimum:
- `pdm run pytest -q`
- `pdm run ruff check .`
- Call out any unverified areas or follow-up work explicitly.

## Safety Notes

- Respect persisted compatibility paths such as `data/codex_bridge/preferences.json` and `~/.codex/*` unless the change explicitly updates migration behavior.
- Do not remove or rewrite user-authored documents under `docs/` unless the task requires it.
Loading