mirror of
https://github.com/wshobson/agents
synced 2026-06-21 14:13:58 +00:00
revert: remove --commit flag and Makefile wiring (follow project contribution patterns)
- Keep generation local by default (.copilot) - Revert opt-in --commit behavior that wrote to .github/agents - Retain validator adjustments scoped to .copilot - Clean branch focuses only on adapter ergonomics and validator behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -170,9 +170,9 @@ ifndef HARNESS
|
||||
@exit 1
|
||||
endif
|
||||
ifdef PLUGIN
|
||||
$(UV_TOOLS) $(GENERATE) --harness '$(HARNESS)' --plugin '$(PLUGIN)' $(if $(COMMIT),--output-root '$(CURDIR)/.github',)
|
||||
$(UV_TOOLS) $(GENERATE) --harness '$(HARNESS)' --plugin '$(PLUGIN)'
|
||||
else
|
||||
$(UV_TOOLS) $(GENERATE) --harness '$(HARNESS)' --all $(if $(COMMIT),--output-root '$(CURDIR)/.github',)
|
||||
$(UV_TOOLS) $(GENERATE) --harness '$(HARNESS)' --all
|
||||
endif
|
||||
|
||||
generate-all:
|
||||
|
||||
+1
-17
@@ -34,10 +34,7 @@ _HARNESS_TARGETS = {
|
||||
"cursor": [".cursor", ".cursor-plugin"],
|
||||
"opencode": [".opencode", "opencode.json"],
|
||||
"gemini": ["commands", "agents", "skills"],
|
||||
# Copilot may emit locally to .copilot (default) or committed artifacts under
|
||||
# .github/agents when running in ``--commit`` mode. Both locations are valid
|
||||
# candidates for validation/cleanup.
|
||||
"copilot": [".copilot", ".github/agents"],
|
||||
"copilot": [".copilot"],
|
||||
}
|
||||
|
||||
|
||||
@@ -216,23 +213,10 @@ def main() -> int:
|
||||
default=str(WORKTREE),
|
||||
help="Root directory for output (default: repo root).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--commit",
|
||||
action="store_true",
|
||||
help="When set for copilot, write committed artifacts under .github/agents instead of local .copilot (default: local .copilot).",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
output_root = Path(args.output_root).resolve()
|
||||
|
||||
# For Copilot, default to a local-generation cache (.copilot) unless the user
|
||||
# explicitly requests commit-mode (or passes an explicit --output-root).
|
||||
if args.harness == "copilot" and args.output_root == str(WORKTREE):
|
||||
if args.commit:
|
||||
output_root = WORKTREE / ".github"
|
||||
else:
|
||||
output_root = WORKTREE / ".copilot"
|
||||
|
||||
# Containment guard before any destructive operation.
|
||||
if args.clean or args.prune:
|
||||
err = _validate_output_root(output_root)
|
||||
|
||||
Reference in New Issue
Block a user