feat(arch): implement 'Code as Thought' architecture and formalize PSF Consensus Loop
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../system/skills/org-skill-web-research.org
|
||||
83
notes/org-skill-web-research.org
Normal file
83
notes/org-skill-web-research.org
Normal file
@@ -0,0 +1,83 @@
|
||||
#+TITLE: SKILL: Web Research Agent (Universal Literate Note)
|
||||
#+ID: skill-web-research
|
||||
#+STARTUP: content
|
||||
#+FILETAGS: :web:research:internet:psf:
|
||||
|
||||
* Overview
|
||||
The **Web Research Agent** provides the bridge to the internet. It fetches and synthesizes information from the web using pluggable engines like Lynx and Curl, enabling real-time research and fact verification.
|
||||
|
||||
* Phase A: Demand (PRD)
|
||||
:PROPERTIES:
|
||||
:STATUS: FROZEN
|
||||
:END:
|
||||
|
||||
** 1. Purpose
|
||||
Define the interfaces for internet information retrieval and synthesis.
|
||||
|
||||
** 2. User Needs
|
||||
- **Connectivity:** Pluggable engines (Lynx, Curl) for fetching URLs.
|
||||
- **Synthesis:** Neural transformation of raw content into factual summaries.
|
||||
- **Efficiency:** Default to text-only engines to minimize overhead.
|
||||
- **Search Integration:** Automatic DuckDuckGo routing for general queries.
|
||||
|
||||
** 3. Success Criteria
|
||||
*** TODO Engine Fetching Verification (Lynx/Curl)
|
||||
*** TODO URL vs Query Routing Logic
|
||||
*** TODO Neural Synthesis Formatting Accuracy
|
||||
|
||||
* Phase B: Blueprint (PROTOCOL)
|
||||
:PROPERTIES:
|
||||
:STATUS: SIGNED
|
||||
:END:
|
||||
|
||||
** 1. Architectural Intent
|
||||
Interfaces for web I/O and content synthesis. Source of truth is the global internet and local CLI browser engines.
|
||||
|
||||
** 2. Semantic Interfaces
|
||||
#+begin_src lisp
|
||||
(defun trigger-skill-web-research (context)
|
||||
"Triggers on :delegation :target-skill :web.")
|
||||
|
||||
(defun web-fetch (url &optional engine)
|
||||
"Dispatches fetch request to CLI engines.")
|
||||
|
||||
(defun neuro-skill-web-research (context)
|
||||
"Neural selection of engine and synthesis of fetched content.")
|
||||
#+end_src
|
||||
|
||||
* Phase D: Build (Implementation)
|
||||
|
||||
** Browser Engines
|
||||
#+begin_src lisp :tangle projects/org-skill-web-research/src/research-logic.lisp
|
||||
(defun fetch-with-lynx (url)
|
||||
(let ((cmd (format nil "lynx -dump -nolist '~a'" url)))
|
||||
(uiop:run-program cmd :output :string :ignore-error-status t)))
|
||||
|
||||
(defun fetch-with-curl (url)
|
||||
(let ((cmd (format nil "curl -sL '~a'" url)))
|
||||
(uiop:run-program cmd :output :string :ignore-error-status t)))
|
||||
|
||||
(defun web-fetch (url &optional engine)
|
||||
(case engine
|
||||
(:curl (fetch-with-curl url))
|
||||
(t (fetch-with-lynx url))))
|
||||
#+end_src
|
||||
|
||||
** Trigger Perception
|
||||
#+begin_src lisp :tangle projects/org-skill-web-research/src/research-logic.lisp
|
||||
(defun trigger-skill-web-research (context)
|
||||
(let ((type (getf context :type))
|
||||
(payload (getf context :payload)))
|
||||
(and (eq type :EVENT)
|
||||
(eq (getf payload :sensor) :delegation)
|
||||
(eq (getf payload :target-skill) :web))))
|
||||
#+end_src
|
||||
|
||||
* Registration
|
||||
#+begin_src lisp
|
||||
(defskill :skill-web-research
|
||||
:priority 80
|
||||
:trigger #'trigger-skill-web-research
|
||||
:neuro #'neuro-skill-web-research
|
||||
:symbolic #'verify-skill-web-research)
|
||||
#+end_src
|
||||
Reference in New Issue
Block a user