qwen-code/.gitignore
顾盼 27b056b777
feat(skills): enforce auto-skill- directory prefix for auto-generated skills (#4839)
* feat(skills): enforce auto-skill- directory prefix for auto-generated skills

Auto-generated skills created by the managed-skill-extractor agent now use a
mandatory `auto-skill-` directory prefix, and `.gitignore` re-ignores
`.qwen/skills/auto-skill-*/` so these transient, session-specific directories
no longer surface as untracked files in `git status`.

- .gitignore: add `.qwen/skills/auto-skill-*/` after the `!.qwen/skills/**`
  unignore rule. Git's last-rule-wins semantics re-ignore only the prefixed
  directories while hand-authored project skills stay tracked. Existing
  auto-generated skills are not renamed.
- skillReviewAgentPlanner.ts: add an AUTO_SKILL_DIR_PREFIX constant and require
  the prefix in SKILL_REVIEW_SYSTEM_PROMPT and buildTaskPrompt(). The frontmatter
  `name:` stays the natural name so skills keep their normal invocation. This is
  a prompt-level convention only — SkillManager discovery is prefix-agnostic and
  `source: auto-skill` remains the file-level edit-protection marker.
- add a test asserting buildTaskPrompt() emits the prefix instruction.

Closes #4837

* test(skills): assert system-prompt prefix + reserve auto-skill- namespace

Follow-up to reviewer verification on #4839.

- Export SKILL_REVIEW_SYSTEM_PROMPT and add a unit test asserting it carries
  the `auto-skill-` prefix instruction. The prefix mandate lives on two
  independent string arrays (SKILL_REVIEW_SYSTEM_PROMPT and buildTaskPrompt);
  only the latter was guarded, so an edit could silently drop the mandate from
  the system-prompt layer. The new test closes that gap.
- Extend the .gitignore comment to reserve `auto-skill-` as an auto-generated
  namespace, noting that a hand-authored skill using this prefix would be
  ignored — preventing a silent-untrack surprise.
2026-06-08 17:07:00 +08:00

107 lines
2 KiB
Text

# API keys and secrets
.env
.env~
# gemini-cli settings
# We want to keep the .gemini in the root of the repo and ignore any .gemini
# in subdirectories. In our root .gemini we want to allow for version control
# for subcommands.
**/.gemini/
!/.gemini/
.gemini/*
!.gemini/config.yaml
!.gemini/commands/
# Note: .qwen-clipboard/ is NOT in gitignore so Gemini can access pasted images
# Dependency directory
node_modules
bower_components
package-lock.json
# Editors
.idea
*.iml
.cursor
.qoder
.claude
CLAUDE.md
.codex
# Qwen Code Configs
.qwen/*
!.qwen/commands/
!.qwen/commands/**
!.qwen/skills/
!.qwen/skills/**
# Re-ignore auto-generated skills (created by the managed-skill-extractor
# agent with the mandatory `auto-skill-` directory prefix). Git's last-rule-
# wins semantics keep hand-authored project skills tracked while excluding
# these transient, session-specific directories. The `auto-skill-` prefix is
# reserved for auto-generated skills — do not hand-author a project skill with
# this prefix, or its directory will be ignored here.
.qwen/skills/auto-skill-*/
!.qwen/agents/
!.qwen/agents/**
# OS metadata
.DS_Store
Thumbs.db
# TypeScript build info files
*.tsbuildinfo
# Ignore built ts files
dist
# Docker folder to help skip auth refreshes
.docker
bundle
# Test report files
junit.xml
packages/*/coverage/
# PR body draft
pr_body.md
# Generated files
packages/cli/src/generated/
packages/core/src/generated/
packages/web-templates/src/generated/
.integration-tests/
packages/vscode-ide-companion/*.vsix
logs/
.repro-runs/
# GHA credentials
gha-creds-*.json
# Log files
patch_output.log
# docs build
docs-site/.next
# content is a symlink to ../docs
docs-site/content
# python cache
__pycache__/
integration-tests/concurrent-runner/output/
integration-tests/concurrent-runner/task-*
integration-tests/terminal-capture/scenarios/screenshots/
# storybook
*storybook.log
storybook-static
# Dev symlink: qc-helper bundled skill docs (created by scripts/dev.js)
packages/core/src/skills/bundled/qc-helper/docs
tmp/
# code graph skills
.venv
.codegraph