* feat(github-copilot-sdk): add workspace skills support - Introduce ENABLE_WORKSPACE_SKILLS valve to enable/disable workspace custom tools discovery - Modify _build_session_config() to auto-load tools from .copilot-skills/ directory - Add workspace_skills_example.py template with 3 working example tools - Update README.md and README_CN.md with Workspace Skills guide and usage examples - Create v0.9.0.md and v0.9.0_CN.md release notes - Sync version to all docs files (index.md, index.zh.md, and main docs) - Bump version from 0.8.0 to 0.9.0 across all 7+ locations * docs: establish temp files handling policy (project-based, not /tmp) - Add TEMP_FILES_POLICY.md guideline for all skills and workflows - Update pr-submitter skill to use .temp/ directory instead of /tmp - Update release-prep skill documentation with temp file convention - Add .temp/ and .build/ entries to .gitignore - Create internal policy memo in /memories/repo/ This policy ensures: - All temporary files stay within project workspace (not system /tmp) - Alignment with OpenWebUI workspace isolation principles - Multi-user safety and cleanup traceability - Consistent handling across all skills and development workflows * fix(terminology): rename 'workspace skills' to 'workspace custom tools' for accuracy The term 'Skills' in Anthropic context refers to instruction-based frameworks (SKILL.md files with YAML frontmatter + markdown), not custom tool functions. Our implementation uses @define_tool decorator to define custom tools that the SDK auto-discovers from .copilot-skills/ directory. These are Tools, not Skills. Changes: - Rename ENABLE_WORKSPACE_SKILLS valve -> ENABLE_WORKSPACE_TOOLS - Update all documentation (README, README_CN, docs, release notes) - Fix section headings and descriptions throughout - Ensure consistent terminology across all files This is a terminology-only change; functionality remains identical. * feat(pipes): release v0.9.0 of GitHub Copilot SDK Pipe - Integrated OpenWebUI Skills Bridge and manage_skills tool - Reinforced status bar stability with session_finalized logic - Added persistent SDK config directory support * docs(pipes): add comprehensive guides and v0.9.0 notes for Copilot SDK - Added skill manager and best practices guides - Added publishing tool documentation - Included v0.9.0 release notes and deployment script - Updated usage guides
122 lines
3.2 KiB
Markdown
122 lines
3.2 KiB
Markdown
# Temporary Files Handling Policy
|
||
|
||
**Last Updated**: 2026-02-26
|
||
**Status**: Active Guideline
|
||
|
||
## Overview
|
||
|
||
All temporary files created during skill execution or development workflows must follow this centralized policy to maintain project cleanliness and workspace isolation alignment.
|
||
|
||
## Core Rule
|
||
|
||
**Temporary files MUST be stored in the project's `.temp/` directory, NOT in system directories like `/tmp`.**
|
||
|
||
## Rationale
|
||
|
||
1. **Workspace Isolation**: Aligns with OpenWebUI's workspace-per-user model
|
||
2. **Project Cohesion**: All project artifacts (temporary or permanent) stay within project boundaries
|
||
3. **Multi-User Safety**: Avoids conflicts between multiple developers using the same system
|
||
4. **Cleanup Traceability**: Easy to verify all temp files are cleaned up via single `.temp/` directory
|
||
5. **Debugging**: Inspectable before deletion if issues occur
|
||
|
||
## Usage Pattern
|
||
|
||
### Creating Temp File
|
||
|
||
```bash
|
||
# Step 1: Ensure temp directory exists
|
||
mkdir -p .temp
|
||
|
||
# Step 2: Write temp file
|
||
cat > .temp/my_temp_file.md << 'EOF'
|
||
...content...
|
||
EOF
|
||
|
||
# Step 3: Use the file in your workflow
|
||
# (e.g., pass to gh CLI, process with script, etc.)
|
||
```
|
||
|
||
### Cleanup After Use
|
||
|
||
```bash
|
||
# Remove individual temp files
|
||
rm -f .temp/my_temp_file.md
|
||
|
||
# Or full cleanup of entire temp directory
|
||
rm -rf .temp/
|
||
```
|
||
|
||
## Skills Affected
|
||
|
||
| Skill | Implementation | Status |
|
||
|-------|----------------|--------|
|
||
| `pr-submitter` | PR body file (`.temp/pr_body.md`) | ✅ Updated |
|
||
| `release-prep` | Draft notes (if any) | ✅ Policy Added |
|
||
| `version-bumper` | Backup files (if any) | ℹ️ Check needed |
|
||
| Future skills | TBD | 📋 Must follow policy |
|
||
|
||
## .gitignore Configuration
|
||
|
||
The following entry in `.gitignore` ensures temp files are never committed:
|
||
|
||
```
|
||
# Temporary files
|
||
.temp/
|
||
.build/
|
||
```
|
||
|
||
## Examples
|
||
|
||
### Example 1: PR Submitter Skill
|
||
```bash
|
||
# Create PR body in temp directory
|
||
mkdir -p .temp
|
||
cat > .temp/pr_body.md << 'EOF'
|
||
## Summary
|
||
New feature implementation
|
||
EOF
|
||
|
||
# Use with gh CLI
|
||
gh pr create --body-file .temp/pr_body.md --title "feat: new feature"
|
||
|
||
# Cleanup
|
||
rm -f .temp/pr_body.md
|
||
```
|
||
|
||
### Example 2: Release Prepare Workflow
|
||
```bash
|
||
# Create draft changelog
|
||
mkdir -p .temp
|
||
cat > .temp/changelog_draft.md << 'EOF'
|
||
# v1.0.0 Release Notes
|
||
EOF
|
||
|
||
# Edit, validate, then integrate into real files
|
||
# ...
|
||
|
||
# Cleanup
|
||
rm -f .temp/changelog_draft.md
|
||
```
|
||
|
||
## Anti-Patterns (❌ Don't Do This)
|
||
|
||
- ❌ Writing temp files to `/tmp` — will be lost/orphaned
|
||
- ❌ Writing to root directory or `plugins/` — pollutes repo
|
||
- ❌ Not cleaning up temp files — accumulates clutter
|
||
- ❌ Committing `.temp/` files to git — defeats the purpose
|
||
- ❌ Using absolute paths — breaks workflow portability
|
||
|
||
## Enforcement
|
||
|
||
1. **Code Review**: PRs should verify no `/tmp` references in scripts
|
||
2. **CI/CD**: Setup can validate `.temp/` cleanup via git status before commit
|
||
3. **Documentation**: All skill docs must reference this policy (link to this file)
|
||
4. **Automated**: Consider adding pre-commit hook to ensure `.temp/` is not staged
|
||
|
||
## Questions / Clarifications
|
||
|
||
For questions about this policy, refer to:
|
||
- `.github/skills/pr-submitter/SKILL.md` — Practical example
|
||
- `.github/skills/release-prep/SKILL.md` — Policy integration
|
||
- `/memories/repo/temp-file-handling-convention.md` — Internal notes
|