Skip to content
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
374 commits
Select commit Hold shift + click to select a range
35e462f
docs: require explicit retention authority
seonghobae Sep 2, 2026
73ed5f3
docs: separate retention and collection contracts
seonghobae Sep 2, 2026
20354c4
docs: record independent retention authority
seonghobae Sep 2, 2026
b0a1825
docs: reconcile independent retention authority
seonghobae Sep 2, 2026
8843fbe
ci(actions): restamp current head after startup failure
seonghobae Sep 4, 2026
ee95740
chore: refresh head after Actions startup failure
seonghobae Sep 4, 2026
cf559fd
fix(ci): restore truthful workflow verification
seonghobae Sep 6, 2026
f1b6f57
docs: align retention ADR and proposal state
seonghobae Sep 6, 2026
f3c3f1c
fix: reject credential-bearing service URLs
seonghobae Sep 7, 2026
75262a3
test: add exact-head browser accessibility evidence
seonghobae Sep 7, 2026
df8e860
fix: restore UTF-8 dependency lockfile
seonghobae Sep 7, 2026
2905d87
fix: raise muted text contrast
seonghobae Sep 7, 2026
2ad3d9c
test: expose offscreen warning focus
seonghobae Sep 7, 2026
97140b1
test: target the specific service warning
seonghobae Sep 7, 2026
d9ef1f8
fix: reveal focused authoring headings
seonghobae Sep 7, 2026
b38204b
docs: reconcile exact-head browser evidence
seonghobae Sep 7, 2026
19a22c9
test: verify retention evidence invalidation
seonghobae Sep 7, 2026
53f109a
test: scope retention navigation to the rail
seonghobae Sep 7, 2026
1b3d34b
docs: record retention browser evidence
seonghobae Sep 7, 2026
c2934b6
test: specify 200 percent rendered-scale reflow
seonghobae Sep 7, 2026
a2cc136
test: model browser zoom through layout viewport
seonghobae Sep 7, 2026
5842998
docs: record bounded browser zoom evidence
seonghobae Sep 7, 2026
58741e7
docs: bind zoom ledger to exact head evidence
seonghobae Sep 7, 2026
70c52d8
test: require policy revision schema
seonghobae Sep 7, 2026
afda644
feat: define policy revision schema
seonghobae Sep 7, 2026
cb58715
test: require serialized fact constraints
seonghobae Sep 7, 2026
d790def
fix: serialize policy fact constraints
seonghobae Sep 7, 2026
572470b
docs: record proposed persistence boundary
seonghobae Sep 7, 2026
b26d6ea
test: cover revision fact concurrency
seonghobae Sep 7, 2026
2e9fe56
fix: preserve revision fact ownership
seonghobae Sep 7, 2026
a852dde
chore: ignore browser test output
seonghobae Sep 7, 2026
8bb50dc
docs: record persistence review repair
seonghobae Sep 7, 2026
eb089ec
docs: record persistence lock contract
seonghobae Sep 7, 2026
7ed2955
test: cover every revision fact owner
seonghobae Sep 7, 2026
c8ca4d1
fix: protect all revision fact owners
seonghobae Sep 7, 2026
9316f0a
docs: add proposed policy revision ERD
seonghobae Sep 7, 2026
21e2529
ci: upgrade action runtimes to Node 24
seonghobae Sep 7, 2026
5d4d11d
fix(ci): move checkout to Node 24 action runtime
seonghobae Sep 7, 2026
1cfd320
docs(release): record checkout Node 24 action runtime
seonghobae Sep 7, 2026
02d9439
docs(gap): bind checkout runtime warning RED to exact repair
seonghobae Sep 7, 2026
23b3a1c
docs(gap): keep exact-head gate state timeless
seonghobae Sep 8, 2026
971241f
test: require explicit retention transition transaction
seonghobae Sep 8, 2026
95b5dfb
docs: clarify retention transition transaction
seonghobae Sep 8, 2026
fba59b8
merge: restack action runtime repair on persistence fix
seonghobae Sep 8, 2026
cbfbdae
test(docs): reject recursive action evidence claims
seonghobae Sep 8, 2026
fd2d6d2
docs(ci): bind action evidence to immutable heads
seonghobae Sep 8, 2026
3d576aa
docs(ci): preserve canonical artifact digests
seonghobae Sep 8, 2026
7dd5c24
docs(test): reconcile evidence regression count
seonghobae Sep 8, 2026
bdaf5e8
test(ci): require stale-head cancellation
seonghobae Sep 8, 2026
ce6d5d5
fix(ci): cancel superseded repository heads
seonghobae Sep 8, 2026
7de8043
test(db): require PostgreSQL runtime evidence
seonghobae Sep 8, 2026
f106173
test: bind both immutable evidence tuples
seonghobae Sep 8, 2026
2a287b6
fix(test): preserve regex escapes across contents API
seonghobae Sep 8, 2026
9eaa3a5
fix(test): retain constructor regex escaping
seonghobae Sep 8, 2026
9030a07
test(db): execute PostgreSQL migration contract
seonghobae Sep 8, 2026
9ebc735
test(db): bind failures to domain errors
seonghobae Sep 8, 2026
7da8529
test(db): require concurrent writer evidence
seonghobae Sep 8, 2026
7d2cc35
test(db): verify concurrent writer serialization
seonghobae Sep 8, 2026
6f12bb5
test(db): verify complete UPSERT values
seonghobae Sep 8, 2026
f756f05
test(db): bind full UPSERT regression contract
seonghobae Sep 8, 2026
761125b
merge: restack concurrency evidence on UPSERT repair
seonghobae Sep 8, 2026
f97ab69
test: require PostgreSQL restore evidence
seonghobae Sep 8, 2026
2e0774e
test(db): verify policy revision dump restore
seonghobae Sep 8, 2026
e9f833a
docs: record restart and restore evidence
seonghobae Sep 8, 2026
3d633ee
test: require complete concurrent UPSERT values
seonghobae Sep 8, 2026
227e089
fix: verify complete concurrent UPSERT values
seonghobae Sep 8, 2026
a7d1416
docs: record complete concurrent UPSERT evidence
seonghobae Sep 8, 2026
735f0ad
docs: bind concurrent UPSERT evidence to persisted values
seonghobae Sep 8, 2026
91e2017
docs: clarify concurrent UPSERT value contract
seonghobae Sep 8, 2026
c031570
merge: preserve complete concurrent UPSERT evidence
seonghobae Sep 8, 2026
e9d5631
fix: seed restore facts atomically
seonghobae Sep 8, 2026
c756811
test: require NULL-safe concurrent UPSERT checks
seonghobae Sep 8, 2026
fbfa5e6
fix: fail closed on NULL concurrent UPSERT values
seonghobae Sep 8, 2026
946338b
docs: record NULL-safe concurrency evidence
seonghobae Sep 8, 2026
a0bb446
docs: explain NULL-safe persistence assertion
seonghobae Sep 8, 2026
e315e5e
docs: reconcile NULL-safe concurrency gap
seonghobae Sep 8, 2026
9219b06
merge: restack restore evidence on NULL-safe concurrency
seonghobae Sep 8, 2026
ce0f316
test: require complete restored collection-item values
seonghobae Sep 8, 2026
0430469
fix: verify complete restored collection-item values
seonghobae Sep 8, 2026
a0a26c9
docs: record complete restore evidence
seonghobae Sep 8, 2026
991ecaa
docs: bind complete restore assertions
seonghobae Sep 8, 2026
e28415c
docs: reconcile complete restore gap
seonghobae Sep 8, 2026
9678ee7
docs: align architecture with PostgreSQL CI evidence
seonghobae Sep 8, 2026
6f8abb0
docs: align TRD with PostgreSQL CI evidence
seonghobae Sep 8, 2026
d8fdd01
merge: restack restore evidence on reconciled architecture
seonghobae Sep 8, 2026
5950a74
test: require transactional applies retention seed
seonghobae Sep 8, 2026
45fc63d
fix(db): seed applies retention in one transaction
seonghobae Sep 8, 2026
d2eea3c
merge: restack restore evidence on concurrent UPSERT values
seonghobae Sep 8, 2026
a5342b1
docs: record deferred applies seed contract
seonghobae Sep 8, 2026
a1539c5
merge: integrate concurrent restore restack
seonghobae Sep 8, 2026
5e54834
test: require independent retention state after restore
seonghobae Sep 8, 2026
202e69d
test: prove restored policy fact independence
seonghobae Sep 8, 2026
2b1205f
docs: record complete restore invariants
seonghobae Sep 8, 2026
92a1e11
docs: bind restored fact independence evidence
seonghobae Sep 8, 2026
e1b94ee
docs: reconcile restore RCA and evidence
seonghobae Sep 8, 2026
aaef3b5
test: detect restored service URL loss
seonghobae Sep 8, 2026
57732c6
test: preserve restored service URL evidence
seonghobae Sep 8, 2026
bfdaee2
docs: record restored service URL RCA
seonghobae Sep 8, 2026
ea9f186
docs: separate CI restore from operations
seonghobae Sep 8, 2026
5309a61
merge: restore evidence into concurrent writer stack
seonghobae Sep 8, 2026
878d0ce
test: bind restored URL and independence contract
seonghobae Sep 8, 2026
ad07bcd
test: specify deterministic policy JSON export
seonghobae Sep 8, 2026
d82485a
test: require browser JSON download
seonghobae Sep 8, 2026
e834aa7
test: prevent credential URL export
seonghobae Sep 8, 2026
553c1a6
test: keep export cases independently runnable
seonghobae Sep 8, 2026
856958a
feat: project deterministic policy draft export
seonghobae Sep 8, 2026
d883d16
feat: download policy draft JSON locally
seonghobae Sep 8, 2026
384c337
test: type the exported Blob mock argument
seonghobae Sep 8, 2026
2a4249c
docs: define local draft export boundary
seonghobae Sep 8, 2026
e386140
test: expose export portability edge cases
seonghobae Sep 8, 2026
eaf18cb
fix: preserve portable export semantics
seonghobae Sep 8, 2026
b72ce67
docs: record export review repairs
seonghobae Sep 8, 2026
0f1a608
test: expose export data and mock leaks
seonghobae Sep 8, 2026
5c803b1
fix(export): strip query credentials from service URL
seonghobae Sep 8, 2026
90a3d68
test(export): restore browser URL spies
seonghobae Sep 8, 2026
2833391
docs: record export disclosure controls
seonghobae Sep 8, 2026
0e9a349
test(export): reject UI status sentinels in schema types
seonghobae Sep 8, 2026
f3f0f9e
fix(export): narrow portable status schema types
seonghobae Sep 8, 2026
7be6d36
test: verify policy draft browser download
seonghobae Sep 8, 2026
35b9fbd
docs: record browser download evidence
seonghobae Sep 8, 2026
b731c01
docs: preserve non-recursive evidence wording
seonghobae Sep 8, 2026
798f2c4
test: cover JSON export interactions
seonghobae Sep 8, 2026
b9507d9
docs: record JSON export interaction evidence
seonghobae Sep 8, 2026
4d57f60
test: bind revoked URLs to created downloads
seonghobae Sep 8, 2026
bc4c7f1
test: specify download activation failure recovery
seonghobae Sep 8, 2026
d8117e2
fix: report local export activation failures
seonghobae Sep 8, 2026
f7c3ee2
docs: record export activation failure recovery
seonghobae Sep 8, 2026
01ab876
test: fail closed on lossy service URL export
seonghobae Sep 8, 2026
3f16e06
fix: reject lossy service URL export
seonghobae Sep 8, 2026
c2f4887
test: preserve service URL destination semantics
seonghobae Sep 8, 2026
71ef187
docs: align service URL authority contract
seonghobae Sep 8, 2026
170a658
test: preserve complete service URL rejection matrix
seonghobae Sep 8, 2026
bc539d7
docs: preserve service URL rejection lineage
seonghobae Sep 8, 2026
0580f46
test: reject empty service URL delimiters
seonghobae Sep 8, 2026
9d92a9e
fix: reject empty service URL delimiters
seonghobae Sep 8, 2026
6032102
docs: record empty URL delimiter repair evidence
seonghobae Sep 8, 2026
a6cf635
test: preserve encoded service URL path data
seonghobae Sep 8, 2026
a7cac94
docs: bind encoded URL path regression
seonghobae Sep 8, 2026
83f189e
test: expose pre-activation export failure
seonghobae Sep 8, 2026
8d637f9
fix: contain export preparation failures
seonghobae Sep 8, 2026
751e3d5
docs: record export preparation recovery
seonghobae Sep 8, 2026
6529617
docs: define export preparation failure boundary
seonghobae Sep 8, 2026
fd44c84
docs: align export error contract
seonghobae Sep 8, 2026
9edb24f
docs: bind export preparation RED and GREEN
seonghobae Sep 8, 2026
becfd95
docs: document authoring helper invariants
seonghobae Sep 8, 2026
e3f8c6b
docs: correct product readiness and license boundary
seonghobae Sep 8, 2026
4c74e5d
docs: document policy helper contracts
seonghobae Sep 8, 2026
b8171c9
docs: restack protected integration truth
seonghobae Sep 8, 2026
80b69d6
test(deps): reject mutable direct dependency specs
seonghobae Sep 8, 2026
cd9144f
build(deps): pin reviewed versions and isolate tooling
seonghobae Sep 8, 2026
f6bbf9d
test(ci): require exact-head CycloneDX evidence
seonghobae Sep 8, 2026
a3592da
ci(deps): publish exact-head CycloneDX evidence
seonghobae Sep 8, 2026
c0c2b0a
docs(deps): bind supply-chain evidence and gaps
seonghobae Sep 8, 2026
3c8ac64
test(ci): isolate dependency evidence artifact
seonghobae Sep 8, 2026
00b89fb
ci(deps): isolate CycloneDX artifact
seonghobae Sep 8, 2026
71fe275
docs(deps): record artifact isolation evidence
seonghobae Sep 8, 2026
eff7ec1
test(deps): close exact-head review gaps
seonghobae Sep 8, 2026
8d85635
Merge pull request #2 from ContextualWisdomLab/codex/policyweave-focu…
seonghobae Sep 9, 2026
d0da193
test: bind cross-state seed and query predicates
seonghobae Sep 9, 2026
bbea5c9
Merge pull request #13 from ContextualWisdomLab/codex/pin-direct-depe…
seonghobae Sep 9, 2026
df9eef5
Merge pull request #14 from ContextualWisdomLab/codex/policyweave-res…
seonghobae Sep 9, 2026
369cfe2
docs: record 2026-09-09 stack-collapse merge ledger
seonghobae Sep 9, 2026
111400a
Merge pull request #15 from ContextualWisdomLab/docs/policyweave-merg…
seonghobae Sep 9, 2026
7bf0fa9
Merge pull request #16 from ContextualWisdomLab/codex/policyweave-con…
seonghobae Sep 9, 2026
cef8c0b
merge: restack export stack on full writer-stack tip
seonghobae Sep 9, 2026
e67c34c
merge: restack readiness docs on restacked export head
seonghobae Sep 9, 2026
29f91f9
docs: record PR16 landing plus side-chain restacks
seonghobae Sep 9, 2026
8178ba6
Merge pull request #17 from ContextualWisdomLab/docs/policyweave-rest…
seonghobae Sep 9, 2026
77bf3c2
docs: align PR11 scope sentence with dependency-governance delta
seonghobae Sep 9, 2026
83fb9f8
Merge pull request #11 from ContextualWisdomLab/docs/product-readines…
seonghobae Sep 9, 2026
828ecf1
merge: land export plus dependency-governance side chain into develop…
seonghobae Sep 9, 2026
e1c588f
Merge pull request #18 from ContextualWisdomLab/codex/policyweave-sid…
seonghobae Sep 9, 2026
ea30067
docs: record side-chain landing plus merge know-how
seonghobae Sep 9, 2026
852c6ba
docs: record PR1 exact-head failures on pinned develop tip
seonghobae Sep 9, 2026
632a08e
Merge pull request #19 from ContextualWisdomLab/docs/policyweave-land…
seonghobae Sep 9, 2026
198fbe0
docs: cover remaining exported policy symbols with JSDoc
seonghobae Sep 9, 2026
82ac08d
docs: record PIPA amendment re-verification ahead of effective date
seonghobae Sep 9, 2026
77f3331
Merge pull request #20 from ContextualWisdomLab/docs/policyweave-docs…
seonghobae Sep 9, 2026
062299b
Merge pull request #21 from ContextualWisdomLab/docs/policyweave-sour…
seonghobae Sep 9, 2026
82e556c
docs: record docstring and re-verification turn in ledger
seonghobae Sep 9, 2026
2d4928d
Merge pull request #22 from ContextualWisdomLab/docs/policyweave-turn…
seonghobae Sep 9, 2026
c57ebc7
test: pin policy boundary contracts for URL, contradiction, and email…
seonghobae Sep 9, 2026
82e7826
Merge pull request #23 from ContextualWisdomLab/test/policy-boundary-…
seonghobae Sep 9, 2026
c8f8510
docs: record boundary-contract turn and PR1 tracking state
seonghobae Sep 9, 2026
a2f48f9
Merge pull request #24 from ContextualWisdomLab/docs/policyweave-boun…
seonghobae Sep 9, 2026
557a58c
test: reject unconfirmed runtime policy status values
seonghobae Sep 12, 2026
23ceef4
fix: validate policy status membership before readiness and export
seonghobae Sep 12, 2026
fc707c8
test: cover loopback preview and README security navigation
seonghobae Sep 12, 2026
1d47553
fix: make local preview scripts loopback-only and run onboarding pretest
seonghobae Sep 12, 2026
6c7a192
docs: clarify local source onboarding and repair security navigation
seonghobae Sep 12, 2026
0fd2a18
docs: record loopback preview limits without production-security claims
seonghobae Sep 12, 2026
887fb86
docs: retain local preview RCA and bounded RED GREEN evidence
seonghobae Sep 12, 2026
f11fe78
docs: bind runtime status repair and preserve historical gap receipts
seonghobae Sep 12, 2026
86d370b
test: require fail-closed policy draft restore
seonghobae Sep 26, 2026
0088d68
test: require bounded local draft import UI
seonghobae Sep 26, 2026
d5ab6bd
feat: restore validated schema-v1 policy drafts
seonghobae Sep 26, 2026
8be9e8d
test: reject noncanonical restored strings
seonghobae Sep 26, 2026
768e1c8
fix: require canonical restored facts
seonghobae Sep 26, 2026
7bedeca
test: require accessible draft import control
seonghobae Sep 26, 2026
50afb82
fix: expose draft import keyboard focus
seonghobae Sep 26, 2026
95b34a1
test: exercise browser draft restore
seonghobae Sep 26, 2026
633ea7a
docs: define fail-closed local draft restore
seonghobae Sep 26, 2026
b6e98a5
docs: bind restore evidence to canonical commits
seonghobae Sep 26, 2026
15aec42
test: lock policy import while reading
seonghobae Sep 26, 2026
f55f640
fix: lock policy editing during draft import
seonghobae Sep 26, 2026
4277b7a
docs: bind import lock review evidence
seonghobae Sep 26, 2026
3e2eba6
test: expose policy import progress
seonghobae Sep 26, 2026
fceddfe
fix: announce policy import progress
seonghobae Sep 26, 2026
9542d9b
test: keep import status announcements immediate
seonghobae Sep 26, 2026
85b194d
fix: announce import state without delay
seonghobae Sep 26, 2026
9780f4f
docs: bind import feedback evidence
seonghobae Sep 26, 2026
52d252a
test: preserve authoring fieldset semantics
seonghobae Sep 26, 2026
9d54089
fix: preserve authoring fieldset semantics
seonghobae Sep 26, 2026
60fd7fb
docs: bind fieldset semantics evidence
seonghobae Sep 26, 2026
88234a8
test: specify cancellable draft import
seonghobae Sep 26, 2026
84aa45a
feat: cancel pending draft imports
seonghobae Sep 26, 2026
9f53ce9
docs: bind draft import cancellation evidence
seonghobae Sep 26, 2026
e75f8b4
test(ui): require focus restoration after import cancellation
seonghobae Sep 26, 2026
e48e44f
fix(ui): restore authoring focus after import cancellation
seonghobae Sep 26, 2026
7ea567b
test(ui): require pending import tablet reflow
seonghobae Sep 26, 2026
9623449
fix(ui): wrap pending import controls at tablet widths
seonghobae Sep 26, 2026
8dc99df
docs: bind pending import reflow evidence
seonghobae Sep 26, 2026
66ae499
test(ui): reproduce long-name tablet overflow
seonghobae Sep 26, 2026
803cd60
fix(ui): constrain unbroken tablet document names
seonghobae Sep 26, 2026
2cdbdf6
docs: bind long-name reflow evidence
seonghobae Sep 26, 2026
8071896
test: require abortable local draft stream reads
seonghobae Sep 30, 2026
5e878b6
feat: abort local draft stream reads
seonghobae Sep 30, 2026
3b5c971
docs: bind browser stream cancellation evidence
seonghobae Sep 30, 2026
5f4e0cd
docs: bind remote stream verification evidence
seonghobae Sep 30, 2026
234d7e9
test: split UTF-8 fixture inside multibyte character
seonghobae Sep 30, 2026
9b8b7fd
docs: record UTF-8 fixture review repair
seonghobae Sep 30, 2026
af8c0da
fix: reject malformed UTF-8 draft bytes
seonghobae Oct 1, 2026
ee12e3f
feat: add deterministic local review summary
seonghobae Oct 4, 2026
2117734
fix: explain memory-only draft preservation
seonghobae Oct 4, 2026
1e662c2
fix: make redacted URL drafts canonically restorable
seonghobae Oct 4, 2026
a51669c
fix: wrap mobile document titles without losing facts
seonghobae Oct 4, 2026
2ff4fc6
fix: expose existing import feedback on mobile
seonghobae Oct 4, 2026
c5a186c
feat(preview): reflow long policy facts within screen reading width
seonghobae Oct 5, 2026
2abf24f
test: verify native import fieldset lock and generalize local receipts
seonghobae Oct 5, 2026
82d1f01
test: split UTF-8 input inside a multibyte character
seonghobae Oct 7, 2026
cd87bf5
docs: correct live PolicyWeave governance evidence
seonghobae Oct 7, 2026
3d62bd0
docs: reconcile PolicyWeave stack and protection state
seonghobae Oct 7, 2026
429c2d0
merge: integrate current governance evidence into import cancellation
seonghobae Oct 7, 2026
6032df8
merge: stack review summary on import cancellation
seonghobae Oct 7, 2026
95e2388
docs: reconcile active stacked evidence
seonghobae Oct 7, 2026
11e8854
fix: align readiness projection and native stream test lifecycle
seonghobae Oct 13, 2026
599de5c
Merge pull request #26 from ContextualWisdomLab/feat-mixed-agents-prd
seonghobae Oct 13, 2026
a0e4ae8
test: repair null-safe database and stream contract evidence
seonghobae Oct 13, 2026
896906a
Merge remote-tracking branch 'origin/agent/import-cancellation' into …
seonghobae Oct 13, 2026
d63b934
Merge pull request #25 from ContextualWisdomLab/agent/import-cancella…
seonghobae Oct 13, 2026
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
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI
on:
pull_request:
push:
branches: [main, develop]
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
.env
coverage
playwright-report
*.tsbuildinfo
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AGENTS.md

## Product responsibility
PolicyWeave is a local-first privacy-policy fact-authoring workspace. It structures facts supplied by a service operator, detects missing or contradictory inputs, and renders a review draft. It does not provide legal advice, certify compliance, or infer facts that the operator has not established.

## Development contract
- Treat structured policy facts as the source of truth; rendered policy prose is a deterministic projection.
- Preserve the seven authoring steps in `docs/PRD.md`: service information, collection items, purposes, retention, third-party transfer, international transfer, and privacy contact.
- Behavior changes require regression or edge-case tests first. Do not resolve a review finding until the exact current head proves the finding obsolete or fixed.
- Re-fetch the PR head before every commit/push. Never force-push or weaken branch/ruleset protections to merge.
- Keep `ARCHITECTURE.md`, `docs/TRD.md`, ADRs, `docs/research-traceability.md`, `CHANGELOG.md`, and `docs/product-technical-gap-baseline.md` aligned with implementation.
- Do not encode legal conclusions from memory. Every legal/rule/template decision needs an authoritative source, effective date, source revision, and implementation/test trace.
- Do not commit identifying customer, individual, or real operational-organization data in tests, examples, fixtures, or product documentation. Publicly documented legal authorities, official document titles, standards bodies, source publishers, and the repository owner may be named when required for accurate provenance and citation. Production must not consume synthetic demo data.
- Keep persistence objects semantically named with at least two words and `snake_case` unless a framework contract requires another convention. Avoid generic named persistence objects such as a standalone `id` table/collection.
- Hosted persistence/publication must be introduced only behind explicit tenant, authorization, audit, encryption, immutable revision, and supersession contracts.
- GitHub Actions dependencies stay SHA pinned and checkout credentials must not persist.

## Verification
The minimum exact-head gate is `npm run lint`, `npm test`, and `npm run build`, plus every live organization-required workflow, independent approval, and resolved review thread. Queued, skipped, predecessor-head, or stale results are not passing evidence.
36 changes: 36 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Architecture

## Product boundary
PolicyWeave owns the authoring and review of structured privacy-processing facts and the deterministic generation of a review draft. It does not own legal advice, identity-provider data, payment processing, or a customer's source systems. Hosted publication and durable storage are future supporting capabilities, not authority to invent or reinterpret processing facts.

## Domain-driven design
The core subdomain is **Policy Fact Authoring**. Supporting subdomains are **Review & Publication** and **Legal Source Registry**. Browser/storage frameworks, authentication infrastructure, observability, and deployment are generic subdomains.

### Bounded contexts
- **Policy Fact Authoring**: captures `service_profile`, `collection_item`, `processing_purpose`, `retention_rule`, `third_party_transfer`, `international_transfer`, and `privacy_contact` facts.
- **Review & Publication**: derives `review_finding`, controls `policy_revision` review state, and will create immutable `publication_revision` artifacts only after explicit authorization.
- **Legal Source Registry**: versions authoritative sources, effective dates, rule/template revisions, and citations. It is an anti-corruption layer between changing external law/guidance and already-published revisions.

### Context map
`Policy Fact Authoring -> Review & Publication` is a customer/supplier relationship through a versioned policy-fact contract. `Legal Source Registry -> Review & Publication` supplies versioned rule evidence; source updates cannot silently mutate historical policy revisions. External customer systems remain behind adapters and must not be queried or mutated through hidden coupling.

## Ubiquitous language and model
A future `policy_revision` is the minimal aggregate root and transaction boundary. `collection_item`, `processing_purpose`, `retention_rule`, `third_party_transfer`, `international_transfer`, and `privacy_contact` are revision-owned facts/value objects unless later evidence requires independent lifecycles. `review_finding` is derived evidence. `publication_revision` is an immutable release receipt, not a mutable policy row. Rendered prose is a projection and never the source of truth.

Core invariants:
1. A selected collection item cannot pass review without a non-empty processing purpose.
2. Review findings navigate to the fact that caused them.
3. Publication must never upgrade an unreviewed or incomplete draft to a reviewed/authoritative state.
4. A published revision remains reproducible from its policy facts plus rule/template/source versions.
5. External legal-source updates produce explicit re-evaluation, not silent rewriting.

## Current implementation
The active MVP is a React/Vite browser workspace. State is in memory and there is no production persistence or publication backend. The seven PRD steps are routed to distinct editing surfaces. `src/policy.ts` owns the current collection-item review rule; `src/App.tsx` owns browser orchestration and deterministic preview rendering.

## Persistence boundary (planned, not implemented)
Use relational 3NF by default. Named database/schema/persistence objects use at least two semantic words and `snake_case`, for example `policy_revision`, `collection_item`, `processing_purpose`, `review_finding`, `publication_revision`, and `legal_source_revision`. Item-level UPSERTs must declare their natural/idempotency key and conflict behavior. Publication is append-only/immutable with explicit supersession; writes across unrelated aggregates must not share a transaction merely for convenience.

Separate write-side draft commands from read-side rendered/review projections once hosted traffic justifies it. Account for revision hot spots and optimistic/constrained writes before adding collaborative editing. Keep source/customer integrations behind ACLs; do not form a shared kernel with unrelated ContextualWisdomLab products without demonstrated reuse.

## Deployment and operability direction
The browser-only MVP needs no service mesh. A hosted backend should be compose-deployable across Docker/Podman/Colima before Kubernetes migration, expose asynchronous/non-blocking request handling, and add realistic k6 evidence for network surfaces before latency claims. No code may depend on an optional `close_connection` instance attribute existing unless the adapter contract guarantees it.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

All notable product changes are recorded here. PolicyWeave is pre-release; entries describe the active commercialization branch and do not imply a published compliance product.

## Unreleased

### Added
- Seven-step authoring workflow with distinct editing surfaces for service information, collection items, processing purposes, retention, third-party transfer, international transfer, and privacy contact.
- Warning-to-source navigation for missing processing purposes.
- Regression coverage for all seven step routes, warning navigation, clearing the publication blocker after a missing purpose is supplied, whitespace-only purposes, and collection-path/purpose step separation.
- Product/technical gap ledger, architecture, technical requirements, security baseline, and legal-source traceability.

### Changed
- Collection-path editing now remains available for every selected item in the collection step, while processing-purpose editing stays in its dedicated purpose step.
- Review preview now reflects verified authoring facts instead of presenting the collection step as the entire workflow.
- Responsive review behavior and mobile publication feedback were repaired during PR review.
- GitHub Actions checkout dependencies are SHA pinned and credentials are not persisted in the working tree.

### Not yet shipped
- Durable versioned policy persistence and audit history.
- Authenticated immutable publication revisions and public URL lifecycle.
- Browser-matrix/accessibility evidence and hosted endpoint load testing.
- Legal/rule engine backed by versioned authoritative requirements.
7 changes: 7 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CLAUDE.md

Follow `AGENTS.md` as the repository-wide operating contract.

Before changing code, read `docs/PRD.md`, `ARCHITECTURE.md`, the applicable ADRs, `docs/TRD.md`, `docs/research-traceability.md`, and `docs/product-technical-gap-baseline.md`. Preserve PolicyWeave's boundary: verified operator facts in, deterministic reviewable policy projection out; no legal-advice or compliance-guarantee claims.

For behavior changes, add or strengthen tests before production code. Reconcile documentation and the product-gap ledger on the same branch. Use the exact current PR head for reviews, checks, and merge decisions, and never bypass governance to compensate for a failing or unassigned check.
9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2026 ContextualWisdomLab

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
119 changes: 106 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,118 @@
# PolicyWeave

웹·앱 운영자가 실제 개인정보 처리 흐름을 입력하면, 누락과 모순을 표시하면서 개인정보처리방침 검토본을 만드는 로컬 우선 웹 앱입니다.
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ContextualWisdomLab/PolicyWeave)

> 생성 결과는 법률 자문이나 준법 보장이 아닙니다. 공개 전 개인정보보호책임자 또는 법률 전문가의 검토가 필요합니다.
**실제 개인정보 처리 사실을 구조화해, 누락과 모순을 찾고 검토 가능한 개인정보처리방침 초안을 만드는 로컬 우선 워크스페이스입니다.**

## 실행
PolicyWeave는 범용 법률 문구를 임의로 채우는 생성기가 아닙니다. 운영자가 확인한 서비스 사실을 단계별로 입력하면 수집 항목, 처리 목적, 보유 기간, 제3자 제공, 국외 이전과 담당자 정보를 서로 연결하고, 공개 전에 다시 확인해야 할 지점을 보여 줍니다.

> PolicyWeave의 출력은 법률 자문, 준법 보장 또는 인증이 아닙니다. 공개 전 개인정보보호책임자 또는 적절한 법률 전문가의 검토가 필요합니다.

## 누구를 위한 제품인가

| 사용자 | PolicyWeave가 돕는 일 |
| --- | --- |
| 웹·앱 운영자 | 실제 서비스의 개인정보 처리 흐름을 빠짐없이 정리하고 검토본을 만든다. |
| 개인정보보호 책임자 | 입력 사실, 누락 경고와 검토 필요 항목을 한 흐름에서 확인한다. |
| 제품·개발 팀 | 정책 문구보다 먼저 구조화된 처리 사실과 책임 경계를 합의한다. |
| 통합·유지보수 담당자 | 정책 데이터 모델, 제품 요구사항과 결정 기록을 저장소에서 추적한다. |

## 현재 할 수 있는 일

현재 소스는 다음 7단계 작성 흐름을 구현합니다.

1. 서비스 정보
2. 수집 항목
3. 처리 목적
4. 보유 기간
5. 제3자 제공
6. 국외 이전
7. 개인정보 보호 담당자

선택한 수집 항목에는 수집 경로와 처리 목적을 별도로 기록할 수 있습니다. 필수 사실이 없거나 처리 목적이 비어 있으면 검토본이 이를 숨기지 않고 차단 또는 검토 경고로 드러내며, 경고에서 원인이 있는 입력 단계로 돌아갈 수 있습니다. 작성 내용은 실시간 검토본에 반영되고 모바일·키보드 사용도 고려합니다.

## 빠른 시작

현재 제품은 저장소에서 실행하는 초기 개발 버전입니다. 패키지 메타데이터는 `0.1.0`이지만 GitHub에 게시된 릴리스는 아직 없습니다.

```bash
npm install
npm ci
npm run dev
```

검증은 `npm run lint`, `npm test`, `npm run build`로 수행합니다.
프로덕션 번들 및 검증:

```bash
npm run lint
npm test
npm run build
```

`npm ci`는 체크인된 `package-lock.json`을 사용합니다. 이 저장소는 `private: true` 패키지이므로 npm 배포물을 제품 릴리스로 간주하지 않습니다.

## 제품 경계

PolicyWeave가 책임지는 것은 **운영자가 입력한 개인정보 처리 사실의 구조화, 검토 지원, 결정적인 검토본 생성**입니다.

PolicyWeave는 다음을 권위 있게 판단하지 않습니다.

- 실제 서비스가 어떤 SDK·쿠키·데이터를 사용하는지 자동 추측
- 특정 처리의 법적 적법성에 대한 최종 판단
- 동의가 필요한지 여부를 모든 상황에 동일하게 결정
- 법률 자문, 규제기관 판단, 인증 또는 감사 의견 대체
- 아직 구현되지 않은 정적 공개 URL·호스팅 백엔드를 현재 기능처럼 표시

향후 공개·버전 이력·영속화가 추가되더라도, 사람이 확인한 처리 사실과 책임자 검토가 자동 생성 문구보다 우선합니다.

## 동작 방식

```text
운영자가 확인한 처리 사실
│
▼
7단계 구조화 편집
│
├── 필수 사실/관계 검증
├── 차단 오류와 검토 경고
└── 원인 단계로 이동
│
▼
실시간 개인정보처리방침 검토본
│
▼
책임자·법률 검토 후 별도 공개 결정
```

현재 브라우저 애플리케이션은 작성과 검토 경험에 집중합니다. PRD에 기록된 정적 공개 URL, 버전 영속화와 배포 계약은 후속 제품 작업이며 현재 구현으로 과장하지 않습니다.

## 개인정보와 보안 관점

PolicyWeave는 개인정보처리방침을 만들기 위해 불필요한 실제 개인정보를 수집하도록 설계하지 않습니다. 정책 작성에는 서비스의 **처리 범주와 운영 사실**을 입력하고, 사람·고객의 실제 민감 값을 데모나 문서에 복사하지 않는 것이 기본 원칙입니다.

보안 및 신뢰 경계는 [`SECURITY.md`](SECURITY.md)와 기술 문서에서 관리합니다. 새 저장·호스팅·외부 연동 기능은 별도의 인증·권한·감사·tenant 경계를 갖추기 전까지 현재 기능으로 취급하지 않습니다.

## 문서

- [제품 요구사항](docs/PRD.md) — 사용자 문제, MVP, 비목표와 성공 기준
- [기술 요구사항](docs/TRD.md) — 구현 및 품질 계약
- [아키텍처](ARCHITECTURE.md) — 제품 책임과 기술 경계
- [ADR-0001: Policy as Data](docs/ADR-0001-policy-as-data.md) — 핵심 설계 결정
- [제품·기술 Gap baseline](docs/product-technical-gap-baseline.md) — 아직 닫히지 않은 상용화 Gap과 완료 증거
- [공개 문서 홈](docs/index.md) — 저장소 문서 탐색 시작점
- [변경 이력](CHANGELOG.md)

## 기여와 검증

동작을 바꾸는 변경은 해당 사용자 흐름의 회귀 테스트와 문서 계약을 함께 갱신해야 합니다. 작업 전 [`AGENTS.md`](AGENTS.md)와 [`CLAUDE.md`](CLAUDE.md)를 읽고, 최소한 다음 검증이 동일한 head에서 통과하는지 확인합니다.

```bash
npm run lint
npm test
npm run build
```

## 현재 범위
통과한 로컬 명령이나 PR branch 자체는 배포·인증·규제 준수 또는 게시 릴리스의 증거가 아닙니다.

- 7단계 작성 흐름과 진행 상태
- 개인정보 수집 항목 선택 및 필수/선택 구분
- 조건부 상세 입력
- 실시간 검토본과 법적 근거 표시
- 차단 오류와 권장 검토 항목 구분
- 반응형 작성/미리보기 전환
## 라이선스

제품 요구사항과 결정 기록은 [`docs/PRD.md`](docs/PRD.md), [`docs/ADR-0001-policy-as-data.md`](docs/ADR-0001-policy-as-data.md)에 있습니다.
PolicyWeave의 ContextualWisdomLab 원저작 소스와 문서는 [MIT License](LICENSE)로 제공됩니다. npm 의존성, 표준 문서, 외부 서비스·자산은 각각의 라이선스와 이용 조건을 유지하며 이 저장소의 MIT grant가 이를 재라이선스하지 않습니다. 상업적 사용과 배포에 적합하지 않은 inbound 소프트웨어·자산은 제품 의존성으로 반입하지 않습니다.
15 changes: 15 additions & 0 deletions docs/ADR-0001-policy-as-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ADR-0001: 정책 문서보다 정책 데이터를 원본으로 둔다

상태: 채택

## 결정

수집 항목, 목적, 보유 기간, 제공 대상, 이전 국가와 연락처를 구조화된 정책 데이터로 저장한다. 화면의 문서는 이 데이터에서 결정적으로 렌더링한다.

## 이유

문자열 문서를 직접 편집하면 동일 항목이 표·본문·요약에서 불일치할 수 있다. 구조화된 원본은 검증 규칙, 변경 이력, 다국어 렌더러와 공개 API를 같은 계약 위에 올릴 수 있다.

## 결과

자유 문구가 필요한 예외에는 출처와 검토 상태를 함께 저장해야 한다. 법령 변경은 템플릿 버전과 규칙 세트 버전으로 추적한다.
18 changes: 18 additions & 0 deletions docs/ADR-0002-seven-step-authoring-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ADR-0002: Seven-step authoring is an explicit domain workflow

Status: Accepted
Date: 2026-09-01

## Context
The PRD defines seven authoring stages, but an early implementation changed only the step rail while always rendering the collection-item editor. This made the buyer-facing workflow appear complete while most facts were not editable and review findings could not lead the operator to the responsible input.

## Decision
Each PRD stage is an explicit editable state of the Policy Fact Authoring context: service information, collection items, processing purposes, retention, third-party transfer, international transfer, and privacy contact. The UI router must render a corresponding editor for the selected stage. Review findings carry enough domain context to navigate to the responsible stage.

The workflow is not a legal state machine. Completion of a UI step does not mean legal sufficiency. Legal/rule completeness is determined separately by deterministic review rules bound to versioned authoritative source evidence.

## Consequences
- Navigation and review-to-source behavior are regression-tested.
- The preview remains a projection over structured facts and cannot become an independent source of truth.
- Future persistence stores facts and revision/review state rather than serialized page prose.
- Additional legal validations can grow without redefining the seven buyer-facing authoring responsibilities.
Loading
Loading