@antoneeo/kb-agentic-skill 1.19.0 → 1.20.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.
@@ -1,62 +1,62 @@
1
- #!/usr/bin/env python3
2
- """Knowledge lens entry point. Ship with sdlc_core.py and knowledge.py."""
3
- import sys
4
- from pathlib import Path
5
- sys.path.insert(0, str(Path(__file__).resolve().parent))
6
- try:
7
- import sdlc_core
8
- except ImportError as exc:
9
- sys.stderr.write("[ERROR] missing sdlc_core.py: %s\n"
10
- "Copy entry point, sdlc_core.py and knowledge.py together.\n" % exc)
11
- sys.exit(1)
12
- from sdlc_core import *
13
- from sdlc_core import _map_refs
14
- import knowledge
15
- from knowledge import *
16
- from knowledge import _kb_extra_validate, _kb_original_candidates
17
-
18
- DOMAIN = "knowledge"
19
-
20
- sdlc_core.set_entry_point(DOMAIN, provides=("code", "knowledge"))
21
-
22
- sdlc_core.set_profile(
23
- skill_name="kb-agentic",
24
- unit_noun="topic",
25
- support_files=("templates.md", "taxonomy.md", "guides.md", "vision.md",
26
- "distillation.md", "reconciliation.md", "elicitation.md",
27
- "review.md", "dispatch.md", "routing.md", "portability.md",
28
- "ENFORCEMENT.md", "memory.md"),
29
- capabilities=(
30
- # spine
31
- "triage", "write_triggers", "workstream_registry", "vision_gate",
32
- "design_review_gate", "guide_router", "worktree_hygiene",
33
- # knowledge overlay
34
- # `knowledge_portability` (F-030) is deliberately NOT declared: the
35
- # capability vocabulary lives in the shared spine, and no shared test
36
- # guards on portability, so adding a label there would mean editing
37
- # sdlc_core.py in three distributions to buy nothing.
38
- "taxonomy_pass", "subagent_dispatch", "question_discipline",
39
- ),
40
- # F-046: the per-turn line moved from this file's own `remind` command into
41
- # the shared spine, which now carries the machine for all three lenses. The
42
- # kb duties below are unchanged; what is new is the first one -- an unread
43
- # protocol cannot be applied, and until now nothing said so.
44
- remind_line=(
45
- "first decide if this skill governs the work; if yes, LOAD it once -- an "
46
- "unread protocol cannot be applied. Triage: L1 quick fact, L2 propagation, "
47
- "L3 new knowledge unit, Spike; declare the level. On this project's "
48
- "domain, read topics/INDEX.md first and cite claim ids, or state no "
49
- "coverage. Decisions today get recorded in the KB at close. Revising a "
50
- "document? Re-read it whole and rewrite to current state -- never append "
51
- "a delta."
52
- ),
53
- design_gate_between=("### 3. Request Analysis & Taxonomy Pass",
54
- "### 4. Knowledge Processing & Distillation"),
55
- )
56
-
57
-
58
- def main(argv=None):
59
- return knowledge.main(argv)
60
-
61
- if __name__ == "__main__":
62
- sys.exit(main())
1
+ #!/usr/bin/env python3
2
+ """Knowledge lens entry point. Ship with sdlc_core.py and knowledge.py."""
3
+ import sys
4
+ from pathlib import Path
5
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
6
+ try:
7
+ import sdlc_core
8
+ except ImportError as exc:
9
+ sys.stderr.write("[ERROR] missing sdlc_core.py: %s\n"
10
+ "Copy entry point, sdlc_core.py and knowledge.py together.\n" % exc)
11
+ sys.exit(1)
12
+ from sdlc_core import *
13
+ from sdlc_core import _map_refs
14
+ import knowledge
15
+ from knowledge import *
16
+ from knowledge import _kb_extra_validate, _kb_original_candidates
17
+
18
+ DOMAIN = "knowledge"
19
+
20
+ sdlc_core.set_entry_point(DOMAIN, provides=("code", "knowledge"))
21
+
22
+ sdlc_core.set_profile(
23
+ skill_name="kb-agentic",
24
+ unit_noun="topic",
25
+ support_files=("templates.md", "taxonomy.md", "guides.md", "vision.md",
26
+ "distillation.md", "reconciliation.md", "elicitation.md",
27
+ "review.md", "dispatch.md", "routing.md", "portability.md",
28
+ "ENFORCEMENT.md", "memory.md"),
29
+ capabilities=(
30
+ # spine
31
+ "triage", "write_triggers", "workstream_registry", "vision_gate",
32
+ "design_review_gate", "guide_router", "worktree_hygiene",
33
+ # knowledge overlay
34
+ # `knowledge_portability` (F-030) is deliberately NOT declared: the
35
+ # capability vocabulary lives in the shared spine, and no shared test
36
+ # guards on portability, so adding a label there would mean editing
37
+ # sdlc_core.py in three distributions to buy nothing.
38
+ "taxonomy_pass", "subagent_dispatch", "question_discipline",
39
+ ),
40
+ # F-046: the per-turn line moved from this file's own `remind` command into
41
+ # the shared spine, which now carries the machine for all three lenses. The
42
+ # kb duties below are unchanged; what is new is the first one -- an unread
43
+ # protocol cannot be applied, and until now nothing said so.
44
+ remind_line=(
45
+ "first decide if this skill governs the work; if yes, LOAD it once -- an "
46
+ "unread protocol cannot be applied. Triage: L1 quick fact, L2 propagation, "
47
+ "L3 new knowledge unit, Spike; declare the level. On this project's "
48
+ "domain, read topics/INDEX.md first and cite claim ids, or state no "
49
+ "coverage. Decisions today get recorded in the KB at close. Revising a "
50
+ "document? Re-read it whole and rewrite to current state -- never append "
51
+ "a delta."
52
+ ),
53
+ design_gate_between=("### 3. Request Analysis & Taxonomy Pass",
54
+ "### 4. Knowledge Processing & Distillation"),
55
+ )
56
+
57
+
58
+ def main(argv=None):
59
+ return knowledge.main(argv)
60
+
61
+ if __name__ == "__main__":
62
+ sys.exit(main())
@@ -203,6 +203,11 @@ DOMAINS = {
203
203
  "risk_label": "## Threat Map / Plan Risks",
204
204
  "id_prefix": "M-",
205
205
  },
206
+ "course": {
207
+ "risk_section": ("## Learning and Content Risks",),
208
+ "risk_label": "## Learning and Content Risks",
209
+ "id_prefix": "C-",
210
+ },
206
211
  }
207
212
  # Absent everything -- no `default_domain:` line, no `domain:` field -- a project is
208
213
  # `code`. That is what every project created before this field existed already is,
@@ -1298,7 +1303,7 @@ def cmd_validate(root, strict=False, hybrid=False):
1298
1303
  "have the user validate it")
1299
1304
 
1300
1305
  # ANALYSIS: frontmatter and mandatory sections
1301
- # Ids are unique WITHIN a domain (prefixes F-/K-/M- keep them apart in practice):
1306
+ # Ids are unique WITHIN a domain (prefixes F-/K-/M-/C- keep them apart in practice):
1302
1307
  # two lenses over one tree must not collide on a number neither of them chose.
1303
1308
  seen_ids = {}
1304
1309
  default_domain = project_default_domain(root)
@@ -20,6 +20,8 @@ supersedes: old_doc.md # only if it replaces another canonical doc
20
20
 
21
21
  When a doc replaces another: the new one declares `supersedes:`, the old one switches to `status: SUPERSEDED` (it stays as history, do not delete it). `sdlc_check.py validate` warns if `status` is missing or if a superseded doc is still `CURRENT`.
22
22
 
23
+ For a course in the same `ai_docs/` tree, `vision/features/VISION_course_<slug>.md` and `solutions/ANALYSIS_course_<slug>.md` declare `domain: course` explicitly and the ANALYSIS uses a `C-` ID. The feature Vision is scoped to that course; the project-wide Vision stays above all four domains. Course design belongs to `course-creator`.
24
+
23
25
  ## ai_docs/reference/GUIDE_[topic].md
24
26
 
25
27
  A guide is either OPERATIVE (`source_kind: document` — distilled from USER-PROVIDED