Add skern init --no-instructions explicit opt-out (#104) - #107
Closed
devrimcavusoglu wants to merge 3 commits into
Closed
Add skern init --no-instructions explicit opt-out (#104)#107devrimcavusoglu wants to merge 3 commits into
skern init --no-instructions explicit opt-out (#104)#107devrimcavusoglu wants to merge 3 commits into
Conversation
This was referenced Aug 19, 2026
Closed
init already never prompts when stdin is not a TTY or --json is set, but that contract was undocumented, so installers had to rely on the prompt defaulting to "no". Add --no-instructions as an explicit opt-out that writes nothing and never prompts, reject it with a validation error (exit 2) when combined with any opt-in flag, and document the non-interactive contract in --help and the docs. Closes #104 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot reads project skills from .github/skills, .claude/skills, or .agents/skills, so skern's value is a valid Copilot path and the shared cross-agent convention, not a bug. Record that with the GitHub docs citation on the Copilot page and the shared-directory section, and note the one-body-per-name limitation that #47/#101 track. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gs silence prompts - isTerminal uses golang.org/x/term: /dev/null is a character device but not a terminal, so `skern init < /dev/null` printed the prompt. - Flag conflicts are rejected before .skern/ is created; values (not Changed state) are compared so `--instructions=false --no-instructions` is accepted. - Any instruction flag disables both prompts; `init --instructions` on a terminal no longer blocks on the tool-forming question. - isTerminalFn is injectable; new tests prove no prompt text and no stdin read under --no-instructions / any flag with a simulated terminal, and that the no-flag path really prompts. tests/manual/setup.sh passes --no-instructions. Docs/CHANGELOG state the contract precisely. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
devrimcavusoglu
force-pushed
the
feature/init-no-instructions
branch
from
August 19, 2026 13:14
d912a47 to
196d7a8
Compare
devrimcavusoglu
changed the base branch from
main
to
fix/frontmatter-passthrough
August 19, 2026 13:14
Owner
Author
Review (adversarial pass against #104, and #101 claim 1)#104 DoD: flag ✅; documented non-TTY behavior — the documentation was right in spirit but the code had a real hole, now fixed (
#101 claim 1: verified against GitHub's page (project skills in Stacked on #106 (base |
6 tasks
5 tasks
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #104.
--no-instructionsflag onskern init: writes nothing, never prompts, regardless of TTY state. Combining it with--instructions,--print-instructions,--target, or--tool-forming-loopis a validation error (exit 2), matching the CLI's convention for bad input.--help,docs/reference/commands.md, and the agent-setup guide: when stdin is not a TTY or--jsonis set, skern never prompts and never blocks on input — both questions resolve to "no". This was already the behavior (resolveInstructionChoicesgates onisTerminal(stdin)), so the issue's worry about a future blocking read is covered by making it a stated guarantee plus the explicit flag.Issue DoD
--no-instructionsinit --helpAlso in this PR (docs only)
Addresses claim 1 of #101: GitHub Copilot reads project skills from
.github/skills/,.claude/skills/, or.agents/skills/(GitHub docs), so skern's.agents/skills/value is valid and no path change is needed. The Copilot platform page and the shared-directory concept section now say so with the citation (mirrors what #105 put in AGENTS.md), and note the one-body-per-name limitation tracked by #47/#101. #101 stays open for claim 2.Test plan
TestInit_NoInstructions_WritesNothing(AGENTS.md present and untouched,instructions: null),TestInit_NoInstructions_TextMode,TestInit_NoInstructions_ConflictsWithOptIn(all four opt-in flags →ValidationError, nothing written)go test ./...,make lintgreenskern init --no-instructionsin a dir withAGENTS.md→ exit 0, file untouched, no prompt;--no-instructions --instructions→ exit 2🤖 Generated with Claude Code