[Feature]: Add a builtin /learn command that captures session lessons

Đang mở
#610 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

Start by reading the existing /review command, which the issue identifies as a possible model for sending a hidden transport prompt, then trace how the TUI registers slash commands, exposes help and autocomplete, and handles session availability. Map how workspace and global AGENTS.md files and .agents/skills/ are represented before scoping the implementation. Done means /learn proposes a reviewable diff, writes only after approval, and meets the listed transcript, session, and no-lesson acceptance criteria.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Product or interface

CLI - interactive TUI

Use case and problem

A session often teaches the agent something durable: a correction the user had to make, a mistake that repeated, or a fix that finally worked. That lesson disappears when the session ends. Today the user has to notice it, decide whether it belongs in the project instructions or a Skill, find the right file, and write it by hand. In practice it usually is not written, so the next session repeats the same correction.

The Antigravity CLI ships a builtin /learn command for exactly this, and it is one of the most useful parts of its workflow.

Desired behavior

Add a builtin /learn [instruction] slash command to the interactive TUI.

  • /learn reflects on the current session and finds the lesson behind recent corrections, failed attempts, or repeated mistakes.
  • It classifies the lesson as a short project rule or a reusable multi-step Skill.
  • It inspects the workspace AGENTS.md, the global AGENTS.md in the data directory, and existing Skills, and prefers updating an existing file over adding a duplicate.
  • It proposes the target file, scope, rationale, and exact diff, then waits for approval before writing anything.
  • An optional instruction narrows or supplies the lesson, for example /learn always run vitest with --pool=forks.
  • It requires an active session and is unavailable in temporary side conversations.

Acceptance criteria:

  • /learn appears in help and slash autocomplete once a session exists, and explains why it is unavailable otherwise.
  • The transcript shows /learn ..., while the agent receives the learning instruction.
  • The agent proposes before writing and applies only approved edits, even in a permission mode that would allow writes.
  • With no reusable lesson, it says so instead of inventing one.
  • Rules land in AGENTS.md (or the workspace instruction file that takes precedence); multi-step procedures land in .agents/skills/<name>/SKILL.md with name and description frontmatter.

Platform

Multiple platforms

Alternatives and additional context

  • A normal prompt can do this today, but it is not discoverable and does not consistently produce a reviewable proposal.
  • The existing /review command already sends a hidden transport prompt, so /learn could reuse that mechanism without new runtime surface.
  • ACP clients and headless exec do not expand TUI slash commands; supporting them would be separate work.
  • Related: /skills lists installed Skills but does not create them.
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
315
Merge trung bình
3 giờ 54 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MiniMax-AI/minimax-code

Tất cả issue của MiniMax-AI/minimax-code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.