Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .agents/skills/doc-code-parity/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: doc-code-parity
description: Check Charon documentation against code, contracts, configuration, and workflows.
---

# Documentation and code parity

Default to the current diff. Use a full sweep when explicitly requested.

1. Read `docs/conventions.md` and its documentation ownership table.
2. Inspect changed source, contracts, examples, deployment files, workflows,
and `mise.toml`.
3. Compare behavior with the owning documents. Search exact flags, fields,
endpoints, commands, host rules, and provider names with `rg`.
4. Distinguish a stale document from an implementation regression. Preserve
security intent; do not normalize a code regression into prose.
5. Update `docs/threat-model.md` whenever a trust boundary or credential flow
changes.
6. Check all relative Markdown links and run `mise run check`.
7. Report corrected drift and unresolved judgment calls separately.

For a full sweep, include `README.md`, `CONTRIBUTING.md`, `SECURITY.md`,
`docs/`, `contracts/`, `.github/`, `deploy/`, `examples/`, `integration/`,
`src/`, `tests/`, and `mise.toml`.
18 changes: 18 additions & 0 deletions .agents/skills/pr-create/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: pr-create
description: Prepare an honest Charon pull request using the staged release policy.
---

# Create a pull request

1. Read `CONTRIBUTING.md`, `docs/conventions.md`, and the current diff.
2. Confirm the branch started from `dev`. Ordinary work MUST target `dev`;
only `dev` releases and `hotfix/*` repairs target `main`.
3. Preserve intent, decisions, evidence, caveats, known warts, excluded
follow-up work, security impact, documentation parity, risk, and rollback.
4. Run `$doc-code-parity` and `mise run check`.
5. Review commits and changed files for secrets or unrelated work.
6. Push and create the PR only when authorized. Never merge it in this skill.

Use `.github/PULL_REQUEST_TEMPLATE.md` for ordinary changes and
`.github/PULL_REQUEST_TEMPLATE/release.md` for `dev` to `main`.
17 changes: 17 additions & 0 deletions .agents/skills/pr-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: pr-review
description: Review a Charon PR for correctness, security, documentation, and policy.
---

# Review a pull request

1. Read `AGENTS.md`, `CONTRIBUTING.md`, and the pull request diff.
2. Verify the branch path with `.github/scripts/check-pr-path.sh`.
3. Prioritize credential exposure, authorization bypass, caller-selected
references, wildcard destinations, redirects, unsafe logging, and
orchestrator coupling.
4. Check tests for failure paths and synthetic credentials only.
5. Run `$doc-code-parity`; require a threat-model update for boundary changes.
6. Run `mise run check`.
7. Report findings in severity order with paths and evidence. State when no
findings remain and identify residual test gaps.
16 changes: 16 additions & 0 deletions .agents/skills/teach-debug/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: teach-debug
description: Teach safe, evidence-led debugging of Charon.
---

# Learn safe debugging

1. Reproduce with synthetic credentials and the smallest relevant test.
2. Separate observations, hypotheses, and conclusions.
3. Inspect configuration validation, manifest verification, capability
matching, provider lookup, upstream handling, and redaction in order.
4. Never weaken deny-by-default checks to make a test pass.
5. Never print credential values; use sanitized metadata as evidence.
6. Add a regression test, update owned documentation, and run
`mise run check`.
7. Recover by reverting the focused change or applying a corrective commit.
16 changes: 16 additions & 0 deletions .agents/skills/teach-dev/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: teach-dev
description: Teach safe setup, development, and verification for Charon.
---

# Learn local development

1. Explain that `mise install` installs pinned Rust and `cargo-deny`.
2. Use `mise run dev` with `examples/charon.dev.toml`.
3. Clarify that the environment provider is only for synthetic local values.
4. Make focused changes and name affected contracts and documentation.
5. Run focused Cargo tests while iterating, then `mise run check`.
6. Inspect the diff and test output before approving a commit or push.

Never place real credentials in environment files, examples, fixtures, logs,
or repository-root `tmp/`.
19 changes: 19 additions & 0 deletions .agents/skills/teach-git/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: teach-git
description: Teach Charon's dev-to-main Git workflow and verification habits.
---

# Learn the Git workflow

Explain state before mutation. Use `git status`, `git diff`, and `git log` as
evidence.

- Feature branches start from `dev`; ordinary PRs target `dev`.
- Maintainers squash one result or deliberately rebase an independently valid
commit series.
- Release PRs go from `dev` to `main` and MUST use a merge commit.
- Hotfixes target `main`, then `main` is merged back into `dev`.
- Shared history is never rewritten.

Teach the operator to inspect the exact diff, run checks, and approve pushing
or opening a PR separately. Recover with revert or a corrective commit.
18 changes: 18 additions & 0 deletions .agents/skills/teach-repo/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: teach-repo
description: Orient a nontechnical operator to Charon and safe AI-assisted work.
---

# Learn the repository

Guide the operator through outcomes, not command memorization.

1. Explain Charon using `README.md`: workloads request approved capabilities;
Charon injects credentials without returning them.
2. Use `docs/index.md` as the map. Show `src/`, `contracts/`, `docs/`,
`examples/`, `deploy/`, and `tests/`.
3. Explain the fail-closed rules in `AGENTS.md`.
4. Demonstrate asking an agent for a small change, requesting evidence,
inspecting the diff, and withholding approval when impact is unclear.
5. Explain that `mise run check` is the complete local quality gate.
6. Point to the other `$teach-*` skills for task-specific guidance.
22 changes: 22 additions & 0 deletions .agents/skills/teach-security/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: teach-security
description: Teach Charon credential flows, trust boundaries, and security review.
---

# Learn Charon security

Read `docs/threat-model.md` and `docs/integration-boundaries.md`. Trace a request
from signed manifest through capability policy, provider lookup, credential
injection, upstream transport, and redacted response handling.

Ask:

- Can the workload select a secret reference or destination?
- Does exact host, method, and path authorization fail closed?
- Could a redirect send credentials to another hop?
- Could logs, errors, serialization, snapshots, or fixtures expose a value?
- Does the data plane depend on an orchestrator or application database?
- Is each new trust boundary and credential flow documented and tested?

Use synthetic credentials. Require `mise run check` and a threat-model update
when the boundary changes.
20 changes: 20 additions & 0 deletions .agents/skills/teach-ship/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: teach-ship
description: Teach how verified Charon changes move through dev into production.
---

# Learn to ship

For ordinary work, reconcile intent, diff, tests, documentation, risk,
rollback, and excluded follow-up work. Run `$doc-code-parity` and
`mise run check`, then use `$pr-create` for a PR to `dev`.

For a release, record the `dev` source SHA, open `dev` to `main`, wait for fresh
checks, and use a merge commit. After merge, verify:

```sh
git merge-base --is-ancestor <release-source-sha> main
```

Production images originate from `main`. Merging, publishing, and deploying
each require explicit operator authority.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ak5
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Bug report
description: Report reproducible incorrect behavior that is not a vulnerability
title: "bug: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: Do not include credentials or vulnerability details. Report security issues privately using SECURITY.md.
- type: textarea
id: behavior
attributes:
label: What happened?
description: Describe the observed and expected behavior.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Reproduction
description: Provide a minimal reproduction using synthetic credentials only.
validations:
required: true
- type: input
id: version
attributes:
label: Charon version or commit
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Include sanitized logs or configuration when useful.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a vulnerability privately
url: https://github.com/ak5/charon/security/advisories/new
about: Do not disclose vulnerabilities, credentials, or exploit details in a public issue.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Feature request
description: Propose a capability or improvement
title: "feature: "
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What outcome is difficult or impossible today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed behavior
description: Describe the externally visible behavior and boundaries.
validations:
required: true
- type: textarea
id: security
attributes:
label: Security considerations
description: Identify affected trust boundaries, credential flows, destinations, or authorization decisions.
validations:
required: true
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Release

## Included changes

- Release source SHA:
- Notable changes:
- Known limitations:

## Release checks

- [ ] The base branch is `main` and the head branch is `dev`.
- [ ] All required checks pass on the current `dev` head.
- [ ] Documentation and security-impact notes are current.
- [ ] The release will use a merge commit, not squash or rebase.
- [ ] After merging, `git merge-base --is-ancestor <release-source-sha> main` succeeds.

## Risk and rollback

- Risk:
- Rollback:
3 changes: 3 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Follow the complete repository contract in `AGENTS.md`. Treat it as
authoritative for security invariants, commands, documentation ownership,
scratch files, branches, and releases.
13 changes: 12 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
## Summary

## Motivation and scope

## Security impact

- Trust boundary changed: no
- Credential flow changed: no
- Threat model updated or not required:

## Documentation

- Documentation updated or not required:

## Verification

- [ ] `mise run check`

Release PRs are opened from `dev` to protected production branch `main`.
## Risk and rollback

- Risk:
- Rollback:

Ordinary pull requests target `dev`. Use the release template for `dev` to
`main`.
32 changes: 32 additions & 0 deletions .github/scripts/check-pr-path.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -eu

base=${1:-}
head=${2:-}

if [ -z "$base" ] || [ -z "$head" ]; then
printf 'error: usage: check-pr-path.sh <base-branch> <head-branch>\n' >&2
exit 2
fi

case "$base:$head" in
main:dev)
printf 'valid release path: dev -> main; use a merge commit\n'
;;
main:hotfix/*)
printf 'valid hotfix path: %s -> main; use a merge commit and then merge main -> dev\n' "$head"
;;
main:*)
printf 'error: main accepts only dev releases or hotfix/* emergency repairs\n' >&2
exit 1
;;
dev:main)
printf 'valid hotfix reconciliation path: main -> dev; use a merge commit\n'
;;
dev:*)
printf 'valid integration path: %s -> dev; use squash or an approved rebase merge\n' "$head"
;;
*)
printf 'information: no staged-release path rule applies to %s -> %s\n' "$head" "$base"
;;
esac
20 changes: 20 additions & 0 deletions .github/workflows/pr-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR policy

on:
pull_request:
types: [opened, reopened, synchronize, edited]

permissions:
contents: read

jobs:
branch-path:
name: branch-path
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Validate pull request branch path
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
run: .github/scripts/check-pr-path.sh "$BASE_BRANCH" "$HEAD_BRANCH"
Loading