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
4 changes: 4 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ Read [`AGENTS.md`](../AGENTS.md) and [`docs/DESIGN-PIVOT.md`](../docs/DESIGN-PIV
## Key paths

`policy.cedar`, `policy.cedarschema`, `protect-mcp.config.json`, `packages/cedar-daemon`, `apps/secure-gateway`, `packages/crypto-utils`, `apps/admin-dashboard`.

## Coding standards

Follow path-specific files in [`.github/instructions/`](instructions/). Copilot code review loads [`.github/skills/code-review/`](skills/code-review/).
10 changes: 10 additions & 0 deletions .github/instructions/cedar.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
applyTo: "**/*.cedar,**/*.cedarschema"
---

# Cedar coding standards (September 2026)

- Keep authorization fail-closed. A missing policy, schema mismatch, or unavailable PDP is a deny.
- Do not introduce a silent fallback from enforce to shadow.
- Validate against the checked-in schema (`policy.cedarschema` or the service equivalent).
- Pair policy edits with the existing Cedar validation script or tests.
15 changes: 15 additions & 0 deletions .github/instructions/tests.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
applyTo: "**/*.{test,spec}.ts,**/*.{test,spec}.tsx,**/tests/**/*.ts,**/tests/**/*.tsx"
---

# Test standards (September 2026)

- Ship behavior with a test in the existing layout (co-located `*.test.ts` or `tests/`).
- Do not skip, delete, or weaken verify, lint, typecheck, or adversarial gates to land a change.
- Do not invent a passing gate from prose. Run the documented verify command.
- Fixtures are synthetic. Never commit real PII, PHI, payroll, or credentials.

## This repository

- Definition of Done: `./scripts/harness/verify.sh`.
- Cedar: `bash scripts/cedar-validate.sh`.
21 changes: 21 additions & 0 deletions .github/instructions/typescript.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
applyTo: "**/*.ts,**/*.tsx"
---

# TypeScript coding standards (September 2026)

- Write TypeScript, not new application JavaScript. Leave existing tooling `.js` / `.mjs` / `.cjs` files alone.
- Place imports at the top of the module. Do not use inline `import()` in function bodies except for a documented circular-dependency or optional-runtime case.
- Prefer early returns over nested conditionals.
- On `switch` over a discriminated union or enum, handle every variant. Use a `never` check in `default` so newly added variants fail at compile time.
- Do not introduce `any` in new production code. Prefer `unknown` plus narrowing. Do not use non-null assertions to silence `strict` or `noUncheckedIndexedAccess`.
- Match this repository's existing formatter and linter. Do not add a second style system.
- Keep public unions narrow. Do not widen a literal union to `string` without a spec change.
- Do not weaken fail-closed, human-in-the-loop, tenancy, or verify gates to make types compile.

## This repository

- Authorization and Ed25519 receipts stay on the MCP tool-call path.
- Do not convert authorize, kill-switch, PDP, principal-signature, or production-profile paths to fail-open.
- Shadow mode may log-without-block only when `protect-mcp.config.json` `mode` is explicitly `shadow`.
- Do not treat this tree as a prompt-injection classifier.
28 changes: 28 additions & 0 deletions .github/skills/code-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: code-review
description: "Review FidusGate PRs for fail-closed Cedar authorize and Ed25519 receipt integrity. Use on pull requests that touch policy.cedar, the secure gateway, crypto-utils, or the admin console. Flag silent enforce-to-shadow fallbacks."
---

# Copilot code review — FidusGate

Use this skill when reviewing a pull request in this repository.

FidusGate issues **signed Ed25519 receipts for MCP tool calls**.

- Reject fail-open authorize, kill-switch, PDP, or production-profile paths.
- Reject silent fallback from enforce to shadow.
- Do not treat Cedar work as a prompt-injection classifier.
- Verify with `./scripts/harness/verify.sh` and `bash scripts/cedar-validate.sh` when policies change.


## Always flag

- Secrets, `.env` values, private keys, or real personal data in the diff
- Weakened or skipped verify / lint / typecheck / adversarial gates
- Invented success (prose claiming a gate passed with no command output)
- Fail-open authorization, skipped human approval, or agents recording `--actor user`

## Never request

- Drive-by major upgrades, formatter churn, or unrelated refactors
- Softening honesty disclaimers or certification claims
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ Do not convert authorize, kill-switch, PDP, principal-signature, production-prof
## Honesty

Keep demo and mock surfaces labeled as demo (local keys, JSON datastore, simulated syscalls/OIDC). Do not add sidecar features to compete with OpenFirma, Vectimus, Symbiont, or Permit Cedar Agent. Deepen receipts and the console.

## Coding standards (September 2026)

Path-specific Copilot instructions: [`.github/instructions/`](.github/instructions/).
Repository-wide Copilot file: [`.github/copilot-instructions.md`](.github/copilot-instructions.md).
Copilot code review skill: [`.github/skills/code-review/SKILL.md`](.github/skills/code-review/SKILL.md).
3 changes: 3 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ FidusGate does not compete as a generic zero-trust agent governance platform. Op
- [MCP 2026-07-28 migration](https://github.com/SafetyMP/FidusGate/blob/main/docs/mcp-2026-07-28-migration.md)
- [OWASP MCP Top 10 ADR](https://github.com/SafetyMP/FidusGate/blob/main/docs/adr/0001-owasp-mcp-top-10.md)
- [GitHub storefront playbook](https://github.com/SafetyMP/FidusGate/blob/main/docs/community/github-presentation.md)
- [.github/copilot-instructions.md](.github/copilot-instructions.md): repository-wide Copilot coding standards
- [.github/instructions/](.github/instructions/): path-specific Copilot coding standards (September 2026)
- [.github/skills/code-review/SKILL.md](.github/skills/code-review/SKILL.md): Copilot code review skill