Loading...
Loading...
Use the DRI Text Analysis Method (Data-Rule-Interaction) to perform word-by-word decomposition and domain modeling on natural language requirement descriptions. Reduce unstructured business requirement texts to structured architectural abstractions in three dimensions: Data (D), Rule (R), and Interaction (I), and directly generate conceptual tables usable for system design. It is suitable for requirement analysis, ubiquitous language extraction, text parsing before architecture design, and converting long requirement documents into clear development task decompositions.
npx skill4agent add cruldra/skills dri-text-analysis┌──────────────────────────────────────────────┐
│ │
│ Trigger(I) ──→ Execute(R) ──→ Read/Write(D) │
│ │
│ Feedback(I) ←── Callback(R) ←── Change(D) │
│ │
└──────────────────────────────────────────────┘| DRI Concept | ECB Pattern | Hexagonal Architecture | Clean Architecture |
|---|---|---|---|
| Data (D) | Entity | Domain Model | Entities |
| Rule (R) | Control | Application Service | Use Cases |
| Interaction (I) | Boundary | Port / Adapter | Interface Adapters |
monitoring nodeframetemperature valueoperating status80 degreesabnormalvideo streamon-site screenshotalarm notificationIf...exceeds...for 3 consecutive secondsexceedsgreater thanequal to3 consecutive secondsevery 5 minutesfire intelligent reasoning logicupdate to abnormalextract temperaturecalculate average valuereceive video streamuser clicksend notificationrender frameadministratorplayercameraWeComAPI interfaceWord[Tag:Subcategory]D:entityD:attributeD:constantD:stream-dataD:messageD:state-enumR:condition-startR:threshold-comparisonR:temporal-constraintR:domain-serviceR:state-transitionR:processing-actionI:input-deviceI:input-actionI:output-channelI:output-actionI:external-actorI:recipient| Abstract Dimension | Extracted Specific Concepts | System Design Mapping | Notes/Design Suggestions |
|---|---|---|---|
| Data (Data) | All content with D tags extracted from annotations | Domain Model/Entity, Configuration Item, Persistence Table Design | Transient vs Persistent, Configurable vs Hard-coded |
| Rule (Rule) | All content with R tags extracted from annotations | Core Algorithm, Domain Service, State Machine | Parts that require focused unit testing |
| Interaction (Interaction) | All content with I tags extracted from annotations | Inbound Gateway, Outbound Gateway, UI Component | Fault tolerance, Retry, Concurrent Processing |
"The monitoring system receives video streams in real time through cameras, extracts the temperature value of the current frame. If the temperature exceeds 80 degrees for 3 consecutive seconds, it triggers the fire intelligent reasoning logic. The system automatically sends an alarm notification containing on-site screenshots to the administrator via WeCom, and updates the operating status of the monitoring node in the database to abnormal."
Monitoring systemvia Camera[I:recipient]real-time receive[I:input-device]video stream[I:input-action], extract[D:stream-data]current frame[R:processing-action]'s temperature value[D:entity]. If[D:attribute]temperature[R:condition-start]3 consecutive seconds[D:attribute]exceeds[R:temporal-constraint]80 degrees[R:threshold-comparison], then trigger[D:constant]fire intelligent reasoning logic[R:state-transition], system automatically via WeCom[R:domain-service]to administrator[I:output-channel]send[I:external-actor]containing on-site screenshot[I:output-action]alarm notification[D:stream-data], and in database update the monitoring node[D:message]'s operating status[D:entity]to[D:attribute]abnormal[R:state-transition].[D:state-enum]
| Abstract Dimension | Extracted Specific Concepts | System Design Mapping | Notes/Design Suggestions |
|---|---|---|---|
| Data (Data) | Video stream, frame, temperature value | Domain Model: | Video stream is transient in-memory data, frames may need caching |
| 80 degrees (threshold constant) | Configuration Item: | Should be designed as a configurable parameter instead of hard-coded | |
| Alarm notification, on-site screenshot | Message/Resource: | Screenshots need to be persisted to object storage, notifications should be logged | |
| Monitoring node, operating status, abnormal | Persistent Entity: | Corresponding to the node table and status enumeration field in the database | |
| Rule (Rule) | Extract (temperature) | Data Processing: Image recognition/sensor data parsing algorithm | Convert unstructured data to structured data |
| If...exceeds for 3 consecutive seconds | Reasoning Engine/State Machine: Time-series data sliding window judgment | Core business rule, requires focused unit testing to prevent false alarms | |
| Trigger fire intelligent reasoning logic | Domain Service: | Encapsulates complex judgment chains | |
| Update to (abnormal status) | State Transition: | Ensure atomicity and consistency of state transitions | |
| Interaction (Interaction) | Camera, receive | Inbound Gateway: Video stream receiving port/hardware driver | Need to consider fault tolerance boundaries for high concurrency and network latency |
| WeCom, administrator, send | Outbound Gateway: WeCom Webhook API Client | Need to handle retry mechanism for failed network calls |
## DRI Analysis Results
### 1. Inline Annotation
> [Place the annotated original text here]
### 2. Concept Abstract Summary Table
| Abstract Dimension | Extracted Specific Concepts | System Design Mapping | Notes/Design Suggestions |
|---------|----------------|------------|-------------|
| **Data (Data)** | ... | ... | ... |
| **Rule (Rule)** | ... | ... | ... |
| **Interaction (Interaction)** | ... | ... | ... |
### 3. Gap Check
- [x] / [ ] Data Coverage Check
- [x] / [ ] Rule Coverage Check
- [x] / [ ] Interaction Coverage Check
- ⚠️ [List found omissions or redundancies]
### 4. Design Suggestions
[Architecture-level suggestions based on analysis results][D:attribute][R:processing-action]