Doubao-powered voice input for Linux, Wayland and Omarchy
fix(packaging): remove distributed agent instructions
quanrubeec7f4e3a3b
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 254d841..b374117 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -7,7 +7,7 @@ There is no published repository/release for this revision yet.## Agent workflow and bug evidence-Read [AGENTS.md](AGENTS.md) before making changes. For every bug verification+Read [DEVELOPMENT.md](DEVELOPMENT.md) before making changes. For every bug verificationround, reproduce the problem before editing, retain before/after screenshots,and repeat the same scenario after the fix. Use real application captures forUI changes; supplement screenshots with assertions or sanitized logs for focus,@@ -21,7 +21,7 @@ Store each round under `artifacts/verification/<task>/<round>/`, including acommands, exit codes, results, and evidence paths. Inspect the captures and linkbefore/after images in the handoff. These local artifacts are ignored by Git;include a durable verification summary and sanitized attachments when sharing-an issue or PR. See AGENTS.md for the complete workflow.+an issue or PR. See DEVELOPMENT.md for the complete workflow.## Developmentdiff --git a/AGENTS.md b/DEVELOPMENT.mdsimilarity index 96%rename from AGENTS.mdrename to DEVELOPMENT.mdindex d9f8097..fb04467 100644--- a/AGENTS.md+++ b/DEVELOPMENT.md@@ -1,12 +1,12 @@-# Agent Development Guidelines+# Development and Verification Guide-These instructions apply to the entire Doubao Say repository. Before starting,+This guide applies to development across the Doubao Say repository. Before starting,read this file, [CONTRIBUTING.md](CONTRIBUTING.md), and[tests/README.md](tests/README.md).## Collaboration and scope-- This is an English-by-default project. Write agent instructions, development+- This is an English-by-default project. Write development guidance, developmentdocumentation, code comments, and new primary UI copy in English. Keep explicitlylocalized documents and translations in their target languages. Follow theuser's requested language when communicating.@@ -148,7 +148,7 @@ read this file, [CONTRIBUTING.md](CONTRIBUTING.md), and## Documentation and release-- Keep this file and primary development documentation entirely in English.+- Keep this guide and primary development documentation entirely in English.Update README.md and README.zh-CN.md when user-visible behavior changes; updateCONTRIBUTING.md and tests/README.md when development workflows change.- Use focused conventional commits and stage only files owned by the current task.diff --git a/README.md b/README.mdindex f103a03..14d924c 100644--- a/README.md+++ b/README.md@@ -362,7 +362,7 @@ full lifecycle and recovery instructions.## Development and local packaging-Development and AI-agent work follow [AGENTS.md](AGENTS.md) and+Development and AI-assisted work follow [DEVELOPMENT.md](DEVELOPMENT.md) and[CONTRIBUTING.md](CONTRIBUTING.md). Bug fixes require reproducible verificationand before/after screenshots for each UI verification round, with test or logevidence for behavior that screenshots cannot prove. Report any unverified scope.diff --git a/README.zh-CN.md b/README.zh-CN.mdindex 6203b9f..c636394 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -282,7 +282,7 @@ cd "${XDG_CONFIG_HOME:-$HOME/.config}/omarchy/plugins/md.lifeos.doubao-say"## 开发与本地打包-开发与 AI Agent 协作遵循 [AGENTS.md](AGENTS.md) 和+开发与 AI 辅助协作遵循 [DEVELOPMENT.md](DEVELOPMENT.md) 和[贡献指南](CONTRIBUTING.md)。Bug 修复需可复现验证,每轮界面验证保存修复前后截图;截图无法证明的行为需补充测试或日志证据,并明确尚未验证的范围。diff --git a/packaging/MARKETPLACE.md b/packaging/MARKETPLACE.mdindex 60c1927..8e4aec9 100644--- a/packaging/MARKETPLACE.md+++ b/packaging/MARKETPLACE.md@@ -10,8 +10,10 @@ Suggested category: **Productivity**. Tags: **ai, hyprland**.1. Run `make check` and `make marketplace-check` (requires Omarchy and Gitleaks).The latter exports current Git-visible files to a temporary directory withoutcommitting or staging, rejects tracked ignored files/symlinks, validates the- official manifest, links, versions, executable launchers and scans all local- Git refs plus source. Redacted reports remain in ignored `artifacts/marketplace/`.+ official manifest, links, versions, executable launchers, and rejects files+ that coding agents automatically interpret as workspace instructions. It scans+ all local Git refs plus source. Redacted reports remain in ignored+ `artifacts/marketplace/`.2. Build the pinned offline wheel set and run `make release`. Keep installers,checksums and dependency notices together. Checksums are not signatures.3. Run `tests/manual/clean_install.py` against the app archive. This tests a freshdiff --git a/packaging/source_snapshot.py b/packaging/source_snapshot.pyindex d1bb537..461481a 100644--- a/packaging/source_snapshot.py+++ b/packaging/source_snapshot.py@@ -4,6 +4,31 @@ import shutilimport subprocess+AUTOMATIC_AGENT_INSTRUCTION_NAMES = {+ ".clinerules",+ ".cursorrules",+ ".windsurfrules",+ "agents.md",+ "agents.override.md",+ "claude.md",+ "gemini.md",+}+++def is_automatic_agent_instruction(relative: Path) -> bool:+ """Return whether an installed checkout could auto-load this as agent policy."""+ lowered = tuple(part.casefold() for part in relative.parts)+ if relative.name.casefold() in AUTOMATIC_AGENT_INSTRUCTION_NAMES:+ return True+ if lowered == (".github", "copilot-instructions.md"):+ return True+ return (+ len(lowered) >= 3+ and lowered[0:2] == (".github", "instructions")+ and lowered[-1].endswith(".instructions.md")+ )++def export_source(root: Path, destination: Path) -> list[Path]:"""Include unstaged/new source, exclude ignored files, reject unsafe content."""root = root.resolve()@@ -17,6 +42,10 @@ def export_source(root: Path, destination: Path) -> list[Path]:relative = Path(name)if relative.is_absolute() or ".." in relative.parts:raise ValueError("Unsafe repository path")+ if is_automatic_agent_instruction(relative):+ raise ValueError(+ f"Automatic agent instruction file cannot be published: {relative}"+ )path = root / relativeif path.is_symlink() or any(p.is_symlink() for p in path.parents if p != root):raise ValueError(f"Symlink cannot be published: {relative}")diff --git a/tests/README.md b/tests/README.mdindex 8d07a34..6fce3a9 100644--- a/tests/README.md+++ b/tests/README.md@@ -12,7 +12,7 @@`make test` runs both. See `CONTRIBUTING.md` before running anything under`manual/`.-Bug reproduction and visual acceptance follow [AGENTS.md](../AGENTS.md).+Bug reproduction and visual acceptance follow [DEVELOPMENT.md](../DEVELOPMENT.md).For each verification round, keep before/after captures and a verification recordunder `artifacts/verification/<task>/<round>/` (ignored by Git). Supplement visualevidence with behavior assertions; document missing evidence and checks that werediff --git a/tests/contracts/test_marketplace.py b/tests/contracts/test_marketplace.pyindex bd68b87..a009097 100644--- a/tests/contracts/test_marketplace.py+++ b/tests/contracts/test_marketplace.py@@ -47,6 +47,37 @@ class MarketplaceTest(unittest.TestCase):with self.assertRaisesRegex(ValueError, "Tracked ignored"):snapshot.export_source(root, Path(folder) / "out")+ def test_rejects_automatic_agent_instructions_from_installed_tree(self):+ blocked = (+ "AGENTS.md",+ "nested/AGENTS.override.md",+ "CLAUDE.md",+ ".github/copilot-instructions.md",+ ".github/instructions/review.instructions.md",+ )+ for relative in blocked:+ with self.subTest(relative=relative), tempfile.TemporaryDirectory() as folder:+ root = Path(folder) / "repo"+ self.repo(root)+ path = root / relative+ path.parent.mkdir(parents=True, exist_ok=True)+ path.write_text("third-party instructions")+ with self.assertRaisesRegex(+ ValueError, "Automatic agent instruction file cannot be published"+ ):+ snapshot.export_source(root, Path(folder) / "out")++ def test_allows_normal_development_documentation(self):+ with tempfile.TemporaryDirectory() as folder:+ root = Path(folder) / "repo"+ self.repo(root)+ (root / "DEVELOPMENT.md").write_text("Development guide")+ destination = Path(folder) / "snapshot"+ snapshot.export_source(root, destination)+ self.assertEqual(+ (destination / "DEVELOPMENT.md").read_text(), "Development guide"+ )+def test_rejects_symlink_without_overwriting_destination(self):with tempfile.TemporaryDirectory() as folder:root = Path(folder) / "repo"