domain capa

domain-research-intel

Intelligence research domain: three-state observations, two-axis source grading, and disclosure classification. Peer to domain-research; depends on the kernel only.

Intelligence research domain: three-state observations, two-axis source grading, and disclosure classification. Peer to domain-research; depends on the kernel only.

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/research-intel
Edition2021
Targetsdomain_research_intel
Public items45 across 3 modules
Tests33

What it is for

Intelligence research — a peer domain of domain_research.

# Where this sits

domain-research is the kernel: run, artifact, conclusion, Confidence, store, history. It is domain-neutral and dependency-light.

This crate is one domain built on that kernel, alongside commerce research. Domains are peers; dependencies point inward only. A commerce consumer never compiles this crate, and this crate never reaches into commerce.

domain-research            kernel — domain-neutral
├── domain-research-intel      this crate
└── library crates-research-commerce   valuation, description, classification

See ADR 0001. An earlier draft placed this inside the kernel; that was overturned at consensus for forcing intel dependencies onto unrelated consumers.

# What it provides

the construction discipline that keeps a transport failure from being recorded as a negative finding.

credibility, stored separately, projecting onto the kernel's Confidence.

record for methods that contact a subject directly.

# The rule the whole crate is organised around

Never record "I could not find out" as "the answer is no."

A certificate-transparency API returned HTTP 502; the result was stored as zero certificates ever issued; a legitimate eight-year-old company with 301 certificates read as a purpose-built fraud instrument. That failure is unrepresentable here — observed::absent requires a witness that cannot be minted from a failure.

Everything else in this crate is guidance and defaults. That one is absolute, because a confident false negative cannot be walked back once it has propagated into the conclusions built on top of it.

Capabilities

Authorization

Disclosure classification — what a collection method reveals, and to whom.

Item
pub struct Authorization
Authorization :: fn grant(matter_id : Uuid, authorized_by : Uuid, authorized_by_display : impl Into <String>, subject : impl Into <String>, reason : impl Into <String>, granted_at : DateTime <Utc>, expires_at : DateTime <Utc>,) -> Result <Self, AuthorizationError>
Authorization :: fn covers(& self, subject : & str, now : DateTime <Utc>) -> bool
Authorization :: fn is_expired(& self, now : DateTime <Utc>) -> bool

AuthorizationError

Disclosure classification — what a collection method reveals, and to whom.

Item
pub enum AuthorizationError

DisclosureClass

Disclosure classification — what a collection method reveals, and to whom.

Item
pub enum DisclosureClass
DisclosureClass :: const fn requires_authorization(self) -> bool
DisclosureClass :: const fn mechanism(self) -> & 'static str
DisclosureClass :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

AdmiraltyGrade

Two-axis source grading (Admiralty Code / NATO STANAG 2511).

Item
pub struct AdmiraltyGrade
AdmiraltyGrade :: const fn new(reliability : SourceReliability, credibility : InfoCredibility) -> Self
AdmiraltyGrade :: fn code(& self) -> String
AdmiraltyGrade :: const fn is_fully_assessed(& self) -> bool
AdmiraltyGrade :: fn confidence(& self) -> Confidence
AdmiraltyGrade :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

InfoCredibility

Two-axis source grading (Admiralty Code / NATO STANAG 2511).

Item
pub enum InfoCredibility
InfoCredibility :: const fn code(self) -> u8
InfoCredibility :: const fn is_assessed(self) -> bool
InfoCredibility :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

SourceReliability

Two-axis source grading (Admiralty Code / NATO STANAG 2511).

Item
pub enum SourceReliability
SourceReliability :: const fn code(self) -> char
SourceReliability :: const fn is_assessed(self) -> bool
SourceReliability :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

observed (other)

Three-state observation: Present, Absent, or Unknown.

Item
fn absent <T>(_witness : & EmptySuccess) -> Observed <T>

EmptySuccess

Three-state observation: Present, Absent, or Unknown.

Item
pub struct EmptySuccess
EmptySuccess :: fn from_verified_response(source : impl Into <String>, status : u16, parsed_ok : bool,) -> Result <Self, Unknown>
EmptySuccess :: fn from_authoritative_negative(source : impl Into <String>, protocol : & str, status : u16, well_formed_negative : bool,) -> Result <Self, Unknown>
EmptySuccess :: fn source(& self) -> & str
EmptySuccess :: const fn status(& self) -> u16

Observed

Three-state observation: Present, Absent, or Unknown.

Item
pub type Observed<T>: Result <Option <T>, Unknown>
fn present <T>(value : T) -> Observed <T>

Observed<T>

Three-state observation: Present, Absent, or Unknown.

Item
Observed<T> :: fn presence(& self) -> Presence
Observed<T> :: fn undetermined(& self) -> Option <& Unknown>

ObservedExt

Three-state observation: Present, Absent, or Unknown.

Item
pub trait ObservedExt<T>

Presence

Three-state observation: Present, Absent, or Unknown.

Item
pub enum Presence
Presence :: const fn is_scorable(self) -> bool
Presence :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

Unknown

Three-state observation: Present, Absent, or Unknown.

Item
pub struct Unknown
Unknown :: fn transport(source : impl Into <String>, reason : impl Into <String>, attempts : u8) -> Self
Unknown :: fn http_failure(source : impl Into <String>, status : u16, attempts : u8) -> Self
Unknown :: fn malformed(source : impl Into <String>, reason : impl Into <String>) -> Self
Unknown :: fn exhausted(source : impl Into <String>, attempts : u8, last : impl Into <String>) -> Self
Unknown :: fn not_attempted(source : impl Into <String>, reason : impl Into <String>) -> Self
Unknown :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
fn unknown <T>(u : Unknown) -> Observed <T>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

domain_research_intel

flowchart TD
  n_domain_research_intel["domain_research_intel"]
  n_domain_research_intel --> n_disclosure["disclosure"]
  n_domain_research_intel --> n_grading["grading"]
  n_domain_research_intel --> n_observed["observed"]

Public surface

`disclosure`

ItemWhat it is
pub enum DisclosureClassWhat a collection method discloses, and to whom.
DisclosureClass :: const fn requires_authorization(self) -> boolWhether an Authorization record is required before this may run.
DisclosureClass :: const fn mechanism(self) -> & 'static strA one-line explanation of the mechanism, for the operator
DisclosureClass :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct AuthorizationA recorded decision to perform a disclosing action against a named subject
Authorization :: fn grant(matter_id : Uuid, authorized_by : Uuid, authorized_by_display : impl Into <String>, subject : impl Into <String>, reason : impl Into <String>, granted_at : DateTime <Utc>, expires_at : DateTime <Utc>,) -> Result <Self, AuthorizationError>Record a decision
Authorization :: fn covers(& self, subject : & str, now : DateTime <Utc>) -> boolWhether this authorization covers subject at time now
Authorization :: fn is_expired(& self, now : DateTime <Utc>) -> boolWhether this has lapsed at now.
pub enum AuthorizationErrorWhy an authorization could not be recorded.

`grading`

ItemWhat it is
pub enum SourceReliabilityReliability of the source (Admiralty axis 1).
SourceReliability :: const fn code(self) -> charThe letter used in reports.
SourceReliability :: const fn is_assessed(self) -> boolWhether the source has actually been assessed
SourceReliability :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub enum InfoCredibilityCredibility of this specific claim (Admiralty axis 2).
InfoCredibility :: const fn code(self) -> u8The digit used in reports.
InfoCredibility :: const fn is_assessed(self) -> boolWhether the claim has actually been assessed.
InfoCredibility :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct AdmiraltyGradeA two-axis grade, e.g
AdmiraltyGrade :: const fn new(reliability : SourceReliability, credibility : InfoCredibility) -> SelfConstruct a grade.
AdmiraltyGrade :: fn code(& self) -> StringThe canonical short form, e.g
AdmiraltyGrade :: const fn is_fully_assessed(& self) -> boolWhether both axes have been assessed
AdmiraltyGrade :: fn confidence(& self) -> ConfidenceProject onto the kernel's coarse Confidence scale
AdmiraltyGrade :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

`observed`

ItemWhat it is
pub type Observed<T>: Result <Option <T>, Unknown>A three-state observation
pub struct UnknownWhy an observation could not be determined
Unknown :: fn transport(source : impl Into <String>, reason : impl Into <String>, attempts : u8) -> SelfThe request never completed: connection refused, TLS failure, timeout, DNS failure.
Unknown :: fn http_failure(source : impl Into <String>, status : u16, attempts : u8) -> SelfThe server answered, but not with a usable result — 5xx, 429, or any status that is not a well-formed success.
Unknown :: fn malformed(source : impl Into <String>, reason : impl Into <String>) -> SelfThe response arrived with a success status but could not be parsed — truncated JSON, an HTML error page where JSON was expected, a schema change
Unknown :: fn exhausted(source : impl Into <String>, attempts : u8, last : impl Into <String>) -> SelfThe retry budget was exhausted without a usable answer.
Unknown :: fn not_attempted(source : impl Into <String>, reason : impl Into <String>) -> SelfThe source was never consulted — not attempted, skipped, or gated
Unknown :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct EmptySuccessProof that a source affirmatively answered "nothing here"
EmptySuccess :: fn from_verified_response(source : impl Into <String>, status : u16, parsed_ok : bool,) -> Result <Self, Unknown>Mint a witness from a verified response
EmptySuccess :: fn from_authoritative_negative(source : impl Into <String>, protocol : & str, status : u16, well_formed_negative : bool,) -> Result <Self, Unknown>Mint a witness from a protocol-level authoritative negative
EmptySuccess :: fn source(& self) -> & strThe source that answered.
EmptySuccess :: const fn status(& self) -> u16The success status observed.
fn present <T>(value : T) -> Observed <T>A determined, present observation.
fn absent <T>(_witness : & EmptySuccess) -> Observed <T>A determined absence — the source said "nothing here" and we believe it
fn unknown <T>(u : Unknown) -> Observed <T>An undetermined observation.
pub enum PresenceWhat an observation determined, for explicit branching and reporting.
Presence :: const fn is_scorable(self) -> boolWhether this observation may be used to support a finding
Presence :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub trait ObservedExt<T>Explicit accessors for Observed
Observed<T> :: fn presence(& self) -> Presence
Observed<T> :: fn undetermined(& self) -> Option <& Unknown>

Re-exports. Exported here, defined elsewhere.

ExportDefined in
Confidencedomain_research::Confidence
{AdmiraltyGrade,InfoCredibility,SourceReliability}grading::{AdmiraltyGrade,InfoCredibility,SourceReliability}
{Authorization,AuthorizationError,DisclosureClass}disclosure::{Authorization,AuthorizationError,DisclosureClass}
{EmptySuccess,Observed,ObservedExt,Presence,Unknown}observed::{EmptySuccess,Observed,ObservedExt,Presence,Unknown}

Boundary

Depends on no other workspace tier.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/research-intel
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`domain-research`domainnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio-test^0.4noalways

Build. None.

Depended on by. 2 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_research_intel["application-research-intel"] -->|uses| SELF
  n_domain_domain_survey["domain-domain-survey"] -->|uses| SELF
  SELF["domain-research-intel"]
  SELF -->|runtime| n_domain_research["domain-research"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libdomain_research_intel`src/lib.rs`

Error model

Error typeNamed by
AuthorizationErrordeclared, no public signature returns it

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

2 workspace crates depend on this one: application-research-intel, domain-domain-survey.

Verification

KindCount
Unit tests33
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
disclosure302
grading306
observed808

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc3745
Public modules with a //! block33
pie showData
    title Public items with rustdoc
    "Documented" : 37
    "No rustdoc detected" : 8

Metrics

MetricValue
Rust source files4
Source lines1257
Code lines730
Public API items45
Public modules3
Tests33
Examples0
Cargo features0
Direct runtime dependencies6
Workspace reverse dependencies2
pie showData
    title Public API by kind
    "enum" : 5
    "function" : 3
    "method" : 31
    "struct" : 4
    "trait" : 1
    "type alias" : 1
pie showData
    title Rust source composition
    "Code" : 730
    "Blank or comment" : 527

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las domain · Manual