@svashevchenko/ez-know 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -0
- package/dist/cli.js +4709 -0
- package/dist/cli.js.map +7 -0
- package/dist/guides/business-rules.md +47 -0
- package/dist/guides/capabilities.md +41 -0
- package/dist/guides/conflicts.md +16 -0
- package/dist/guides/constraints.md +35 -0
- package/dist/guides/domains.md +17 -0
- package/dist/guides/entities.md +44 -0
- package/dist/guides/evidence.md +16 -0
- package/dist/guides/features.md +43 -0
- package/dist/guides/questions.md +17 -0
- package/dist/guides/rationales.md +17 -0
- package/dist/guides/relationships.md +19 -0
- package/dist/public/assets/index-BvKMODjW.js +331 -0
- package/dist/public/assets/index-CzQmD36n.css +1 -0
- package/dist/public/index.html +17 -0
- package/dist/reference/ez-know-extract-knowledge-from-code/SKILL.md +339 -0
- package/dist/reference/ez-know-update-knowledge-base/SKILL.md +312 -0
- package/dist/rest/server.js +3237 -0
- package/dist/rest/server.js.map +7 -0
- package/dist/server.js +3357 -0
- package/dist/server.js.map +7 -0
- package/package.json +73 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Business Rules
|
|
2
|
+
|
|
3
|
+
Business rules describe observable AS-IS system behavior and product rules.
|
|
4
|
+
|
|
5
|
+
A BusinessRule is not a Feature, Capability, or Constraint.
|
|
6
|
+
|
|
7
|
+
## What To Capture
|
|
8
|
+
|
|
9
|
+
- The condition that triggers the behavior.
|
|
10
|
+
- The system response, restriction, or enforcement.
|
|
11
|
+
- The feature, entity, or domain the rule applies to.
|
|
12
|
+
- Whether the behavior is shown, hidden, rejected, transitioned, calculated, required, or allowed.
|
|
13
|
+
|
|
14
|
+
## Style
|
|
15
|
+
|
|
16
|
+
Prefer `when ... then ...` or Gherkin-compatible wording:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
WHEN <condition/context>
|
|
20
|
+
THEN <expected system behavior/effect>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
GIVEN <state/context>
|
|
25
|
+
WHEN <event/action>
|
|
26
|
+
THEN <observable outcome>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Paid orders cannot be cancelled directly.
|
|
33
|
+
Only managers can approve invoices above $10,000.
|
|
34
|
+
Refund amount is calculated from paid amount minus non-refundable fees.
|
|
35
|
+
Cancel button is hidden when order status is Completed.
|
|
36
|
+
An order must contain at least one item before submission.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
- Capture behavior, not grouping.
|
|
42
|
+
- Do not use BusinessRule for a high-level capability area.
|
|
43
|
+
- Do not use BusinessRule as a replacement for Feature.
|
|
44
|
+
- Prefer rules with explicit condition and effect.
|
|
45
|
+
- If evidence only shows UI behavior, do not claim backend enforcement unless supported.
|
|
46
|
+
- If the rule reason is unknown, create a Rationale with low confidence or a Question.
|
|
47
|
+
- If a limitation is caused by implementation, integration, infrastructure, scale, or legacy architecture, capture that as Constraint instead of BusinessRule, or link both when the system behavior is caused by a constraint.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Capabilities
|
|
2
|
+
|
|
3
|
+
Capabilities are grouping containers for related features, similar to an Agile epic.
|
|
4
|
+
|
|
5
|
+
Use capabilities when one domain or entity has too many related features and the grouping adds clarity.
|
|
6
|
+
|
|
7
|
+
## What To Capture
|
|
8
|
+
|
|
9
|
+
- The broader product area the feature set belongs to.
|
|
10
|
+
- Domain and entity context.
|
|
11
|
+
- Child features that belong in the same grouping.
|
|
12
|
+
|
|
13
|
+
## Naming Guidance
|
|
14
|
+
|
|
15
|
+
Good capability names:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
Order Management
|
|
19
|
+
Order Lifecycle
|
|
20
|
+
Refund Management
|
|
21
|
+
Billing
|
|
22
|
+
User Administration
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Bad capability names:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Create Order
|
|
29
|
+
Cancel Order
|
|
30
|
+
Approve Refund
|
|
31
|
+
Generate Invoice
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- Capability groups Feature objects.
|
|
37
|
+
- Capability may group nested Capability objects if the area is large.
|
|
38
|
+
- Capability must not be used as an atomic business function.
|
|
39
|
+
- Capability should not be created only because a technical folder or module exists.
|
|
40
|
+
- Capability can reference evidence that supports the grouping, but it should not become a code map.
|
|
41
|
+
- If unsure whether something is Capability or Feature, ask: “Is this a concrete business action?” If yes, use Feature.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Conflicts
|
|
2
|
+
|
|
3
|
+
Conflicts record incompatible interpretations that evidence has not resolved.
|
|
4
|
+
|
|
5
|
+
## What To Capture
|
|
6
|
+
|
|
7
|
+
- The competing meanings or boundaries.
|
|
8
|
+
- The evidence that supports each side.
|
|
9
|
+
- The question that would resolve the conflict.
|
|
10
|
+
|
|
11
|
+
## Guidance
|
|
12
|
+
|
|
13
|
+
- Use Conflict instead of silently collapsing uncertain meanings.
|
|
14
|
+
- Keep the conflict small and explicit.
|
|
15
|
+
- Resolve it only when evidence or human input settles the ambiguity.
|
|
16
|
+
- Create a Conflict when two records may represent the same concept but evidence is not strong enough to merge them.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Constraints
|
|
2
|
+
|
|
3
|
+
Constraints describe limitations, boundaries, restrictions, or external forces that shape what the system can do or how it can do it.
|
|
4
|
+
|
|
5
|
+
## What To Capture
|
|
6
|
+
|
|
7
|
+
- The source of the limitation.
|
|
8
|
+
- The effect on behavior, implementation, or planning.
|
|
9
|
+
- Any workaround or removability clues.
|
|
10
|
+
|
|
11
|
+
## When To Use
|
|
12
|
+
|
|
13
|
+
Use Constraint when the important knowledge is:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
The system is limited by <cause/source>, which affects <feature/rule/entity/change>.
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Examples:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Username length is limited to 32 characters because the legacy database column is VARCHAR(32).
|
|
23
|
+
Refund export is limited to 1000 records per batch because the ERP endpoint times out on larger payloads.
|
|
24
|
+
Invoices must be retained for 7 years because of accounting regulation.
|
|
25
|
+
Orders cannot be edited after ERP synchronization because the ERP integration is one-way.
|
|
26
|
+
Only CSV export is available because the reporting pipeline does not support XLSX generation.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- Capture constraints as causes, boundaries, or limitations, not as generic behavior.
|
|
32
|
+
- If the observable behavior is important, create a BusinessRule and link it to the Constraint.
|
|
33
|
+
- If the source of the limitation is unknown, use `constraint_type: unknown` and create a Question.
|
|
34
|
+
- Do not duplicate every BusinessRule as a Constraint. Create a Constraint only when there is a distinct limiting factor, cause, boundary, or implementation/compliance pressure.
|
|
35
|
+
- Technical constraints are especially important for brownfield change planning because they identify why a seemingly simple product change may be hard.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Domains
|
|
2
|
+
|
|
3
|
+
Domains are the top-level product areas that own the rest of the knowledge graph.
|
|
4
|
+
|
|
5
|
+
## What To Capture
|
|
6
|
+
|
|
7
|
+
- The domain name and purpose.
|
|
8
|
+
- Why the domain exists in the product.
|
|
9
|
+
- The entities and capabilities that belong to it.
|
|
10
|
+
- Evidence that shows this is a real product boundary, not just a folder boundary.
|
|
11
|
+
|
|
12
|
+
## Guidance
|
|
13
|
+
|
|
14
|
+
- Top-level grouping is always by domain.
|
|
15
|
+
- Use one domain record per owning area.
|
|
16
|
+
- If a concept crosses domains, keep one owner and reference it from the others.
|
|
17
|
+
- Do not create domain records just because the codebase has a directory or module.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Entities
|
|
2
|
+
|
|
3
|
+
Entities are the product concepts the system stores, displays, validates, processes, or uses in business behavior.
|
|
4
|
+
|
|
5
|
+
Entities also own the terminology related to them.
|
|
6
|
+
|
|
7
|
+
## Use Entities For
|
|
8
|
+
|
|
9
|
+
Use Entity for concepts such as:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Order
|
|
13
|
+
Invoice
|
|
14
|
+
Customer
|
|
15
|
+
Payment
|
|
16
|
+
Refund
|
|
17
|
+
Subscription
|
|
18
|
+
User Account
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Do not use Entity for purely technical implementation objects unless they represent a product concept visible in business behavior.
|
|
22
|
+
|
|
23
|
+
## What To Capture
|
|
24
|
+
|
|
25
|
+
- Canonical business meaning.
|
|
26
|
+
- Aliases and ambiguous terms.
|
|
27
|
+
- Technical representations only when they clarify the business concept.
|
|
28
|
+
- Links to domains, relationships, capabilities, features, and rules.
|
|
29
|
+
|
|
30
|
+
## Terminology Guidance
|
|
31
|
+
|
|
32
|
+
- `name` is the canonical product name used by the knowledge base.
|
|
33
|
+
- `business_definition` explains what the concept means in the product/domain.
|
|
34
|
+
- `aliases` are alternative names used in UI, API, docs, translations, or code.
|
|
35
|
+
- `ambiguous_terms` captures terms that may mean different things across domains.
|
|
36
|
+
- `technical_representations` captures relevant code/API/database names without turning Entity into a code map.
|
|
37
|
+
|
|
38
|
+
If the same term appears to mean different things in different domains, create separate Entity objects and a Conflict instead of forcing one meaning.
|
|
39
|
+
|
|
40
|
+
## Guidance
|
|
41
|
+
|
|
42
|
+
- Do not turn Entity into a code map.
|
|
43
|
+
- Split meanings when the same term is used differently in different domains.
|
|
44
|
+
- Prefer one entity with evidence over multiple near-duplicates.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Evidence
|
|
2
|
+
|
|
3
|
+
Evidence is the central object of the knowledge base.
|
|
4
|
+
|
|
5
|
+
## What To Capture
|
|
6
|
+
|
|
7
|
+
- A short description of what the source proves.
|
|
8
|
+
- The source type and location hint.
|
|
9
|
+
- The objects that the evidence supports.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- Do not store large code blocks.
|
|
14
|
+
- Keep excerpts short.
|
|
15
|
+
- Use evidence as support for product knowledge, not as a code index.
|
|
16
|
+
- Human confirmation is valid evidence.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Features
|
|
2
|
+
|
|
3
|
+
Features are the atomic business functions of the system.
|
|
4
|
+
|
|
5
|
+
A Feature answers the question: what concrete business action can the system perform or support?
|
|
6
|
+
|
|
7
|
+
## Good Feature Names
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Create Order
|
|
11
|
+
Cancel Order
|
|
12
|
+
Approve Refund
|
|
13
|
+
Generate Invoice
|
|
14
|
+
Reset Password
|
|
15
|
+
Export Orders
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Bad feature names:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Order Management
|
|
22
|
+
Billing
|
|
23
|
+
Refund Area
|
|
24
|
+
Admin Module
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- Feature represents one concrete business action or user-visible business function.
|
|
30
|
+
- Feature must not be used to group other features. Use Capability for grouping.
|
|
31
|
+
- Feature can belong to one or more Capability objects.
|
|
32
|
+
- Feature can be related to multiple Entity objects.
|
|
33
|
+
- Feature can have BusinessRule and Constraint objects.
|
|
34
|
+
- Feature must have evidence.
|
|
35
|
+
- Feature should be independent from technical implementation details such as components, hooks, files, or services.
|
|
36
|
+
- Avoid creating a feature for every tiny UI action unless the action has product meaning.
|
|
37
|
+
|
|
38
|
+
## Decision Rule
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
If it is a concrete action: Feature.
|
|
42
|
+
If it is a grouping area for related actions: Capability.
|
|
43
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Questions
|
|
2
|
+
|
|
3
|
+
Questions are first-class artifacts.
|
|
4
|
+
Questions capture important unknowns that block confident extraction or planning.
|
|
5
|
+
|
|
6
|
+
## What To Capture
|
|
7
|
+
|
|
8
|
+
- The exact unresolved question.
|
|
9
|
+
- Why it matters for extraction or planning.
|
|
10
|
+
- Related rules, constraints, or entities.
|
|
11
|
+
|
|
12
|
+
## Guidance
|
|
13
|
+
|
|
14
|
+
- Ask a question when confidence is too low to commit.
|
|
15
|
+
- Keep questions specific and answerable.
|
|
16
|
+
- Mark them obsolete or answered once the uncertainty clears.
|
|
17
|
+
- Generate questions for all low-confidence or inferred important knowledge.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Rationales
|
|
2
|
+
|
|
3
|
+
Rationale is the "why" layer.
|
|
4
|
+
|
|
5
|
+
## What To Capture
|
|
6
|
+
|
|
7
|
+
- The inferred reason behind the behavior.
|
|
8
|
+
- The rule or constraint it explains.
|
|
9
|
+
- Any evidence that supports the inference.
|
|
10
|
+
|
|
11
|
+
## Guidance
|
|
12
|
+
|
|
13
|
+
- Keep rationale language cautious.
|
|
14
|
+
- If the reason is not explicit, treat it as inferred.
|
|
15
|
+
- Do not duplicate the rule itself; explain it.
|
|
16
|
+
- For every rule or constraint, attempt to explain why it likely exists.
|
|
17
|
+
- If not explicit, mark it as inferred and generate a question.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Relationships
|
|
2
|
+
|
|
3
|
+
Relationships describe how two entities connect or depend on each other.
|
|
4
|
+
|
|
5
|
+
## What To Capture
|
|
6
|
+
|
|
7
|
+
- The source entity and target entity.
|
|
8
|
+
- The relationship type.
|
|
9
|
+
- The observable description of the connection.
|
|
10
|
+
- Evidence that supports both ends of the relationship.
|
|
11
|
+
|
|
12
|
+
## Guidance
|
|
13
|
+
|
|
14
|
+
- Use relationships for explicit links, ownership, containment, dependency, references, or transitions.
|
|
15
|
+
- Use `depends_on` when the source object requires the target for runtime delivery of its visible behavior.
|
|
16
|
+
- Use `references` when the source object can point to, display, or project the target without requiring it to function.
|
|
17
|
+
- For cross-scope delivery paths, prefer a relationship when the external provider is necessary for the observable behavior to work.
|
|
18
|
+
- Do not use them to restate a feature or rule.
|
|
19
|
+
- Keep the wording factual and narrow.
|