forked from flaviocopes/fstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Add continuous cloud-agent workflow and repository safeguards #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5998d3e
Add repository contract for cloud agents
naytewilson 97d167f
Point Claude agents to repository contract
naytewilson 6c091b9
Add Copilot coding-agent instructions
naytewilson 58c01fb
Add dependency-free skill validation
naytewilson d397569
Add CI validation for skills
naytewilson 1c2d3cf
Add continuous cloud-agent runner skill
naytewilson d411428
Document end-to-end cloud-agent setup
naytewilson 7a4a930
Add evidence-focused pull request template
naytewilson 18170ee
Route autonomous tasks to fstack-run
naytewilson 95ecabe
Document interactive and cloud-agent modes
naytewilson 93276b4
Correct dependency statement in README
naytewilson 41c4635
Add official GitHub skill management path
naytewilson 52d30a1
Document official GitHub skill installation
naytewilson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Repository instructions | ||
|
|
||
| Follow `AGENTS.md` as the repository-wide engineering contract. | ||
|
|
||
| Keep fstack portable, dependency-light, and simple. Preserve the distinction between interactive skills and the continuous `fstack-run` cloud workflow. Inspect source truth before editing, make the smallest complete change, run `sh scripts/validate.sh`, inspect the final diff, and deliver changes on a task branch through a pull request. | ||
|
|
||
| Never overwrite unrelated work, commit secrets, force-push, or claim unobserved test results. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| ## What changed | ||
|
|
||
| <!-- State the user-visible or agent-visible outcome. --> | ||
|
|
||
| ## Why this is the smallest complete change | ||
|
|
||
| <!-- Name deliberate exclusions and avoided complexity. --> | ||
|
|
||
| ## Evidence | ||
|
|
||
| ```text | ||
| Commands run: | ||
|
|
||
| Observed results: | ||
| ``` | ||
|
|
||
| ## Skill and documentation checks | ||
|
|
||
| - [ ] `sh -n scripts/validate.sh` | ||
| - [ ] `sh scripts/validate.sh` | ||
| - [ ] `git diff --check` against the base branch | ||
| - [ ] New or changed skills are documented in `README.md` | ||
| - [ ] Frontmatter name matches the skill directory | ||
| - [ ] No secrets, credentials, private local paths, or generated files were added | ||
|
|
||
| ## Missing evidence or remaining risk | ||
|
|
||
| <!-- Write "None" only when every applicable check was observed. --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Validate skills | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - 'feat/**' | ||
| - 'fix/**' | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: validate-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Check validator syntax | ||
| run: sh -n scripts/validate.sh | ||
|
|
||
| - name: Validate skill collection | ||
| run: sh scripts/validate.sh | ||
|
|
||
| - name: Check changed text for whitespace errors | ||
| shell: sh | ||
| run: | | ||
| base=${GITHUB_BASE_REF:-main} | ||
| git diff --check "origin/$base...HEAD" | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| # fstack repository agent contract | ||
|
|
||
| ## Purpose | ||
|
|
||
| fstack is a portable collection of Agent Skills. Keep it small, readable, agent-agnostic, and safe to install in other repositories. | ||
|
|
||
| The interactive skills intentionally stop at human decision points. `fstack-run` is the continuous cloud-agent path. Do not remove either mode or silently make one behave like the other. | ||
|
|
||
| ## Source of truth | ||
|
|
||
| Before changing the repository: | ||
|
|
||
| 1. Confirm the repository root, current branch, HEAD, and working-tree state. | ||
| 2. Read this file, `README.md`, and every skill or document affected by the task. | ||
| 3. Inspect recent history when the task changes established behavior. | ||
| 4. Treat repository files and command output as authoritative. Do not substitute conversation memory for current state. | ||
| 5. Preserve unrelated or pre-existing changes. Never reset, clean, overwrite, or force-push them away. | ||
|
|
||
| ## Change rules | ||
|
|
||
| - Make the smallest complete change that satisfies the request. | ||
| - Keep one job per skill. | ||
| - Keep `SKILL.md` concise. The hard limit is 500 lines; prefer roughly 150 or fewer. | ||
| - Keep skill names lowercase and hyphenated. The frontmatter `name` must match the containing directory. | ||
| - Put activation conditions in the frontmatter `description` so agents can discover the skill correctly. | ||
| - Prefer plain Markdown. Add scripts, references, or assets only when they improve repeatability or correctness. | ||
| - Do not hardcode one vendor's tool names into a generally portable skill unless the skill is explicitly vendor-specific. | ||
| - Do not add dependencies or generated files for validation that POSIX shell can handle. | ||
| - Update `README.md` whenever a skill is added, renamed, removed, or materially changes behavior. | ||
|
|
||
| ## Continuous cloud-agent behavior | ||
|
|
||
| When a user asks for autonomous, end-to-end, unattended, cloud-agent, or "finish it" execution, use `fstack-run`. | ||
|
|
||
| Proceed without routine approval stops. Ask only when the missing answer changes the safe action and cannot be resolved from repository evidence. Ordinary implementation choices should use the smallest reversible option consistent with existing conventions. | ||
|
|
||
| A cloud run is not complete after planning, editing, one passing test, or opening a pull request. It is complete only after implementation, verification, final diff review, and a durable delivery artifact exist, or after a concrete external blocker is proven. | ||
|
|
||
| ## Verification | ||
|
|
||
| Run all applicable checks. For this repository, the minimum gate is: | ||
|
|
||
| ```sh | ||
| sh -n scripts/validate.sh | ||
| sh scripts/validate.sh | ||
| git diff --check | ||
| ``` | ||
|
|
||
| Then inspect the final diff and confirm: | ||
|
|
||
| - every changed file belongs to the task; | ||
| - all skill frontmatter is valid and discoverable; | ||
| - the README and routing tables match the skills on disk; | ||
| - no secret, credential, local path, or generated artifact was added; | ||
| - no interactive behavior was accidentally converted into autonomous behavior, or vice versa. | ||
|
|
||
| Never claim a command passed unless its output was observed. | ||
|
|
||
| ## Git and delivery | ||
|
|
||
| - Work on a task branch, not directly on `main`. | ||
| - Commit only task-owned files. | ||
| - Do not skip hooks, force-push, or amend published commits. | ||
| - Push the task branch and open a pull request when the environment supports it. | ||
| - Do not merge or deploy unless the user explicitly requests it and repository policy permits it. | ||
|
|
||
| ## Completion receipt | ||
|
|
||
| End substantial work with: | ||
|
|
||
| ```text | ||
| PROVEN | ||
| - implemented files and behavior | ||
| - commands run and observed results | ||
| - branch, commit, and pull request | ||
|
|
||
| MISSING EVIDENCE | ||
| - checks that could not be run and the exact reason | ||
|
|
||
| POSSIBLY WRONG OR OVERSTATED | ||
| - remaining assumptions, or none | ||
|
|
||
| EXACT NEXT ACTION | ||
| - the one smallest action needed next, or none | ||
|
|
||
| WHAT DOES NOT COUNT AS COMPLETION | ||
| - planning, unverified edits, or a PR with failing/unknown checks | ||
|
|
||
| CONTEXT | ||
| - safe to continue here, or why a fresh context is required | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Claude Code instructions | ||
|
|
||
| Read and follow `AGENTS.md` before planning or editing. | ||
|
|
||
| Use the repository files and observed command output as source truth. Preserve unrelated changes. For autonomous or end-to-end work, use the `fstack-run` workflow and continue through implementation, verification, final review, commit, push, and pull request unless a concrete blocker prevents it. | ||
|
|
||
| Do not treat planning, unverified edits, or opening a pull request as completion. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a
pushtomain,GITHUB_BASE_REFis unset, sobasebecomesmain; after checkout,origin/mainandHEADboth reference the newly pushed commit. Consequently,git diff --check "origin/main...HEAD"examines an empty range and direct pushes containing whitespace errors pass this workflow. Use the push event's before SHA for push events while retaining the base-branch comparison for pull requests.AGENTS.md reference: AGENTS.md:L41-L47
Useful? React with 👍 / 👎.