(deffacts initial-facts
"Исходные факты для запуска процесса создания веб-сайта"
(client Ivan)
)
(defrule wants-to-create-website
(client Ivan)
=>
(printout t "Иван, хочешь создать веб-сайт? (yes/no): ")
(assert (wants-to-create-website (read)))
)
(defrule has-budget
(wants-to-create-website yes)
=>
(printout t "Есть ли у тебя бюджет на создание сайта? (yes/no): ")
(assert (has-budget (read)))
)
(defrule start-TZ
(has-budget yes)
=>
(printout t "Начинаем разработку ТЗ." crlf)
(assert (can-start-TZ yes))
)
(defrule develop-TZ
(can-start-TZ yes)
=>
(printout t "Разработано ТЗ." crlf)
(assert (developed-TZ yes))
)
(defrule approve-TZ
(developed-TZ yes)
=>
(printout t "ТЗ утверждено?" crlf)
(printout t "Подтверждаешь? (yes/no): ")
(assert (approved-TZ (read)))
)
(defrule design-website
(approved-TZ yes)
=>
(printout t "Разработан дизайн сайта." crlf)
(assert (designed-website yes))
)
(defrule implement-website
(designed-website yes)
=>
(printout t "Сайт реализован." crlf)
(assert (implemented-website yes))
)
(defrule test-website
(implemented-website yes)
=>
(printout t "Сайт протестирован." crlf)
(assert (tested-website yes))
)
(defrule setup-hosting
(tested-website yes)
=>
(printout t "Настроены хостинг и домен?" crlf)
(printout t "Подтверждаешь? (yes/no): ")
(assert (hosting-setup (read)))
)
(defrule launch-website
(hosting-setup yes)
=>
(printout t "Сайт запущен!" crlf)
(assert (website-launched yes))
)
(exit)
; empty line at the end