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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ erl_crash.dump
/Manifest.toml

# ReScript
/lib/bs/
/lib/
/.bsb.lock
.merlin
*.res.js
*.res.js.map
*.resi.js

# Python (SaltStack only)
__pycache__/
Expand Down
15 changes: 11 additions & 4 deletions .machine_readable/AGENTIC.scm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
;; AGENTIC.scm - AI agent interaction patterns for rsr-template-repo
;; AGENTIC.scm - AI agent interaction patterns for rescript-redis

(define agentic-config
`((version . "1.0.0")
Expand All @@ -10,7 +10,14 @@
(patterns
((code-review . "thorough")
(refactoring . "conservative")
(testing . "comprehensive")))
(testing . "comprehensive")
(documentation . "detailed")))
(constraints
((languages . ())
(banned . ("typescript" "go" "python" "makefile"))))))
((languages . ("rescript" "javascript"))
(banned . ("typescript" "go" "python" "node"))))
(project-specific
((runtime . "deno")
(package-manager . "deno")
(test-command . "deno task test")
(build-command . "deno task build")
(formatting . "rescript-format")))))
55 changes: 45 additions & 10 deletions .machine_readable/ECOSYSTEM.scm
Original file line number Diff line number Diff line change
@@ -1,20 +1,55 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
;; ECOSYSTEM.scm - Ecosystem position for rsr-template-repo
;; ECOSYSTEM.scm - Ecosystem position for rescript-redis
;; Media-Type: application/vnd.ecosystem+scm

(ecosystem
(version "1.0")
(name "rsr-template-repo")
(type "")
(purpose "")
(name "rescript-redis")
(type "library")
(purpose "Type-safe Redis client for ReScript applications on Deno")

(position-in-ecosystem
(category "")
(subcategory "")
(unique-value ()))
(category "data-layer")
(subcategory "database-client")
(unique-value
("Type-safe Redis bindings for ReScript")
("Deno-first implementation")
("Full Redis feature coverage including Streams, Sentinel, Cluster")
("Part of rescript-full-stack ecosystem")))

(related-projects ())
(related-projects
(upstream
(deno-redis
(url "https://deno.land/x/redis")
(relationship "dependency")
(purpose "Underlying Redis implementation")))
(siblings
(rescript-effect
(url "https://github.com/hyperpolymath/rescript-effect")
(relationship "ecosystem")
(purpose "Effect system for side effects"))
(rescript-schema
(url "https://github.com/hyperpolymath/rescript-schema")
(relationship "ecosystem")
(purpose "Runtime validation for stored data"))
(rescript-fetch
(url "https://github.com/hyperpolymath/rescript-fetch")
(relationship "ecosystem")
(purpose "HTTP client for web APIs")))
(downstream
(rescript-full-stack
(url "https://github.com/hyperpolymath/rescript-full-stack")
(relationship "parent-ecosystem")
(purpose "Full-stack ReScript development"))))

(what-this-is ())
(what-this-is
("A Redis client library for ReScript")
("Type-safe bindings with proper option types")
("Support for Redis Streams, Sentinel, and Cluster")
("Designed for Deno runtime"))

(what-this-is-not ()))
(what-this-is-not
("Not a Redis server implementation")
("Not a Node.js package (Deno only)")
("Not a database abstraction layer")
("Not compatible with ioredis or node-redis APIs")))
57 changes: 51 additions & 6 deletions .machine_readable/META.scm
Original file line number Diff line number Diff line change
@@ -1,17 +1,62 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
;; META.scm - Meta-level information for rsr-template-repo
;; META.scm - Meta-level information for rescript-redis
;; Media-Type: application/meta+scheme

(meta
(architecture-decisions ())
(architecture-decisions
(adr-001
(title "Use deno.land/x/redis as underlying library")
(status "accepted")
(context "Need reliable Redis client for Deno")
(decision "Wrap deno.land/x/redis with ReScript bindings")
(consequences
("Mature, tested Redis implementation")
("Deno-native with proper module resolution")
("Active maintenance")))

(adr-002
(title "Option types for nullable responses")
(status "accepted")
(context "Redis GET and similar can return null")
(decision "Use option<T> for all nullable responses")
(consequences
("Type-safe null handling")
("Forces explicit handling of missing values")
("Idiomatic ReScript code")))

(adr-003
(title "Module organization for enterprise features")
(status "accepted")
(context "Streams, Sentinel, Cluster are advanced features")
(decision "Use submodules (Redis.Streams, Redis.Sentinel, Redis.Cluster)")
(consequences
("Clear separation of concerns")
("Users import only what they need")
("Easier to maintain and document"))))

(development-practices
(code-style ())
(code-style
(formatter "rescript-format")
(line-length 100)
(pipe-style "first"))
(security
(principle "Defense in depth"))
(testing ())
(principle "Defense in depth")
(no-hardcoded-secrets #t)
(tls-preferred #t))
(testing
(framework "deno-test")
(coverage-target 80))
(versioning "SemVer")
(documentation "AsciiDoc")
(branching "main for stable"))

(design-rationale ()))
(design-rationale
(api-style
(description "Pipe-first friendly with Redis as first arg")
(rationale "Matches ReScript conventions and enables chaining"))
(async-handling
(description "All IO operations return promise<T>")
(rationale "Consistent with Deno's async model"))
(error-handling
(description "Currently relies on promise rejection")
(future "Add Result<T,E> variants for explicit error handling"))))
16 changes: 10 additions & 6 deletions .machine_readable/NEUROSYM.scm
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
;; NEUROSYM.scm - Neurosymbolic integration config for rsr-template-repo
;; NEUROSYM.scm - Neurosymbolic integration config for rescript-redis

(define neurosym-config
`((version . "1.0.0")
(symbolic-layer
((type . "scheme")
(reasoning . "deductive")
(verification . "formal")))
((type . "rescript")
(reasoning . "type-driven")
(verification . "compile-time")))
(neural-layer
((embeddings . false)
(fine-tuning . false)))
(integration . ())))
(fine-tuning . false)
(semantic-search . false)))
(integration
((code-generation . "ai-assisted")
(documentation . "ai-reviewed")
(testing . "ai-suggested")))))
40 changes: 32 additions & 8 deletions .machine_readable/PLAYBOOK.scm
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
;; PLAYBOOK.scm - Operational runbook for rsr-template-repo
;; PLAYBOOK.scm - Operational runbook for rescript-redis

(define playbook
`((version . "1.0.0")
(procedures
((deploy . (("build" . "just build")
("test" . "just test")
("release" . "just release")))
(rollback . ())
(debug . ())))
(alerts . ())
(contacts . ())))
((build
(steps
("deno task build"))
(on-failure "Check rescript.json and src/ files"))
(test
(steps
("Start Redis: docker run -p 6379:6379 redis:7-alpine")
("deno task test"))
(on-failure "Ensure Redis is running on localhost:6379"))
(release
(steps
("Verify all tests pass")
("Update version in deno.json")
("Create git tag")
("deno publish"))
(on-failure "Check JSR authentication"))
(debug
(steps
("Enable verbose logging: DENO_REDIS_DEBUG=1")
("Check Redis connection: redis-cli ping")
("Verify network: deno run --allow-net debug.ts")))))
(alerts
((redis-connection-failed
(severity . "critical")
(action . "Check Redis server status and network"))
(type-error
(severity . "high")
(action . "Run deno task build to identify issue"))))
(contacts
((maintainer . "hyperpolymath")
(issues . "github.com/hyperpolymath/rescript-redis/issues")))))
74 changes: 55 additions & 19 deletions .machine_readable/STATE.scm
Original file line number Diff line number Diff line change
@@ -1,39 +1,75 @@
;; SPDX-License-Identifier: AGPL-3.0-or-later
;; STATE.scm - Project state for rsr-template-repo
;; STATE.scm - Project state for rescript-redis
;; Media-Type: application/vnd.state+scm

(state
(metadata
(version "0.0.1")
(version "0.1.0")
(schema-version "1.0")
(created "2026-01-03")
(updated "2026-01-03")
(project "rsr-template-repo")
(repo "github.com/hyperpolymath/rsr-template-repo"))
(created "2025-01-04")
(updated "2025-01-04")
(project "rescript-redis")
(repo "github.com/hyperpolymath/rescript-redis"))

(project-context
(name "rsr-template-repo")
(tagline "")
(tech-stack ()))
(name "rescript-redis")
(tagline "Type-safe Redis client for ReScript using Deno")
(tech-stack
("rescript" "deno" "redis")))

(current-position
(phase "initial")
(overall-completion 0)
(components ())
(working-features ()))
(phase "development")
(overall-completion 70)
(components
(core-bindings 100)
(streams 100)
(sentinel 100)
(cluster 100)
(tests 0)
(documentation 80))
(working-features
("string-operations")
("hash-operations")
("list-operations")
("set-operations")
("sorted-set-operations")
("pub-sub")
("streams")
("consumer-groups")
("sentinel-support")
("cluster-support")
("json-helpers")))

(route-to-mvp
(milestones ()))
(milestones
(v0.1.0
(status "in-progress")
(remaining
("basic-test-suite")
("jsr-publishing")))))

(blockers-and-issues
(critical)
(high)
(medium)
(medium
("need-test-coverage"))
(low))

(critical-next-actions
(immediate)
(this-week)
(this-month))
(immediate
("add-basic-tests")
("verify-compilation"))
(this-week
("publish-to-jsr"))
(this-month
("add-transactions")
("add-pipelining")))

(session-history ()))
(session-history
((date "2025-01-04")
(actions
("created-redis-bindings")
("added-streams-module")
("added-sentinel-module")
("added-cluster-module")
("created-documentation")))))
Loading
Loading