Skip to content

Commit a22b77a

Browse files
committed
docs: add assistant guide header policy
1 parent 5235f83 commit a22b77a

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ This repo includes a GuideCheck Human-Verifiable Assistant Guide for bounded AI-
4040

4141
The guide is written for GuideCheck profile `0.3.0` and targets the highest guide-file conformance level, Level 4. Level 5 is not claimed here because GuideCheck reserves Level 5 for a guide plus a conformant assistant runtime.
4242

43+
The Pages source includes `docs/_headers` so hosts that support static header rules can serve the guide with `X-Content-Type-Options: nosniff` and `Strict-Transport-Security`. GitHub Pages does not honor `_headers`; if `https://substack2md.space/` remains on GitHub Pages directly, GuideCheck will continue to warn about those response headers while still reporting Level 3.
44+
4345
Use it this way:
4446

4547
1. Open `.well-known/assistant-guide.txt` or the byte-identical root `assistant-guide.txt` copy and read it in full.

docs/_headers

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/.well-known/assistant-guide.txt
2+
Content-Type: text/plain; charset=utf-8
3+
X-Content-Type-Options: nosniff
4+
Strict-Transport-Security: max-age=31536000; includeSubDomains
5+
6+
/.well-known/assistant-guide-manifest.txt
7+
Content-Type: text/plain; charset=utf-8
8+
X-Content-Type-Options: nosniff
9+
Strict-Transport-Security: max-age=31536000; includeSubDomains
10+
11+
/*
12+
X-Content-Type-Options: nosniff
13+
Strict-Transport-Security: max-age=31536000; includeSubDomains

tests/test_assistant_guide.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
PAGES_GUIDE = ROOT / "docs" / ".well-known" / "assistant-guide.txt"
88
MANIFEST = ROOT / "assistant-guide-manifest.txt"
99
PAGES_MANIFEST = ROOT / "docs" / ".well-known" / "assistant-guide-manifest.txt"
10+
PAGES_HEADERS = ROOT / "docs" / "_headers"
1011

1112

1213
def _metadata(text: str) -> dict[str, str]:
@@ -100,6 +101,16 @@ def test_assistant_guide_manifest_matches_bytes():
100101
assert manifest["immutable-release-url"].startswith("https://")
101102

102103

104+
def test_assistant_guide_static_header_policy():
105+
headers = PAGES_HEADERS.read_text(encoding="ascii")
106+
107+
assert "/.well-known/assistant-guide.txt" in headers
108+
assert "/.well-known/assistant-guide-manifest.txt" in headers
109+
assert "Content-Type: text/plain; charset=utf-8" in headers
110+
assert "X-Content-Type-Options: nosniff" in headers
111+
assert "Strict-Transport-Security: max-age=31536000; includeSubDomains" in headers
112+
113+
103114
def test_assistant_guide_actions_have_required_approval_gates():
104115
text = GUIDE.read_text(encoding="ascii")
105116
actions = _action_blocks(text)

0 commit comments

Comments
 (0)